Is there any sort of check that can be done to see if a particular instance
of SQL Server is present? I already call a method to check for connection --
if no connection, I have the user re-enter server settings (server name and
database name). But the connection check is made by calling for a scalar
value in the database. What I'd rather do is graduate the error messages:
1. No server installed
2. Specified database name not installed
3. Specfied table or sproc not available
Any thoughts?Earl
1) if not exists (select * from sysservers where svrname ='blblb')
print 'Server does not exist'
2) if not exists (select * from sysdatabases where name ='blblb')
print Database does not exist'
3) if object_id('test') is null
print 'An object does not exist'
"Earl" <brikshoe@.newsgroups.nospam> wrote in message
news:%23obJi4vLHHA.1008@.TK2MSFTNGP06.phx.gbl...
> Is there any sort of check that can be done to see if a particular
> instance of SQL Server is present? I already call a method to check for
> connection -- if no connection, I have the user re-enter server settings
> (server name and database name). But the connection check is made by
> calling for a scalar value in the database. What I'd rather do is graduate
> the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>|||Sure as shown on page 565, you can use the dbProviderFactories.GetFactory
method to return a list of (visible) servers based on a specific provider.
These same classes can be used to start, stop or pause the server service as
well (in addition to others).
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Earl" <brikshoe@.newsgroups.nospam> wrote in message
news:%23obJi4vLHHA.1008@.TK2MSFTNGP06.phx.gbl...
> Is there any sort of check that can be done to see if a particular
> instance of SQL Server is present? I already call a method to check for
> connection -- if no connection, I have the user re-enter server settings
> (server name and database name). But the connection check is made by
> calling for a scalar value in the database. What I'd rather do is graduate
> the error messages:
> 1. No server installed
> 2. Specified database name not installed
> 3. Specfied table or sproc not available
> Any thoughts?
>
Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts
Monday, March 19, 2012
Check for existence of server
Friday, February 10, 2012
Chaning an Instance name
Hi
I have a quick question about renaming an instance.
I used sp_dropserver and dropped the instance name
I used sp_addserver '<servername>, 'local' and changed the local instance
name.
After stopping and restarting the instance, i was able to connect to the new
instance name.
But i can still connect using the old instance name also.
I want to drop the old instance name completely.
How do i do that?
--Uday
See question number 5 in:
Frequently asked questions - SQL Server 2000 - multiple instances
http://support.microsoft.com/newsgroups/default.aspx
AMB
"Udayasree" wrote:
> Hi
> I have a quick question about renaming an instance.
> I used sp_dropserver and dropped the instance name
> I used sp_addserver '<servername>, 'local' and changed the local instance
> name.
> After stopping and restarting the instance, i was able to connect to the new
> instance name.
> But i can still connect using the old instance name also.
> I want to drop the old instance name completely.
> How do i do that?
> --Uday
I have a quick question about renaming an instance.
I used sp_dropserver and dropped the instance name
I used sp_addserver '<servername>, 'local' and changed the local instance
name.
After stopping and restarting the instance, i was able to connect to the new
instance name.
But i can still connect using the old instance name also.
I want to drop the old instance name completely.
How do i do that?
--Uday
See question number 5 in:
Frequently asked questions - SQL Server 2000 - multiple instances
http://support.microsoft.com/newsgroups/default.aspx
AMB
"Udayasree" wrote:
> Hi
> I have a quick question about renaming an instance.
> I used sp_dropserver and dropped the instance name
> I used sp_addserver '<servername>, 'local' and changed the local instance
> name.
> After stopping and restarting the instance, i was able to connect to the new
> instance name.
> But i can still connect using the old instance name also.
> I want to drop the old instance name completely.
> How do i do that?
> --Uday
Labels:
chaning,
database,
dropped,
hii,
instance,
ltservernamegt,
microsoft,
mysql,
namei,
oracle,
renaming,
server,
sp_addserver,
sp_dropserver,
sql
Chaning an Instance name
Hi
I have a quick question about renaming an instance.
I used sp_dropserver and dropped the instance name
I used sp_addserver '<servername>, 'local' and changed the local instance
name.
After stopping and restarting the instance, i was able to connect to the new
instance name.
But i can still connect using the old instance name also.
I want to drop the old instance name completely.
How do i do that?
--UdaySee question number 5 in:
Frequently asked questions - SQL Server 2000 - multiple instances
http://support.microsoft.com/newsgroups/default.aspx
AMB
"Udayasree" wrote:
> Hi
> I have a quick question about renaming an instance.
> I used sp_dropserver and dropped the instance name
> I used sp_addserver '<servername>, 'local' and changed the local instance
> name.
> After stopping and restarting the instance, i was able to connect to the new
> instance name.
> But i can still connect using the old instance name also.
> I want to drop the old instance name completely.
> How do i do that?
> --Uday
I have a quick question about renaming an instance.
I used sp_dropserver and dropped the instance name
I used sp_addserver '<servername>, 'local' and changed the local instance
name.
After stopping and restarting the instance, i was able to connect to the new
instance name.
But i can still connect using the old instance name also.
I want to drop the old instance name completely.
How do i do that?
--UdaySee question number 5 in:
Frequently asked questions - SQL Server 2000 - multiple instances
http://support.microsoft.com/newsgroups/default.aspx
AMB
"Udayasree" wrote:
> Hi
> I have a quick question about renaming an instance.
> I used sp_dropserver and dropped the instance name
> I used sp_addserver '<servername>, 'local' and changed the local instance
> name.
> After stopping and restarting the instance, i was able to connect to the new
> instance name.
> But i can still connect using the old instance name also.
> I want to drop the old instance name completely.
> How do i do that?
> --Uday
Chaning an Instance name
Hi
I have a quick question about renaming an instance.
I used sp_dropserver and dropped the instance name
I used sp_addserver '<servername>, 'local' and changed the local instance
name.
After stopping and restarting the instance, i was able to connect to the new
instance name.
But i can still connect using the old instance name also.
I want to drop the old instance name completely.
How do i do that?
--UdaySee question number 5 in:
Frequently asked questions - SQL Server 2000 - multiple instances
http://support.microsoft.com/newsgroups/default.aspx
AMB
"Udayasree" wrote:
> Hi
> I have a quick question about renaming an instance.
> I used sp_dropserver and dropped the instance name
> I used sp_addserver '<servername>, 'local' and changed the local instance
> name.
> After stopping and restarting the instance, i was able to connect to the n
ew
> instance name.
> But i can still connect using the old instance name also.
> I want to drop the old instance name completely.
> How do i do that?
> --Uday
I have a quick question about renaming an instance.
I used sp_dropserver and dropped the instance name
I used sp_addserver '<servername>, 'local' and changed the local instance
name.
After stopping and restarting the instance, i was able to connect to the new
instance name.
But i can still connect using the old instance name also.
I want to drop the old instance name completely.
How do i do that?
--UdaySee question number 5 in:
Frequently asked questions - SQL Server 2000 - multiple instances
http://support.microsoft.com/newsgroups/default.aspx
AMB
"Udayasree" wrote:
> Hi
> I have a quick question about renaming an instance.
> I used sp_dropserver and dropped the instance name
> I used sp_addserver '<servername>, 'local' and changed the local instance
> name.
> After stopping and restarting the instance, i was able to connect to the n
ew
> instance name.
> But i can still connect using the old instance name also.
> I want to drop the old instance name completely.
> How do i do that?
> --Uday
Labels:
chaning,
database,
dropped,
hii,
instance,
ltservernamegt,
microsoft,
mysql,
namei,
oracle,
renaming,
server,
sp_addserver,
sp_dropserver,
sql
Subscribe to:
Posts (Atom)