Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

RE: (local) vs. the actual name of SQL Server when using a named insta
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
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
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Nigel Rivett
01-29-06 06:23 PM


Re: (local) vs. the actual name of SQL Server when using a named insta
I 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
] 



Report this thread to moderator Post Follow-up to this message
Old Post
Leo
01-30-06 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 05:19 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006