Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesReferencing (local) implies that you are creating a new connection. This connection won't know which instance the command comes from so will connect to the default instance. Is this bcp or osql? Can't think of another reason for it. If you want to connect to the same instance from an sp then use @@servername and put it in []. "Leo" wrote: > Hello, > > My question is this: in a named instance installation of a SQL Server, whe n > you reference the server as (local) from a Stored Procedure that accesses a > table for example, will that point to the Named Instance or will it access > the table on the actual database on the main installation? > > > > Thank you > > leo > > >
Post Follow-up to this messageI am actually running an Instance of SQL server on the same machine as an installation of SQL server. The reason for that is QA testing. When I make a change to the database I copy it to the instance os SQL on the same machine. I am using store procedures to run DTS packages. So I am doing a DTSRUN command on the package. On my SQL server I was using (local) as my server. The reason I asked was that I didn't want to go into the Instance of the SQL and change the name of the server on the stored procedures manually. I wanted the stored proc to pick up the name of the server it;s running on without manual changes to the code. I was affraid that if I leave that code unchanged as (local) that the stored proc will look for the wrong DTS package, meaning the one on the SQL server, not the one in the instance of SQL. I am not sure if I made this more confusing or more explained. in short I am trying to provide the samew functionality within one physical sever using an installation of a SQL instance, as if it was two separate physical servers, where you can reference (local) and whenever you more a stored proc from one server to the other you do not need to change that code to point to the right SQL server Thanks Leo "Nigel Rivett" < NigelRivett@discussi ons.microsoft.com> wrote in message news:15408704-EE37-4A96-97D2- 1BF39A6CE5AE@microso ft.com... > Referencing (local) implies that you are creating a new connection. This > connection won't know which instance the command comes from so will connect > to the default instance. > Is this bcp or osql? Can't think of another reason for it. > > If you want to connect to the same instance from an sp then use @@servername[color=d arkred] > and put it in []. > > "Leo" wrote: > when accesses a access[color=darkred ]
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread