Showing posts with label setup. Show all posts
Showing posts with label setup. Show all posts

Tuesday, March 27, 2012

Adding a new row to SQL table

Hi all,

I have a database setup with a few rows and i would like to allow a user to create a new row of data. After some googling, I've deduced that I need to somehow use an onclick command to perform an insert command. here is my code as of right now:

protectedvoid ItemAdd_Click(object sender,EventArgs e)

{

int newnum = 4;int POnum = newnum ++;

string Item = textbox3.Text.ToString();

string Quantity = textbox4.ToString();

string Part = textbox5.ToString();

string Description = textbox6.Text.ToString();

string Price = textbox7.Text.ToString();string UOM = textbox8.Text.ToString();

SqlDataSource2.InsertParameters.Clear();

SqlDataSource2.InsertParameters.Add("@.Item", Item);

SqlDataSource2.InsertParameters.Add("@.Quantity", Quantity);

SqlDataSource2.InsertParameters.Add("@.Part", Part);

SqlDataSource2.InsertParameters.Add("@.Description", Description);

SqlDataSource2.InsertParameters.Add("@.Price", Price);

SqlDataSource2.InsertParameters.Add("@.UOM", UOM);

SqlDataSource1.InsertCommand ="insert into ItemMaster "+

"values (12, @.Item, @.Quantity, @.Part, @.Description, @.Price, @.UOM)";

SqlDataSource2.Insert();

}

here's the aspx:

<%@.PageLanguage="C#"MasterPageFile="~/MasterPage.master"AutoEventWireup="true"CodeFile="createpo.aspx.cs"Inherits="Subpgs_Purchasing_createpo"Title="Create A PO" %>

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server">

<tablestyle="width: 600px; position: relative; top: 30px; height: 253px"cellpadding="10px">

<tr>

<tdstyle="width: 180px; text-align: left;"rowspan="2">

Select Vendor<br/>- or -<br/><asp:LinkButtonID="Linkbutton1"runat="server"OnClick="Linkbutton1_Click">Create Vendor</asp:LinkButton></td>

<tdstyle="width: 100px"rowspan="2">

<asp:ListBoxID="ListBox2"runat="server"DataSourceID="SqlDataSource1"DataTextField="Name"

DataValueField="ID"OnSelectedIndexChanged="ListBox2_SelectedIndexChanged"></asp:ListBox><asp:SqlDataSourceID="SqlDataSource1"runat="server"

ConnectionString="<%$ ConnectionStrings:ConnectionString %>"SelectCommand="SELECT * FROM [Vendor_info]"></asp:SqlDataSource>

</td>

<tdstyle="width: 180px; text-align: left;">

Job/Req.S.O. No.</td>

<tdstyle="width: 100px">

<asp:TextBoxID="Job"runat="server"></asp:TextBox></td>

</tr>

<tr>

<tdstyle="width: 180px; text-align: left;">

Terms</td>

<tdstyle="width: 100px">

<asp:TextBoxID="Terms"runat="server"></asp:TextBox></td>

</tr>

<tr>

<tdstyle="width: 180px; text-align: left;">

F.O.B.</td>

<tdstyle="width: 100px">

<asp:TextBoxID="FOB"runat="server"></asp:TextBox></td>

<tdstyle="width: 180px; text-align: left;">

Ship To:<br/>

Address:<br/>

City / State / Zip:</td>

<tdstyle="width: 100px">

<asp:TextBoxID="Ship1"runat="server"></asp:TextBox>

<asp:TextBoxID="Ship2"runat="server"></asp:TextBox>

<asp:TextBoxID="Ship3"runat="server"></asp:TextBox></td>

</tr>

</table>

<br/>

<br/>

<asp:SqlDataSourceID="SqlDataSource2"runat="server"ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Purchase_Orders.mdf;Integrated Security=True;User Instance=True;Context Connection=False"

ProviderName="System.Data.SqlClient"SelectCommand="SELECT [Item], [Quantity], [Part], [Description], [Price], [UOM], [Ammount], [PONumber] FROM [ItemMaster]"DeleteCommand="DELETE FROM [ItemMaster] WHERE [PONumber] = @.PONumber"InsertCommand="INSERT INTO [ItemMaster] ([Item], [Quantity], [Part], [Description], [Price], [UOM], [Ammount], [PONumber]) VALUES (@.Item, @.Quantity, @.Part, @.Description, @.Price, @.UOM, @.Ammount, @.PONumber)"UpdateCommand="UPDATE [ItemMaster] SET [Item] = @.Item, [Quantity] = @.Quantity, [Part] = @.Part, [Description] = @.Description, [Price] = @.Price, [UOM] = @.UOM, [Ammount] = @.Ammount WHERE [PONumber] = @.PONumber">

<DeleteParameters>

<asp:ParameterName="PONumber"Type="Decimal"/>

</DeleteParameters>

<UpdateParameters>

<asp:ParameterName="Item"Type="String"/>

<asp:ParameterName="Quantity"Type="Decimal"/>

<asp:ParameterName="Part"Type="String"/>

<asp:ParameterName="Description"Type="String"/>

<asp:ParameterName="Price"Type="Decimal"/>

<asp:ParameterName="UOM"Type="String"/>

<asp:ParameterName="Ammount"Type="Decimal"/>

<asp:ParameterName="PONumber"Type="Decimal"/>

</UpdateParameters>

<InsertParameters>

<asp:ParameterName="Item"Type="String"/>

<asp:ParameterName="Quantity"Type="Decimal"/>

<asp:ParameterName="Part"Type="String"/>

<asp:ParameterName="Description"Type="String"/>

<asp:ParameterName="Price"Type="Decimal"/>

<asp:ParameterName="UOM"Type="String"/>

<asp:ParameterName="Ammount"Type="Decimal"/>

<asp:ParameterName="PONumber"Type="Decimal"/>

</InsertParameters>

</asp:SqlDataSource>

<br/>

<table>

<tr>

<td>Item #</td>

<td><asp:TextBoxID="textbox3"runat=server></asp:TextBox></td>

<td>Quantity</td>

<td><asp:TextBoxID="textbox4"runat=server></asp:TextBox></td>

<td>Part Number</td>

<td><asp:TextBoxID="textbox5"runat=server></asp:TextBox></td>

</tr>

<tr>

<td>Description</td>

<td><asp:TextBoxID="textbox6"runat=server></asp:TextBox></td>

<td>Unit Price</td>

<td><asp:TextBoxID="textbox7"runat=server></asp:TextBox></td>

<td>Unit of Measure</td>

<td><asp:TextBoxID="textbox8"runat=server></asp:TextBox></td>

</tr>

<tr>

<tdcolspan="6"align="center"><asp:ButtonID="ItemAdd"runat=servertext="Add Item"OnClick="ItemAdd_Click"/></td>

</tr>

</table>

<br/>

<br/>

<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"DataKeyNames="PONumber"

DataSourceID="SqlDataSource2">

<Columns>

<asp:CommandFieldShowEditButton="True"/>

<asp:BoundFieldDataField="Item"HeaderText="Item"SortExpression="Item"/>

<asp:BoundFieldDataField="Quantity"HeaderText="Quantity"SortExpression="Quantity"/>

<asp:BoundFieldDataField="Part"HeaderText="Part"SortExpression="Part"/>

<asp:BoundFieldDataField="Description"HeaderText="Description"SortExpression="Description"/>

<asp:BoundFieldDataField="Price"HeaderText="Price"SortExpression="Price"/>

<asp:BoundFieldDataField="UOM"HeaderText="UOM"SortExpression="UOM"/>

<asp:BoundFieldDataField="Ammount"HeaderText="Ammount"SortExpression="Ammount"/>

<asp:BoundFieldDataField="PONumber"HeaderText="PONumber"ReadOnly="True"SortExpression="PONumber"

Visible="False"/>

</Columns>

</asp:GridView>

<br/>

<br/>

<br/>

<asp:ButtonID="Button1"runat="server"Text="Submit Data"OnClick="Button1_Click"/> <br/>

<br/>

<asp:LabelID="Label1"runat="server"Text="Please Verify Information below!"Visible="False"></asp:Label><br/>

<br/>

<tablealign="left">

<tr>

<tdstyle="width: 200px; text-align: left;">

<asp:LabelID="Label4"runat="server"Text="Job/REQ.S.O. No."Visible="false"></asp:Label></td>

<tdstyle="width: 200px; text-align: left;">

<asp:LabelID="Label5"runat="server"></asp:Label></td>

</tr>

<tr>

<tdstyle="width: 200px; text-align: left;">

<asp:LabelID="Label7"runat="server"Text="Terms"Visible="false"></asp:Label></td>

<tdstyle="width: 200px; text-align: left;">

<asp:LabelID="Label8"runat="server"></asp:Label></td>

</tr>

<tr>

<tdstyle="width: 200px; text-align: left;">

<asp:LabelID="Label10"runat="server"Text="F.O.B."Visible="false"></asp:Label></td>

<tdstyle="width: 200px; text-align: left;">

<asp:LabelID="Label11"runat="server"></asp:Label></td>

</tr>

</table>

<asp:DetailsViewID="DetailsView1"runat="server"AutoGenerateRows="False"DataSourceID="SqlDataSource1"

Height="50px"Visible="False"Width="260px"BackColor="#CCCCCC"BorderColor="#999999"BorderStyle="Solid"BorderWidth="3px"CellPadding="4"CellSpacing="2"DataKeyNames="ID"ForeColor="Black">

<FooterStyleBackColor="#CCCCCC"/>

<EditRowStyleBackColor="#000099"Font-Bold="True"ForeColor="White"/>

<RowStyleBackColor="White"/>

<PagerStyleBackColor="#CCCCCC"ForeColor="Black"HorizontalAlign="Left"/>

<Fields>

<asp:BoundFieldDataField="ID"HeaderText="ID"ReadOnly="True"SortExpression="ID"/>

<asp:BoundFieldDataField="Name"HeaderText="Name"SortExpression="Name"/>

<asp:BoundFieldDataField="Street"HeaderText="Street"SortExpression="Street"/>

<asp:BoundFieldDataField="City"HeaderText="City"SortExpression="City"/>

<asp:BoundFieldDataField="State"HeaderText="State"SortExpression="State"/>

<asp:BoundFieldDataField="Zip"HeaderText="Zip"SortExpression="Zip"/>

<asp:BoundFieldDataField="Telephone Number"HeaderText="Telephone Number"SortExpression="Telephone Number"/>

<asp:BoundFieldDataField="Contact Information"HeaderText="Contact Information"

SortExpression="Contact Information"/>

<asp:BoundFieldDataField="E-mail address"HeaderText="E-mail address"SortExpression="E-mail address"/>

<asp:BoundFieldDataField="Fax Number"HeaderText="Fax Number"SortExpression="Fax Number"/>

<asp:BoundFieldDataField="Comments"HeaderText="Comments"SortExpression="Comments"/>

</Fields>

<HeaderStyleBackColor="Black"Font-Bold="True"ForeColor="White"/>

</asp:DetailsView>

<br/>

<br/>

<br/>

<asp:ButtonID="Button2"runat="server"Text="E-Mail PO"Visible="False"OnClick="Button2_Click"/>

</asp:Content>

whenever I run this, I receive the following error and am not sure how to correct it:

System.Data.SqlClient.SqlException: Must declare the scalar variable "@.Item".

If someone could please explain to me the process here of what is going ion it would be greatly appreciated. My understanding is the @.item is just a variable if you will so i'm not sure why its stating i need to declare it.

Thank you all!

Welcome to the community. I would suggest you use the InsertCode option to insert code in your posts from next time. Lets start from the starting and then we will remove errors as we go.

Gizm0:

string Item = textbox3.Text.ToString();

string Quantity = textbox4.ToString();

string Part = textbox5.ToString();

I am assuming these are your textboxes. You should use Text property of textboxes like you used for others. Also, you don't have to use ToString() method. Text property returns the textbox value as a string.

|||

Hi Bullpit.

Sorry about that, I didn't see the code Icon there. Anyhow, I made the changes and continue to receive the same error. At first glance, does it at least look like i'm on the right path? I've always been more hardware/network inclined so a lot of the google searches and forums I used to piece this together are still Greek to me.

Thanks for the response!

|||

I don't use SqlDataSource as such. Since you are writing some code, you can instead use this code to insert values to your database. Extend this example to add more parameters.

protected void ItemAdd_Click(object sender, EventArgs e) {// connection string to your database SqlConnection mySqlConnection =new SqlConnection("server=(local)\\SQLEXPRESS;database=MyDatabase;Integrated Security=SSPI;");// open connection mySqlConnection.Open();// create command object to execute query SqlCommand mySqlCommand = mySqlConnection.CreateCommand();// set command text to the INSERT sql query mySqlCommand.CommandText = @."INSERT INTO Employee (Item, Quantity, Part...) VALUES( @.Item, @.Quantity, @.Part...)";// Add parameters mySqlCommand.Parameters.Add("@.Item", SqlDbType.VarChar); mySqlCommand.Parameters.Add("@.Quantity", SqlDbType.VarChar); mySqlCommand.Parameters.Add("@.Part", SqlDbType.VarChar);// set parameter values mySqlCommand.Parameters["@.Item"].Value = textbox3.Text; mySqlCommand.Parameters["@.Quantity"].Value = textbox4.Text; mySqlCommand.Parameters["@.Part"].Value = textbox5.Text;// execute query mySqlCommand.ExecuteNonQuery();// close connection mySqlConnection.Close();}

You will need these namespaces.

using System.Data;
using System.Data.SqlClient;

|||

Hey BullPit,

I really appreciate the help! I was able to get this working using your code above. Now it looks like I just need to validate the input boxes to make sure the correct data is being entered in the fields.

Again, thanks!

sql

Sunday, March 25, 2012

Adding a data connection in Visual Studio

Not sure if I should add this in this forum or in a VS forum, but here goes.

I have a Visual Studio project setup using VB.Net 2005 RTM. I have a SQL2000 data connection set up and it is working. We have just added a SQL2000 database that is on the same server as a named instance. When I go to add the 2000 SQL data connection all I can see is the name of the Server and the 2005 databases. Both the SQL2005 and the SQL2000 are on a box cleverly called SERVER. In the "Add Connection" dialog box I enter Server as the server name and then when I click on the dropdown for the databases I just see the SQL2005 database. The 2000 instance name is SQL2000 so I entered \\Server\SQL2000 as the server name but that didn't get me anything. Any suggestions?

Thanks...

To connect to a named instance, you specify the server name in the connection dialog as <servername>\<instancename>. So in your environment, you would enter SERVER\SQL2000. Remove the leading backslashes and you should be ok.

jeff.

Adding a data connection in Visual Studio

Not sure if I should add this in this forum or in a VS forum, but here goes.

I have a Visual Studio project setup using VB.Net 2005 RTM. I have a SQL2000 data connection set up and it is working. We have just added a SQL2000 database that is on the same server as a named instance. When I go to add the 2000 SQL data connection all I can see is the name of the Server and the 2005 databases. Both the SQL2005 and the SQL2000 are on a box cleverly called SERVER. In the "Add Connection" dialog box I enter Server as the server name and then when I click on the dropdown for the databases I just see the SQL2005 database. The 2000 instance name is SQL2000 so I entered \\Server\SQL2000 as the server name but that didn't get me anything. Any suggestions?

Thanks...

To connect to a named instance, you specify the server name in the connection dialog as <servername>\<instancename>. So in your environment, you would enter SERVER\SQL2000. Remove the leading backslashes and you should be ok.

jeff.

Thursday, March 22, 2012

Adding a article causes ALL articles to be refreshed

I have setup Transactional replication in SQL 2005 between two servers and have about 200 tables being replicated. The problem is that every time, I add or drop a table to replication, and start the Snapshot agent, it re-initializes every article and re-loads every article. This process takes 1 hour to complete and CPU usage goes to 100% during that time.

This behaviour seems very different from SQL 2000 where I would start Snapshot agent and only the relevant tables were added/dropped.

Has that functionality changed from 2000 to 2005? Am I not doing something right?

Thanks,

Amir

This is the default behavior for anonymous subscribers. IIRC through the GUI for named subscribers a complete snapshot will be generated. However if you use sp_addarticle only the mini snapshot for the one table will be generated.|||

I have tried using sp_article. The problem is that it gives me the error:

Cannot make the change because a snapshot is already generated. Set @.force_invalidate_snapshot to 1 to force the change and invalidate the existing snapshot.

And in order to avoid the error, if I use the Option of @.force_invalidate_snapshot=1, then again I am back to where I was before and it re-initializes everything.

BTW, What does IIRC mean?

Thanks,

Amir

|||

Any more thoughts on this? If my replication is setup and running, is there NO WAY to add "one" table to the publication without having to do the Bulk copy on ALL tables? Adding a table to replication seems one of the most basic maintenance tasks. I'm still surprised that MSFT has made that basic task so difficult in 2005.

Tuesday, March 20, 2012

added article to current transactional repl. How to replicate additional article?

Hi, I already have transactional replication setup between two servers
(production server to reporting server).
I have created a new table witha primary key and have added this table as
an article to the publication.
How can i get my setup to take an initial snapshot of the table and apply it
to the reporting server?
Any help most appreciated!
thanks
John
John,
you will need to run the snapshot agent then synchronize. The whole process
from start to finish is:
exec sp_addarticle @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.source_table = 'tEmployees'
exec sp_addsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
Start snapshot agent, start distribuition agent.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul,
Are you saying that I have to take a snapshot of the whole database all over
again?
I thought I could take a snapshot of just the article that has been newely
added to the publication?
In actual fact, the 'Last Action' column on my agent (subsicriber' is saying
"The initial snapshot for article 'myTable' is not yet available"
Many thanks!
John
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OQ2XvSVEGHA.4000@.TK2MSFTNGP10.phx.gbl...
> John,
> you will need to run the snapshot agent then synchronize. The whole
> process from start to finish is:
> exec sp_addarticle @.publication = 'tTestFNames'
> , @.article = 'tEmployees'
> , @.source_table = 'tEmployees'
> exec sp_addsubscription @.publication = 'tTestFNames'
> , @.article = 'tEmployees'
> , @.subscriber = 'RSCOMPUTER'
> , @.destination_db = 'testrep'
> Start snapshot agent, start distribuition agent.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||John,
if you add a new table and subscription to that table, running the snapshot
agent won't create a complete snapshot - just the new article.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Monday, March 19, 2012

Add user to Local Group Error

Guys,

I need help installing SQL Server 2005. I meet all of the pre-req's and setup seems to run normally until it starts installing the services and database engine. I receive the following error:

SQL Server Setup was unable add user NT AUTHORITY\NETWORK SERVICE to local group SQLSERVER2005DTSUser$server.

It repeats the error for for the other groups that are created with SQL install.

Am i missing something that's obvious? I couldn't find anything in the documentation or anywhere else.

Here are a couple of things to try:

1. Check the installation log files, located at %Program Files%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files for more details on the error.

2. Try to add the service manually to the local groups using the Computer Management Admin tool. Then re-run setup.

Paul

Thursday, March 8, 2012

Add new tables to replication

Using SQL Server 2000 with sp4, I have setup a merge replication with a snapshot, currently if we do a schema change we have to:
-break replication,
-stop the subscription,
-make our modifications to the publisher,
-then create a backup of the database,
-push the backup to all of the subscribers,
-restore the database to the subscriber,
-reinitialize the subscription and push the subscription to the subscribers without pushing the contents of the initial snapshot

the reason why we do it this way is that the various servers are located hundreds of miles apart from the publisher and even with broadband connections, re-initializing the subscription always fails.

this is incredibly cumbersome and time consuming and i know there must be a better way to do this.

i need to add two tables to an existing database that is currently being replicated via merge replication, is there an easier way to make the schema changes and have them replicate to all the subscribers?

Rather than making a schema change to an existing table article in the merge publication, it seems like you are trying to add an incremental article to an existing table article. Also from what I see in the scenario, it seems like the subscriptions are set up to be NO SYNC (SP_addmergesubscription @.sync_type='none'). The NO SYNC means you are populating the subscriber server with the initial data manually via backup/restore.

In order for you to add a new table or two to the existing merge publication you may not have to break replication. Here are some steps to try:

1) Create the new tables at the publisher. These new tables must include a rowguid column (i.e. [rowguid] uniqueidentifier ROWGUIDCOL NOT NULL) because merge will use this for change tracking. This scenario will not work without rowguid columns on the new tables.

2) Populate the table

3) Add the new table as a table article in the existing merge publication. You will be warned appropriately that the full snapshot needs to be rerun.

4) Run the full snapshot agent job.

5) BCP out the data from the new table article to a file and send it to the remote subscriber server

6) Create the new table schema at the subscriber

7) BCP in the data on the subscriber server

8) Execute the merge agent. This is required to have the merge triggers built on the subscriber for change tracking. *** Do not do any DML changes on the subscriber server until the merge agent is executed at least one time.

9) Now you should be able to execute DML on the new table at both the publisher and subscriber and sync the changes.

Try this out on a test system to verify it works. I tried on my system and it accomplished what you wanted.

Tom

This posting is provided "AS IS" with no warranties, and confers no rights.

Add new tables to replication

I have setup transactional replication with no snapshot. I created a new
table on publisher side and I would want the table also to be replicated.
Here is what i did-
- drop the subscription
- create/dts table to subscriber
- create insert update stored procedures at subscriber(i have created them
during testing)
- add article to publication
-recreate subscription
Is there any other way to do it as I donot want my subscription to be
dropped each time as it has some other tables that are replicated
continuously...
Regards,
Ravi
Ravi,
to avoid dropping the subscription: as you did before...
> - create/dts table to subscriber
> - create insert update stored procedures at subscriber(i have created them
> during testing)
> - add article to publication
Then
exec sp_addsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
, @.sync_type = 'none'
ie add the subscription to the particular article.
HTH,
Paul Ibison, SQL Server MVP (www.replicationanswers.com)

Add new SQL Server in "SQL Server Group"

Hi,
Does anyone know how to add a new SQL Server under the "SQL Server Group"
using Enterprise Manager other than run the setup.exe in MSDE?
Thanks.
Paul
Paul wrote:
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server
> Group" using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
SQL EM does not actually create new instances of SQL Server. It only
"adds" instances of SQL Server that already exist to its UI. To create a
new instance of SQL Server, you need to re-run the SQL Server
installation and apply the necessary service packs. I'm not sure MSDE
supports multiple instances. It might, but I'm not sure.
David Gugick
Imceda Software
www.imceda.com
|||David,
Thanks. MSDE does support multiple instances. I am just trying to find a
better way to add a new instance.
Paul
"David Gugick" wrote:

> Paul wrote:
> SQL EM does not actually create new instances of SQL Server. It only
> "adds" instances of SQL Server that already exist to its UI. To create a
> new instance of SQL Server, you need to re-run the SQL Server
> installation and apply the necessary service packs. I'm not sure MSDE
> supports multiple instances. It might, but I'm not sure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
|||To install another instance of SQL Server you must go through setup..
If you merely wish to administer an existing SQL in your SEM, then right
click the server group, and select Register server
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server Group"
> using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
|||Wayne,
Thanks.
Paul
"Wayne Snyder" wrote:

> To install another instance of SQL Server you must go through setup..
> If you merely wish to administer an existing SQL in your SEM, then right
> click the server group, and select Register server
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
>
>
|||No problem
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:7EE2E3E4-10BE-4D72-A0CB-CD1E78ADBE82@.microsoft.com...[vbcol=seagreen]
> Wayne,
> Thanks.
> Paul
> "Wayne Snyder" wrote:
Group"[vbcol=seagreen]

Add new SQL Server in "SQL Server Group"

Hi,
Does anyone know how to add a new SQL Server under the "SQL Server Group"
using Enterprise Manager other than run the setup.exe in MSDE?
Thanks.
PaulPaul wrote:
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server
> Group" using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
SQL EM does not actually create new instances of SQL Server. It only
"adds" instances of SQL Server that already exist to its UI. To create a
new instance of SQL Server, you need to re-run the SQL Server
installation and apply the necessary service packs. I'm not sure MSDE
supports multiple instances. It might, but I'm not sure.
--
David Gugick
Imceda Software
www.imceda.com|||David,
Thanks. MSDE does support multiple instances. I am just trying to find a
better way to add a new instance.
Paul
"David Gugick" wrote:
> Paul wrote:
> > Hi,
> >
> > Does anyone know how to add a new SQL Server under the "SQL Server
> > Group" using Enterprise Manager other than run the setup.exe in MSDE?
> > Thanks.
> >
> > Paul
> SQL EM does not actually create new instances of SQL Server. It only
> "adds" instances of SQL Server that already exist to its UI. To create a
> new instance of SQL Server, you need to re-run the SQL Server
> installation and apply the necessary service packs. I'm not sure MSDE
> supports multiple instances. It might, but I'm not sure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||To install another instance of SQL Server you must go through setup..
If you merely wish to administer an existing SQL in your SEM, then right
click the server group, and select Register server
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server Group"
> using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul|||Wayne,
Thanks.
Paul
"Wayne Snyder" wrote:
> To install another instance of SQL Server you must go through setup..
> If you merely wish to administer an existing SQL in your SEM, then right
> click the server group, and select Register server
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> > Hi,
> >
> > Does anyone know how to add a new SQL Server under the "SQL Server Group"
> > using Enterprise Manager other than run the setup.exe in MSDE?
> > Thanks.
> >
> > Paul
>
>|||No problem
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:7EE2E3E4-10BE-4D72-A0CB-CD1E78ADBE82@.microsoft.com...
> Wayne,
> Thanks.
> Paul
> "Wayne Snyder" wrote:
> > To install another instance of SQL Server you must go through setup..
> >
> > If you merely wish to administer an existing SQL in your SEM, then right
> > click the server group, and select Register server
> >
> > --
> > Wayne Snyder, MCDBA, SQL Server MVP
> > Mariner, Charlotte, NC
> > www.mariner-usa.com
> > (Please respond only to the newsgroups.)
> >
> > I support the Professional Association of SQL Server (PASS) and it's
> > community of SQL Server professionals.
> > www.sqlpass.org
> >
> > "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> > > Hi,
> > >
> > > Does anyone know how to add a new SQL Server under the "SQL Server
Group"
> > > using Enterprise Manager other than run the setup.exe in MSDE?
> > > Thanks.
> > >
> > > Paul
> >
> >
> >

Add new SQL Server in "SQL Server Group"

Hi,
Does anyone know how to add a new SQL Server under the "SQL Server Group"
using Enterprise Manager other than run the setup.exe in MSDE?
Thanks.
PaulPaul wrote:
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server
> Group" using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
SQL EM does not actually create new instances of SQL Server. It only
"adds" instances of SQL Server that already exist to its UI. To create a
new instance of SQL Server, you need to re-run the SQL Server
installation and apply the necessary service packs. I'm not sure MSDE
supports multiple instances. It might, but I'm not sure.
David Gugick
Imceda Software
www.imceda.com|||David,
Thanks. MSDE does support multiple instances. I am just trying to find a
better way to add a new instance.
Paul
"David Gugick" wrote:

> Paul wrote:
> SQL EM does not actually create new instances of SQL Server. It only
> "adds" instances of SQL Server that already exist to its UI. To create a
> new instance of SQL Server, you need to re-run the SQL Server
> installation and apply the necessary service packs. I'm not sure MSDE
> supports multiple instances. It might, but I'm not sure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||To install another instance of SQL Server you must go through setup..
If you merely wish to administer an existing SQL in your SEM, then right
click the server group, and select Register server
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server Group"
> using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul|||Wayne,
Thanks.
Paul
"Wayne Snyder" wrote:

> To install another instance of SQL Server you must go through setup..
> If you merely wish to administer an existing SQL in your SEM, then right
> click the server group, and select Register server
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
>
>|||No problem
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:7EE2E3E4-10BE-4D72-A0CB-CD1E78ADBE82@.microsoft.com...[vbcol=seagreen]
> Wayne,
> Thanks.
> Paul
> "Wayne Snyder" wrote:
>
Group"[vbcol=seagreen]

Tuesday, March 6, 2012

Add mode problem on field setup with Foreign Key

Hello,

I have two tables (one-to-many relation) related thru a common key. I have setup the Relation using the Database Designer. The Form is populated using Drag-and-drop which automatically adds the BindingSource, TableAdapter, and Binding Navigator. The Relation works great in the change mode, and life is good.

In the Add mode the field setup with the Foreign Key is not automatically populated as it is in Change mode. The field can be updated manually, but that defeats the purpose of setting up the Relation.

Any ideas how to fix this?

I know this is difficult to visualize without seeing it.

Thank you for any ideas,

Tom

The detail grid (or some other graphic control) should be linked to the relation itself not the underlying detail database table. Master's PK should be FK in Detail.

See here on MSDN2:

One BindingSource is bound to the parent Customers table in the data set. This data is displayed in the master DataGridView control. The other BindingSource is bound to the first data connector. The DataMember property of the second BindingSource is set to the DataRelation name. This causes the associated detail DataGridView control to display the rows of the child Orders table that correspond to the current row in the master DataGridView control.

Sunday, February 19, 2012

Add and Change tables in Merge

We have a merge replication setup in SQL 2000 that synchs with 2 laptops. I
need to add a new table to the database that will be included in the new
subscription as well as a change (adding a column) to a table already in the
publication. What are the steps I need to take to get the schema changes to
the 2 laptops? Thanks.
David
David - the new table can be added through the EM gui. Then run the snapshot
agent which will snapshot all articles but the synchronization will just
take the new article. For the new column, you can run sp_repladdcolumn.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Thanks Paul. Will the laptop users get the new snapshots automatically or
will I have to do something special? They are using MSDE. Thanks.
David
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uwzVBo3KHHA.4912@.TK2MSFTNGP02.phx.gbl...
> David - the new table can be added through the EM gui. Then run the
> snapshot agent which will snapshot all articles but the synchronization
> will just take the new article. For the new column, you can run
> sp_repladdcolumn.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
|||Also, I have 2 publications. One has about 50% of the tables as articles and
the other has about 20-30 views and stored procs. And 1 of the tables has a
triigger update. Does any of this change your recommendation? Thanks.
David
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uwzVBo3KHHA.4912@.TK2MSFTNGP02.phx.gbl...
> David - the new table can be added through the EM gui. Then run the
> snapshot agent which will snapshot all articles but the synchronization
> will just take the new article. For the new column, you can run
> sp_repladdcolumn.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
|||David - they'll get the new snapshotted table the next time they
synchronize.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||David - I'm not too sure why this is being mentioned - but perhaps I'm
missing something . From what you mentioned, you're just adding a new
table and a column. Perhaps you're saying that the procedural code will
itself need modifying? In that case I usually use sp_addscriptexec to
propagate it.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Paul - I was mostly concerned with the new trigger as it will be on a table
other than the one being added to the articles.
David
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23FzseC5KHHA.1276@.TK2MSFTNGP04.phx.gbl...
> David - I'm not too sure why this is being mentioned - but perhaps I'm
> missing something . From what you mentioned, you're just adding a new
> table and a column. Perhaps you're saying that the procedural code will
> itself need modifying? In that case I usually use sp_addscriptexec to
> propagate it.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>
|||OK - in that case you could add this using sp_addscriptexec.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Thursday, February 16, 2012

Add a third node to a cluster

Hy,
I have this problem, when I try from the setup wizard of sql 2000 to add the
new node-c the node is listed unavailable. I add the node-c to the cluster
group and function without problem with node-a and node-b, the sql 2000 in
node-a and node-b is function without problem, I not understand why the setup
sql 2000 give the node-c unavaiable to add!
Can anybody help me? sorry for the english!
Windows 2003 Server EE sp 1
SQL Server 2000 EE sp 3a
Server HP DL380
Bernardo
Take a look at the SQLSTP.LOG in the %systemroot%. See if SQL if flagging
NODE C with any information that might lead you in the direction as to why it
is listed as unavailable. Post what you find.
Regards
cT
"bernardo" wrote:

> Hy,
> I have this problem, when I try from the setup wizard of sql 2000 to add the
> new node-c the node is listed unavailable. I add the node-c to the cluster
> group and function without problem with node-a and node-b, the sql 2000 in
> node-a and node-b is function without problem, I not understand why the setup
> sql 2000 give the node-c unavaiable to add!
> Can anybody help me? sorry for the english!
> Windows 2003 Server EE sp 1
> SQL Server 2000 EE sp 3a
> Server HP DL380
|||15:59:39 Begin Setup
15:59:39 8.00.194
15:59:39 Mode = Normal
15:59:39 ModeType = NORMAL
15:59:39 GetDefinitionEx returned: 0, Extended: 0x0
15:59:39 ValueFTS returned: 1
15:59:39 ValuePID returned: 1
15:59:39 ValueLic returned: 1
15:59:39 System: Windows NT Enterprise Server
15:59:39 SQL Server ProductType: Enterprise Edition [0x3]
15:59:39 IsNTCluster returned: 1
15:59:39 Begin Action: SetupInitialize
15:59:39 End Action SetupInitialize
15:59:39 Begin Action: SetupInstall
15:59:39 Reading Software\Microsoft\Windows\CurrentVersion\CommonFi lesDir ...
15:59:39 CommonFilesDir=C:\Program Files\Common Files
15:59:39 Windows Directory=C:\WINDOWS\
15:59:39 Program Files=C:\Program Files\
15:59:39 TEMPDIR=C:\DOCUME~1\HYPHEN~1\LOCALS~1\Temp\1\
15:59:39 Begin Action: SetupInstall
15:59:39 digpid size : 256
15:59:40 digpid size : 164
15:59:40 Begin Action: CheckFixedRequirements
15:59:40 Platform ID: 0xf00000
15:59:40 Version: 5.2.3790
15:59:40 File Version - C:\WINDOWS\system32\shdocvw.dll: 6.0.3790.2440
15:59:40 End Action: CheckFixedRequirements
15:59:40 Begin Action: ShowDialogs
15:59:40 Initial Dialog Mask: 0x183000f7, Disable Back=0x1
15:59:40 Begin Action ShowDialogsHlpr: 0x1
15:59:40 Begin Action: DialogShowSdWelcome
15:59:46 End Action DialogShowSdWelcome
15:59:46 Dialog 0x1 returned: 1
15:59:46 End Action ShowDialogsHlpr
15:59:46 ShowDialogsGetDialog returned: nCurrent=0x2,index=1
15:59:46 Begin Action ShowDialogsHlpr: 0x2
15:59:46 Begin Action: DialogShowSdMachineName
15:59:55 ShowDlgMachine returned: 1
15:59:55 Name = CLX-CLUSTER-SQL, Type = 0x20000008
15:59:55 GetCDKeyForThisVS returned: 0
15:59:55 Begin Action: CheckRequirements
15:59:55 Processor Architecture: x86 (Pentium)
15:59:55 Service Pack: 256
15:59:55 ComputerName: CLX-CLUSTER-C
15:59:55 User Name: hyphenadmin
15:59:55 IsAllAccessAllowed returned: 1
15:59:55 OS Language: 0x409
15:59:55 End Action CheckRequirements
15:59:55 This combination of Package and Operating System allows a full
product install.
15:59:55 End Action DialogShowSdMachineName
15:59:55 begin ShowDialogsUpdateMask
15:59:55 nFullMask = 0x183000f7, nCurrent = 0x2, nDirection = 0
15:59:55 Updated Dialog Mask: 0xb73c037, Disable Back = 0x1
15:59:55 Dialog 0x2 returned: 0
15:59:55 End Action ShowDialogsHlpr
15:59:55 ShowDialogsGetDialog returned: nCurrent=0x4,index=2
15:59:55 Begin Action ShowDialogsHlpr: 0x4
15:59:55 Begin Action: DialogShowSdInstallMode
15:59:57 ShowDlgInstallMode returned: 1
15:59:57 InstallMode : 0x20
15:59:57 End Action DialogShowSdInstallMode
15:59:57 begin ShowDialogsUpdateMask
15:59:57 nFullMask = 0xb73c037, nCurrent = 0x4, nDirection = 1
15:59:57 Updated Dialog Mask: 0xb73c03f, Disable Back = 0x1
15:59:57 Dialog 0x4 returned: 1
15:59:57 End Action ShowDialogsHlpr
15:59:57 ShowDialogsGetDialog returned: nCurrent=0x8,index=3
15:59:57 Begin Action ShowDialogsHlpr: 0x8
15:59:57 Begin Action : DialogShowSdAdvanced
15:59:59 ShowDlgAdvanced returned: 1
15:59:59 Adv Install Mode = -2147483648
15:59:59 End Action : DialogShowSdAdvanced
15:59:59 begin ShowDialogsUpdateMask
15:59:59 nFullMask = 0xb73c03f, nCurrent = 0x8, nDirection = 1
15:59:59 Updated Dialog Mask: 0x3c00f, Disable Back = 0x1
15:59:59 Dialog 0x8 returned: 1
15:59:59 End Action ShowDialogsHlpr
15:59:59 ShowDialogsGetDialog returned: nCurrent=0x4000,index=14
15:59:59 Begin Action ShowDialogsHlpr: 0x4000
15:59:59 Begin Action: DialogShowSdVirtualServer
16:00:01 ShowDlgVirtualServer returned: 0
16:00:01 Ipaddress = 192.9.220.221,255.255.255.0,Lan Team
16:00:01 szNewList =
16:00:01 szModifiedList =
16:00:01 szRemovedList =
16:00:01 End Action DialogShowSdVirtualServer
16:00:01 begin ShowDialogsUpdateMask
16:00:01 nFullMask = 0x3c00f, nCurrent = 0x4000, nDirection = 1
16:00:01 Updated Dialog Mask: 0x3c00f, Disable Back = 0x1
16:00:01 Dialog 0x4000 returned: 1
16:00:01 End Action ShowDialogsHlpr
16:00:01 ShowDialogsGetDialog returned: nCurrent=0x8000,index=15
16:00:01 Begin Action ShowDialogsHlpr: 0x8000
16:00:01 Begin Action : DialogShowSdDiskGroups
16:00:01 ShowDlgDiskGroups returned: 1
16:00:01 Disk Group = B - SQL CLUSTER Group
16:00:01 End Action : DialogShowSdDiskGroups
16:00:01 begin ShowDialogsUpdateMask
16:00:01 nFullMask = 0x3c00f, nCurrent = 0x8000, nDirection = 1
16:00:01 Updated Dialog Mask: 0x3c00f, Disable Back = 0x1
16:00:01 Dialog 0x8000 returned: 1
16:00:01 End Action ShowDialogsHlpr
16:00:01 ShowDialogsGetDialog returned: nCurrent=0x10000,index=16
16:00:01 Begin Action ShowDialogsHlpr: 0x10000
16:00:01 Begin Action: DialogShowSdClusterDef
16:00:05 ShowDlgClusterDef returned: -1
16:00:05 ShowDlgClusterDef: GetLastError returned: 0
16:00:05 The operation completed successfully.
16:00:05 End Action DialogShowSdClusterDef
16:00:05 End Action ShowDialogs
16:00:05 Action CleanUpInstall:
16:00:05 StatsGenerate returned: 2
16:00:05 StatsGenerate (0x0,0x20,0xf00000,0x100,1033,0,0x0,0x20000008,0,0 ,0
16:00:05 StatsGenerate -1,hyphenadmin)
16:00:05 Installation Failed.
"Charles Tolento" ha scritto:
[vbcol=seagreen]
> Bernardo
> Take a look at the SQLSTP.LOG in the %systemroot%. See if SQL if flagging
> NODE C with any information that might lead you in the direction as to why it
> is listed as unavailable. Post what you find.
>
> Regards
> cT
> "bernardo" wrote:
|||This is the sqlstp.log
15:59:39 Begin Setup
15:59:39 8.00.194
15:59:39 Mode = Normal
15:59:39 ModeType = NORMAL
15:59:39 GetDefinitionEx returned: 0, Extended: 0x0
15:59:39 ValueFTS returned: 1
15:59:39 ValuePID returned: 1
15:59:39 ValueLic returned: 1
15:59:39 System: Windows NT Enterprise Server
15:59:39 SQL Server ProductType: Enterprise Edition [0x3]
15:59:39 IsNTCluster returned: 1
15:59:39 Begin Action: SetupInitialize
15:59:39 End Action SetupInitialize
15:59:39 Begin Action: SetupInstall
15:59:39 Reading Software\Microsoft\Windows\CurrentVersion\CommonFi lesDir ...
15:59:39 CommonFilesDir=C:\Program Files\Common Files
15:59:39 Windows Directory=C:\WINDOWS\
15:59:39 Program Files=C:\Program Files\
15:59:39 TEMPDIR=C:\DOCUME~1\HYPHEN~1\LOCALS~1\Temp\1\
15:59:39 Begin Action: SetupInstall
15:59:39 digpid size : 256
15:59:40 digpid size : 164
15:59:40 Begin Action: CheckFixedRequirements
15:59:40 Platform ID: 0xf00000
15:59:40 Version: 5.2.3790
15:59:40 File Version - C:\WINDOWS\system32\shdocvw.dll: 6.0.3790.2440
15:59:40 End Action: CheckFixedRequirements
15:59:40 Begin Action: ShowDialogs
15:59:40 Initial Dialog Mask: 0x183000f7, Disable Back=0x1
15:59:40 Begin Action ShowDialogsHlpr: 0x1
15:59:40 Begin Action: DialogShowSdWelcome
15:59:46 End Action DialogShowSdWelcome
15:59:46 Dialog 0x1 returned: 1
15:59:46 End Action ShowDialogsHlpr
15:59:46 ShowDialogsGetDialog returned: nCurrent=0x2,index=1
15:59:46 Begin Action ShowDialogsHlpr: 0x2
15:59:46 Begin Action: DialogShowSdMachineName
15:59:55 ShowDlgMachine returned: 1
15:59:55 Name = CLX-CLUSTER-SQL, Type = 0x20000008
15:59:55 GetCDKeyForThisVS returned: 0
15:59:55 Begin Action: CheckRequirements
15:59:55 Processor Architecture: x86 (Pentium)
15:59:55 Service Pack: 256
15:59:55 ComputerName: CLX-CLUSTER-C
15:59:55 User Name: hyphenadmin
15:59:55 IsAllAccessAllowed returned: 1
15:59:55 OS Language: 0x409
15:59:55 End Action CheckRequirements
15:59:55 This combination of Package and Operating System allows a full
product install.
15:59:55 End Action DialogShowSdMachineName
15:59:55 begin ShowDialogsUpdateMask
15:59:55 nFullMask = 0x183000f7, nCurrent = 0x2, nDirection = 0
15:59:55 Updated Dialog Mask: 0xb73c037, Disable Back = 0x1
15:59:55 Dialog 0x2 returned: 0
15:59:55 End Action ShowDialogsHlpr
15:59:55 ShowDialogsGetDialog returned: nCurrent=0x4,index=2
15:59:55 Begin Action ShowDialogsHlpr: 0x4
15:59:55 Begin Action: DialogShowSdInstallMode
15:59:57 ShowDlgInstallMode returned: 1
15:59:57 InstallMode : 0x20
15:59:57 End Action DialogShowSdInstallMode
15:59:57 begin ShowDialogsUpdateMask
15:59:57 nFullMask = 0xb73c037, nCurrent = 0x4, nDirection = 1
15:59:57 Updated Dialog Mask: 0xb73c03f, Disable Back = 0x1
15:59:57 Dialog 0x4 returned: 1
15:59:57 End Action ShowDialogsHlpr
15:59:57 ShowDialogsGetDialog returned: nCurrent=0x8,index=3
15:59:57 Begin Action ShowDialogsHlpr: 0x8
15:59:57 Begin Action : DialogShowSdAdvanced
15:59:59 ShowDlgAdvanced returned: 1
15:59:59 Adv Install Mode = -2147483648
15:59:59 End Action : DialogShowSdAdvanced
15:59:59 begin ShowDialogsUpdateMask
15:59:59 nFullMask = 0xb73c03f, nCurrent = 0x8, nDirection = 1
15:59:59 Updated Dialog Mask: 0x3c00f, Disable Back = 0x1
15:59:59 Dialog 0x8 returned: 1
15:59:59 End Action ShowDialogsHlpr
15:59:59 ShowDialogsGetDialog returned: nCurrent=0x4000,index=14
15:59:59 Begin Action ShowDialogsHlpr: 0x4000
15:59:59 Begin Action: DialogShowSdVirtualServer
16:00:01 ShowDlgVirtualServer returned: 0
16:00:01 Ipaddress = 192.9.220.221,255.255.255.0,Lan Team
16:00:01 szNewList =
16:00:01 szModifiedList =
16:00:01 szRemovedList =
16:00:01 End Action DialogShowSdVirtualServer
16:00:01 begin ShowDialogsUpdateMask
16:00:01 nFullMask = 0x3c00f, nCurrent = 0x4000, nDirection = 1
16:00:01 Updated Dialog Mask: 0x3c00f, Disable Back = 0x1
16:00:01 Dialog 0x4000 returned: 1
16:00:01 End Action ShowDialogsHlpr
16:00:01 ShowDialogsGetDialog returned: nCurrent=0x8000,index=15
16:00:01 Begin Action ShowDialogsHlpr: 0x8000
16:00:01 Begin Action : DialogShowSdDiskGroups
16:00:01 ShowDlgDiskGroups returned: 1
16:00:01 Disk Group = B - SQL CLUSTER Group
16:00:01 End Action : DialogShowSdDiskGroups
16:00:01 begin ShowDialogsUpdateMask
16:00:01 nFullMask = 0x3c00f, nCurrent = 0x8000, nDirection = 1
16:00:01 Updated Dialog Mask: 0x3c00f, Disable Back = 0x1
16:00:01 Dialog 0x8000 returned: 1
16:00:01 End Action ShowDialogsHlpr
16:00:01 ShowDialogsGetDialog returned: nCurrent=0x10000,index=16
16:00:01 Begin Action ShowDialogsHlpr: 0x10000
16:00:01 Begin Action: DialogShowSdClusterDef
16:00:05 ShowDlgClusterDef returned: -1
16:00:05 ShowDlgClusterDef: GetLastError returned: 0
16:00:05 The operation completed successfully.
16:00:05 End Action DialogShowSdClusterDef
16:00:05 End Action ShowDialogs
16:00:05 Action CleanUpInstall:
16:00:05 StatsGenerate returned: 2
16:00:05 StatsGenerate (0x0,0x20,0xf00000,0x100,1033,0,0x0,0x20000008,0,0 ,0
16:00:05 StatsGenerate -1,hyphenadmin)
16:00:05 Installation Failed.
"Charles Tolento" ha scritto:
[vbcol=seagreen]
> Bernardo
> Take a look at the SQLSTP.LOG in the %systemroot%. See if SQL if flagging
> NODE C with any information that might lead you in the direction as to why it
> is listed as unavailable. Post what you find.
>
> Regards
> cT
> "bernardo" wrote:
|||Im having the same problem. Does anyone have an idea whats the cause?

Monday, February 13, 2012

AD Synch in Sql Reporting Services

Is there a way to do an AD Synch in Sql Reporting Services?
In short Groups have been created in AD. Roles were also setup in SQL
Reporting for the folder that we wanted permissions applied to.
When I add a person to a global group in AD, the permissions will not work
in SQL Reporting. The user does not see the reports. If I add the person
individually â' ex. User 123 â' and give them the same permissions as the
Global Group, the user sees the folder.
We want to set up different departments with unique folders for their
reports. I want to be able to add Global Group roles to each folder. I
restarted the IIS services â' still did not work. I also restarted the SQL
reporting services â' still did not work.
--
Rob BowersHow often does you AD forest synchronize between Domain Controllers?
Check if the new groups are available on all domain controllers, and if all
the members are in the groups. SOmetimes the synchronization / replication
between dcs can be a bit slow, and if your Reporting Services server checks
access rights against a dc that haven't received the changes, it won't allow
access.
Kaisa M. Lindahl Lervik
"Rob Bowers" <RobBowers@.discussions.microsoft.com> wrote in message
news:12DE78CF-BE2C-4FC5-8111-DD3D9EF826DF@.microsoft.com...
> Is there a way to do an AD Synch in Sql Reporting Services?
> In short Groups have been created in AD. Roles were also setup in SQL
> Reporting for the folder that we wanted permissions applied to.
> When I add a person to a global group in AD, the permissions will not work
> in SQL Reporting. The user does not see the reports. If I add the person
> individually - ex. User 123 - and give them the same permissions as the
> Global Group, the user sees the folder.
> We want to set up different departments with unique folders for their
> reports. I want to be able to add Global Group roles to each folder. I
> restarted the IIS services - still did not work. I also restarted the SQL
> reporting services - still did not work.
> --
> Rob Bowers|||How does the synch get "triggered"
If I manually wanted to do an AD synch to SQL Reporting Services...how would
I do this?
"Kaisa M. Lindahl Lervik" wrote:
> How often does you AD forest synchronize between Domain Controllers?
> Check if the new groups are available on all domain controllers, and if all
> the members are in the groups. SOmetimes the synchronization / replication
> between dcs can be a bit slow, and if your Reporting Services server checks
> access rights against a dc that haven't received the changes, it won't allow
> access.
> Kaisa M. Lindahl Lervik
> "Rob Bowers" <RobBowers@.discussions.microsoft.com> wrote in message
> news:12DE78CF-BE2C-4FC5-8111-DD3D9EF826DF@.microsoft.com...
> > Is there a way to do an AD Synch in Sql Reporting Services?
> >
> > In short Groups have been created in AD. Roles were also setup in SQL
> > Reporting for the folder that we wanted permissions applied to.
> >
> > When I add a person to a global group in AD, the permissions will not work
> > in SQL Reporting. The user does not see the reports. If I add the person
> > individually - ex. User 123 - and give them the same permissions as the
> > Global Group, the user sees the folder.
> >
> > We want to set up different departments with unique folders for their
> > reports. I want to be able to add Global Group roles to each folder. I
> > restarted the IIS services - still did not work. I also restarted the SQL
> > reporting services - still did not work.
> >
> > --
> > Rob Bowers
>
>|||This article describes how to "Force replication over a connection"
http://technet2.microsoft.com/WindowsServer/en/library/2d89f34a-b6db-4b8d-ab9f-c081c53658d61033.mspx?mfr=true
You probably have to talk to the infrastructure team at your company, they
might be a bit reluctant to allow a developer mess around in their AD tools.
;)
Replication usually occurs at scheduled intervals between the Domain
Controllers. Reporting Services just uses what ever infomation that is
available to it. So you don't synchronize AD and Reporting Services, you
synchronize the different domain controllers in your AD domain, and then
Reporting Services will sort itself out. If some of the domain controllers
can't replicate or synchronize, your infrastructure team probably has a
bigger problem on their hands than just some users not seeing their
reports...
Kaisa M. Lindahl Lervik
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:0AD8DFD7-3E7D-4135-B8D8-7B1C0AD2F686@.microsoft.com...
> How does the synch get "triggered"
> If I manually wanted to do an AD synch to SQL Reporting Services...how
> would
> I do this?
> "Kaisa M. Lindahl Lervik" wrote:
>> How often does you AD forest synchronize between Domain Controllers?
>> Check if the new groups are available on all domain controllers, and if
>> all
>> the members are in the groups. SOmetimes the synchronization /
>> replication
>> between dcs can be a bit slow, and if your Reporting Services server
>> checks
>> access rights against a dc that haven't received the changes, it won't
>> allow
>> access.
>> Kaisa M. Lindahl Lervik
>> "Rob Bowers" <RobBowers@.discussions.microsoft.com> wrote in message
>> news:12DE78CF-BE2C-4FC5-8111-DD3D9EF826DF@.microsoft.com...
>> > Is there a way to do an AD Synch in Sql Reporting Services?
>> >
>> > In short Groups have been created in AD. Roles were also setup in SQL
>> > Reporting for the folder that we wanted permissions applied to.
>> >
>> > When I add a person to a global group in AD, the permissions will not
>> > work
>> > in SQL Reporting. The user does not see the reports. If I add the
>> > person
>> > individually - ex. User 123 - and give them the same permissions as the
>> > Global Group, the user sees the folder.
>> >
>> > We want to set up different departments with unique folders for their
>> > reports. I want to be able to add Global Group roles to each folder.
>> > I
>> > restarted the IIS services - still did not work. I also restarted the
>> > SQL
>> > reporting services - still did not work.
>> >
>> > --
>> > Rob Bowers
>>

Sunday, February 12, 2012

Ad hoc reporting Model and Security Filters

I am having some problems with creating security filters.

The way my system is setup is that I have a main table that contains all my data. I also have a security table that tells me what records each user has access to. I created an entity for my security filter and have a security filter defined that limits the data to the rows that have the logged on users id. This works fine if I look at the data I see the rows that are for the signed on user. Next I created a filter on my main table that limits the rows to the rows the user has access to. I did this by setting up another filter that says the UserCode from the main table must equal the user code from the security table. (I did this by right clicking and choosing edit as formula). This will then limit my data to the rows this user has access to. This all works but it is very slow. I captured the sql code that was running and noticed that the filter was doing a left outer join on my security table and joining on the unfiltered code then using a where clause to limit the data. When I run this logic it basically does a scan of my main table. If I change this join to be an inner join and join on the filtered data my results come back quickly.

Now to my question. Is this the way the system should work? Am I doing something wrong? Are there other ways to do this?

Thanks in advance for any help.Any success on the security filters? Mind sharing how do you exactly implement this? These security filters are really hard to understand and implement for me.

Ad hoc reporting Model and Security Filters

I am having some problems with creating security filters.

The way my system is setup is that I have a main table that contains all my data. I also have a security table that tells me what records each user has access to. I created an entity for my security filter and have a security filter defined that limits the data to the rows that have the logged on users id. This works fine if I look at the data I see the rows that are for the signed on user. Next I created a filter on my main table that limits the rows to the rows the user has access to. I did this by setting up another filter that says the UserCode from the main table must equal the user code from the security table. (I did this by right clicking and choosing edit as formula). This will then limit my data to the rows this user has access to. This all works but it is very slow. I captured the sql code that was running and noticed that the filter was doing a left outer join on my security table and joining on the unfiltered code then using a where clause to limit the data. When I run this logic it basically does a scan of my main table. If I change this join to be an inner join and join on the filtered data my results come back quickly.

Now to my question. Is this the way the system should work? Am I doing something wrong? Are there other ways to do this?

Thanks in advance for any help.Any success on the security filters? Mind sharing how do you exactly implement this? These security filters are really hard to understand and implement for me.