Saturday, February 11, 2012

about exec sp_dropserver

hello, i have on error for the configurepublishing and subscribers
the error message was:
SQL Server Enterprise Manager could not complete the wizard because
@.@.SERVERNAME for '' is null.
Use sp_addserver to set @.@.SERVERNAME.
but it on the query analyze type the command to view my @.@.SERVERNAME in
sysservers
use master
select * from master.dbo.syservers
i can view my servername in the recordset row..
so ...i want to use sp_dropserver to delete at first, and rebuild the record
to use sp_addserver the old servername
but when i type such below command in query analyzes windows..
use master
exec sp_dropserver 'ns'
.......but .........i have connect the server at first so have error
such as ...
Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44
There are still remote logins for the server 'ns'.
so...what can i use the rebuild the @.@.SERVERNAME is not null...
========================================
ps.i use the MS_SQL_7.0 Version
Thank you very much!!!!
Try this script:
Use Master
go
Sp_DropServer 'ns' , 'droplogins'
GO
Use Master
go
Sp_Addserver 'ns', 'local'
GO
Stop and Start SQL Services
Afterwards, you'll need to recreate your remote logins.
HTH,
Paul Ibison
|||i use remote control in the windows system...to operate this job..
and i go those command in the query analyzes it is error below:
Server: Msg 20582, Level 16, State 1, Line 1
Cannot drop server 'ns' because it is used as a Publisher in replication.
Server: Msg 15028, Level 16, State 1, Line 1
The server 'ns' already exists.
but i in the SQL Server Enterprise Manager can't view the Publisher or
Subscriptor in the windows but i can't find the security -> remote server it
is have tow server name
one is ns
two is repl_distributor
but i can't delete the ns or repl_distributor
when i del it,it will show error message below:
Error 20582: Cannot drop server 'NS' because it is used as a Publisher in
replication.
Error 15190:There are still remote logins for the server 'repl_distributor'.
================================
thank for help.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> ะด?
news:e31WN6yYEHA.644@.tk2msftngp13.phx.gbl...
> Try this script:
> Use Master
> go
> Sp_DropServer 'ns' , 'droplogins'
> GO
> Use Master
> go
> Sp_Addserver 'ns', 'local'
> GO
> Stop and Start SQL Services
> Afterwards, you'll need to recreate your remote logins.
> HTH,
> Paul Ibison
>
|||OK - go to the distributor properties (right-click replication monitor, select properties, select the publishers tab) and disable ns as a publisher then run my script.
HTH,
Paul Ibison

1 comment:

Unknown said...

You are da man !

I spend all the morning and part of the afternoon to find s solution, I read so many web pages but only your solution worked for me.

Post a Comment