Re: Returning the Server Name

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Dinesh T.K (tkdinesh_at_nospam.mail.tkdinesh.com)
Date: 04/28/04


Date: Wed, 28 Apr 2004 21:49:53 +0530


..and its available only from SQL2000.

--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Hari Prasad" <hari_prasad_k@hotmail.com> wrote in message
news:uJvnBqTLEHA.1340@TK2MSFTNGP12.phx.gbl...
> Hi ,
>
> You can also use the serverproperty function.
>
> select serverproperty('ServerName')
>
> Note:
> This scenario is useful when there are multiple instances of SQL Server
> installed on a Windows NT server, and the client needs to open another
> connection to the same instance used by the current connection
>
> Thanks
> Hari
> MCDBA
>
>
> "Zach Wells" <no_zwells_spam@ain1.com> wrote in message
> news:#Q7#MVTLEHA.2576@TK2MSFTNGP12.phx.gbl...
> > Peter wrote:
> >
> > > Hello,
> > >
> > > Is there a quick and easy way of returning the server
> > > name ?
> > >
> > > Thanks for your time
> > > Peter
> >
> > Yes: SELECT @@SERVERNAME
> >
> >
> > Be sure to check out books online, this is documented there.
> >
> > Zach
>
>


Relevant Pages

  • Re: accessing data mining model via web/PDA
    ... Is your OPENROWSET clause connecting to a SQL Server 2000 database? ... Is your SQL Server instance running on the same machine as your Analysis ... i need some> help for the connection string, let say to access the> mining model in the AS. ...
    (microsoft.public.sqlserver.datamining)
  • Re: VB Express SQL Express Remote Connection
    ... Yes I can connect using the SQL Server Management Studio Express Tool. ... I changed my connection to exactly what you specified and it connected. ... I can connect and create databases on the Remote Server ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to Direct connect with ActiveSync
    ... That won't work because you have a connection string that can't be correct. ... You're saying that the database is, but it's not; ... Server 2000, Visual Studio 2008. ... Again sorry if this should be in another form but you say that SQL Server ...
    (microsoft.public.sqlserver.ce)
  • .Net Scalability problem
    ... I finished a Great project using .Net and SQL Server and .Net Mobile ... Million concurrent users ... So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.sqlserver.connect)
  • Re: Communication Link Failure Error
    ... On disconnection from the network, in my code I changed the connection ... string to use SQLOLEDB and sent a SQL query to SQL server which failed as ... unplug the network cable from the client machine and put the cable ...
    (microsoft.public.data.ado)