Could not update the distribution database subscription table. The subscription status could not be changed.
2017-02-09 14:50
471 查看
在一个测试服务器删除发布(Publication)时遇到下面错误,具体如下所示
其实这个环境是克隆过来,生产服务器是配置过发布订阅,复制克隆后,修改过服务器名称,另外在实际服务器上,并没有真的订阅这个Publication,当然这个测试环境的复制可能还被人折腾过。这个就是我当前案例的环境。
遇到这个错误时,可以使用下面脚本删除所有Subcrition后,
然后手工删除分发服务器(当然也可以使用下面脚本删除,根据实际情况,修改对应的数据库名称)。
标题:MicrosoftSQLServerManagementStudio
------------------------------
Couldnotdeletepublication'RPL_GES_MIS_QCSDB'.
------------------------------
其他信息:
AnexceptionoccurredwhileexecutingaTransact-SQLstatementorbatch.(Microsoft.SqlServer.ConnectionInfo)
------------------------------
'xxxxx'isnotdefinedasaSubscriberfor'xxxx\xxxx'.
Couldnotupdatethedistributiondatabasesubscriptiontable.Thesubscriptionstatuscouldnotbechanged.
Changeddatabasecontextto'xxxx'.(MicrosoftSQLServer,错误:20032)
其实这个环境是克隆过来,生产服务器是配置过发布订阅,复制克隆后,修改过服务器名称,另外在实际服务器上,并没有真的订阅这个Publication,当然这个测试环境的复制可能还被人折腾过。这个就是我当前案例的环境。
遇到这个错误时,可以使用下面脚本删除所有Subcrition后,
USEDataBaseName;
GO
EXECsp_dropsubscription
@publication=N'RPL_GES_MIS_QCSDB',--根据具体情况填写Publication名称
@article=N'all',
@subscriber=N'all',
@ignore_distributor=1;
然后手工删除分发服务器(当然也可以使用下面脚本删除,根据实际情况,修改对应的数据库名称)。
useDatabaseName;
GO
execsp_droppublication@publication=N'RPL_GES_MIS_QCSDB',@ignore_distributor=1
execsp_helpreplicationdboption@dbname=N'DatabaseName',@reserved=1
use[DatabaseName]
execsp_helppublication
use[DatabaseName]
execsp_replicationdboption@dbname=N'DatabaseName',@optname=N'publish',@value=N'false'
相关文章推荐
- ArcSDE10.x创建企业级地理数据库报:The geodatabase system table could not be created.GDB_Items : Error (-51)
- apt update error "E: The package lists or status file could not be parsed or opened."
- sqlserver2005的配置。(Connections could not be acquired from the underlying database)
- the security settings could not be applied to the database (error 1045 MySQL)
- 连接数据库出现:Connections could not be acquired from the underlying database
- SqlServer2005 恢复数据库时出现Exclusive access could not be obtained because the database is in use 的解决方法
- Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
- 连接数据库出现:Connections could not be acquired from the underlying database
- 解决c3p0:Connections could not be acquired from the underlying database!
- adstpall.sh: Database connection could not be established. Either the database is down or the APPS c
- [Solved]: System.Data.SqlClient.SqlError: Exclusive access could not be obtained because the database is in use.
- the security settings could not be applied to the database
- 连接数据库出现:Connections could not be acquired from the underlying database
- ORA-16796: one or more properties could not be imported from the database [ID 358040.1]
- sql中:The database could not be exclusively locked to perform the operation. 错误处理
- Connections could not be acquired from the underlying database!原因及解决办法
- ORA-16796: one or more properties could not be imported from the database [ID 358040.1]
- Error: the database could not be exclusively locked to perform the operation[解决办法]
- The database could not be exclusively locked to perform the operation(SQL Server 5030错误解决办法)
- win7 mysql 安装 报The security settings could not be applied to the database