@@servername的问题
安装了SQL Cluster
现在@@servername有些问题
Select @@servername
NULL
Select ServerProperty('ServerName')
SCL073CLU07FOI0
SCL073CLU07FOI0是virtual server的名字,如何才能把 @@servername恢复成 virutal server的名字呢?
用helpserver看了server的状态,结果如下:
sp_helpserver
repl_distributor SCL073CLU07FOI0 rpc,rpc out,system,use remote collation 2 NULL 0 0
SCL073CLU07FOI0 SCL073CLU07FOI0 rpc,rpc out,data access,use remote collation 1 NULL 0 0
select * from sys.servers
1 SCL073CLU07FOI0 SQL Server SQLNCLI SCL073CLU07FOI0 NULL NULL NULL 0 0 1 1 1 1 0 1 NULL 0 0 0 0 0 0 1 2008-11-11 05:39:01.390
2 repl_distributor SQL Server SQLNCLI SCL073CLU07FOI0 NULL NULL NULL 0 0 0 1 1 0 0 1 NULL 0 1 0 0 0 0 0 2008-11-11 05:39:01.400
sp_addserver 'SCL073CLU07FOI0', 'local'
Msg 15028, Level 16, State 1, Procedure sp_addserver, Line 0
The server 'SCL073CLU07FOI0' already exists.
做了下面这些尝试,都没成功
尝试1:
sp_dropserver 'SCL073CLU07FOI0', 'droplogins'
Cannot drop server 'SCL073CLU07FOI0' because it is used as a Publisher in replication.
exec sp_dropdistpublisher @publisher = 'all'
go
Could not find the Distributor or the distribution database for the local server. The Distributor may not be installed, or the local server may not be configured as a Publisher at the Distributor.
尝试2:
Sp_dropdistributor 1,1
The Distributor is not installed.
sp_removedbreplication
succussefully executed
sp_dropserver 'SCL073CLU07FOI0', 'droplogins'
Cannot drop server 'SCL073CLU07FOI0' because it is used as a Publisher in replication.
尝试3:
sp_serveroption 'SCL073CLU07FOI0', 'pub', 'false'
go
Command(s) completed successfully.
sp_dropserver 'SCL073CLU07FOI0', 'droplogins'
go
Cannot drop server 'SCL073CLU07FOI0' because it is used as a Publisher in replication.
到底应该怎么做呢?