Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Server name versus sql server name

Author  Topic 

sand-lakes1
Starting Member

29 Posts

Posted - 2003-08-20 : 09:49:38
I am a little bit confused concerning server and sql server name. Is it true that the sql server name and the os server name always are the same ? For example "My server is named 'Johnno' ; should the sql server also be 'Johnno'. I would like to have it this way. Server name remains the same and sql gets the name 'SQLJOHNNO'.....

Help will be appreciated.

thanks in advance

mr_mist
Grunnio

1870 Posts

Posted - 2003-08-20 : 09:59:49
You can call the server instance whatever you like. It does not have to be the same as the server name.

-------
Moo. :)
Go to Top of Page

sand-lakes1
Starting Member

29 Posts

Posted - 2003-08-20 : 10:26:53
quote:
Originally posted by mr_mist

You can call the server instance whatever you like. It does not have to be the same as the server name.
-------
Moo. :)



Ok, I changed the instance name through
sqlservr -f
sp_dropserver 'Johnno'
go
sp_addserver 'Sqljohnno', local
sqlservr -f

reboot server

When trying to connect to sqljohnno this doesn't work..... Getting a bit tired of having this done asap.

All this has to be done, because we will be upgrading a machine from nt 4 to win2k and the name will change. To avoid problems I would like to keep my current sql instance name.....

thanks for the help
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2003-08-20 : 10:30:14
You would need to connect to servermame\instancename

Is that what you are doing?

-------
Moo. :)
Go to Top of Page

sand-lakes1
Starting Member

29 Posts

Posted - 2003-08-20 : 10:41:01
I tried to connect to ''John\sqljohnno' and sqljohnno but it doesn't work ... Just want to prevent users and sysadmin from having lots of extra work, because the name changes.....

Isn't it possible to work with an alias to which access and web can connect to the new server name ?

thanks

John
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-08-20 : 10:43:53
You can install one default instance which will be svrname and many named instances which will be svrname\instancename.

sp_addserver doesn't change the name of the server you connect to - just that reported in logs and returned by @@servername

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-08-20 : 10:47:29
To the best of my knowledge, the only time the OS machine name differs from the name by which you refer to the SQL Server (assuming only a default instance), is in a clustered environment.

If you change the machine name of the server, after installing SQL, there are steps that you need to take. It's been a while, but I know I've found those steps on the microsoft website.

Jay White
{0}
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-20 : 12:16:14
quote:
Originally posted by sand-lakes1

I tried to connect to ''John\sqljohnno' and sqljohnno but it doesn't work ... Just want to prevent users and sysadmin from having lots of extra work, because the name changes.....

Isn't it possible to work with an alias to which access and web can connect to the new server name ?

thanks

John



Yes you can use an alias. You can set one up using Client Network Utility in the Microsoft SQL Server program group. Search this site on Client Network Utility for examples of how to do it.

Also, isn't your server named Johnno and not John as you tried above?

Tara
Go to Top of Page

sand-lakes1
Starting Member

29 Posts

Posted - 2003-08-21 : 04:28:08
quote:
Originally posted by tduggan

quote:
Originally posted by sand-lakes1

I tried to connect to ''John\sqljohnno' and sqljohnno but it doesn't work ... Just want to prevent users and sysadmin from having lots of extra work, because the name changes.....

Isn't it possible to work with an alias to which access and web can connect to the new server name ?

thanks

John



Yes you can use an alias. You can set one up using Client Network Utility in the Microsoft SQL Server program group. Search this site on Client Network Utility for examples of how to do it.

Also, isn't your server named Johnno and not John as you tried above?

Tara



Ok, alias has been set up on server Johnno. When I use this alias on server Johnno with Enterprise Manager this works. Should it be possible for all clients now to connect to alias SQLJOHNNO without creating a 'client network utility' on their workstation ??

Or is a separate 'client network utility' on every workstation necessary with the alias SQLJOHNNO in it ?

and indeed the server name is Johnno instead of John

thanks for the help folks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-21 : 12:21:14
Each client will need to have an alias setup. When you setup an alias in Client Network Utility, it just adds it to the registry. Since registries are machine specific, each machine will need the alias. You could deploy the alias though through a login script, or just send a reg file to each person and have them double click on it to add it. You'll find the alias located here:

HKLM\Software\Microsoft\Microsoft SQL Server\MSSQLSERVER\Client\ConnectTo

Tara
Go to Top of Page

sand-lakes1
Starting Member

29 Posts

Posted - 2003-08-22 : 03:16:02
quote:
Originally posted by tduggan

Each client will need to have an alias setup. When you setup an alias in Client Network Utility, it just adds it to the registry. Since registries are machine specific, each machine will need the alias. You could deploy the alias though through a login script, or just send a reg file to each person and have them double click on it to add it. You'll find the alias located here:

HKLM\Software\Microsoft\Microsoft SQL Server\MSSQLSERVER\Client\ConnectTo

Tara



So, when I reinstall a server (same devices) with sql server (same databases) on it and rebuild the master database and restore it, there will allways be a problem if the name of the server changes for people who have defined a connection string in a web page or access datbase.....?????

For example servername Johnno changes to Johnyes. All clients who attempt to access sql server will have to change connection strings into Johnyes.

For this I would like to use an alias, but what I understand I will have to install a registry entry on all client machines.

Most perfect solution would be an alias behind the servername which is covering the old machinename. Any ideas ??

Maybe something is possible in the network environment. Looking for possibilities.

thanks for the help
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-08-22 : 12:14:54
You could use the IP address in the alias instead of the server name that way when the server name changes the alias will still work.

Tara
Go to Top of Page

sand-lakes1
Starting Member

29 Posts

Posted - 2003-08-25 : 10:23:32
Think I created a solution within DNS. In Dns i created an alias called SQLJOHNNO for server JOHNNO. After several tests I think my conclusion is that this is the solution for me, because all connections strings pointing to SQLJOHNNO (for a long time, because the servername right now is sqljohnno) in the new situation are working....

That is good new. Registrated the server in enterprise manager, no problem. Odbc no problem. visual basic no problem.

thanks to all for their help.
Go to Top of Page
   

- Advertisement -