|
Home > Archive > MS SQL Server > August 2005 > prob with sql
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Dear all,
i have server wihch is running sql server
and users are using it .
now i want to change
the server name . if i change server name
sql server name will remain or not ?
if it remains then how can i change it ?
coz users regiseter it by name ..
any help will be appreicated .......
| |
| John Bell 2005-08-31, 3:23 am |
| Hi
If you change the network name of the server, sql server will need to be
updated by
dropping the old server and re-adding the new one. Try something like the
following using Query Analyser on the server:
DECLARE @server sysname, @newservern
ame sysname
SELECT @server = @@SERVERNAME, @newservername = HOST_NAME()
SELECT @@SERVERNAME AS [Old Server Name]
EXEC ( 'sp_dropserver ' + @server )
EXEC ( 'sp_addserver ' + @newservername + ', local' )
GO
SELECT @@SERVERNAME AS [New Server Name]
John
"Vivek" wrote:
> Dear all,
> i have server wihch is running sql server
> and users are using it .
> now i want to change
> the server name . if i change server name
> sql server name will remain or not ?
> if it remains then how can i change it ?
> coz users regiseter it by name ..
> any help will be appreicated .......
>
>
>
| |
| doller 2005-08-31, 7:23 am |
| Hi,
I u will change the name of the registration name of the sql srever
then it will not effect . but if u have created a linked server then u
have to drop it and recreate it again.
from
sufian
John Bell wrote:[color=darkred
]
> Hi
>
> If you change the network name of the server, sql server will need to be
> updated by
> dropping the old server and re-adding the new one. Try something like the
> following using Query Analyser on the server:
>
> DECLARE @server sysname, @newservern
ame sysname
>
> SELECT @server = @@SERVERNAME, @newservername = HOST_NAME()
> SELECT @@SERVERNAME AS [Old Server Name]
>
> EXEC ( 'sp_dropserver ' + @server )
>
> EXEC ( 'sp_addserver ' + @newservername + ', local' )
> GO
>
> SELECT @@SERVERNAME AS [New Server Name]
>
> John
>
> "Vivek" wrote:
>
|
|
|
|
|