@@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.
到底应该怎么做呢?
现在@@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.
到底应该怎么做呢?
...全文
相关推荐
SQL Server 复制需要有实际的服务器名称才能连接到服务器
今天在做sql Server 2005的实验的时候碰到的问题,问题描述很清楚,怀疑是我以前给计算机修改了名称而导致的.可以用select @@servername和select serverproperty (‘servername’)对照一下,两个的结果是否一样,不一样就会出现问题,以下给出解决的SQL脚本 代码如下: if serverproperty(‘servername’) <> @@servername begin declare @server sysname set @server = @@servername exec sp_dropserver @server = @se
sql2005服务器更换计算机名称
数据库2005服务器修改用户名后,无法订阅问题修改。
SQL Server复制需要有实际的服务器名称才能连接到服务器
服务器上安装的WIN2008 R2,然后没有在意机器名,安装了SQL2008 R2数据库之后,配置AD域的时候修改了机器名
Windows Server 2003 和 SQL SERVER 2008 群集配置指南.doc
Windows Server 2003 和 SQL SERVER 2008 群集配置指南
数据库常用sql语句
1. 查看数据库的版本 select @@version 2. 查看数据库所在机器操作系统参数 exec master..xp_msver


疑难问题
