【SQLServer】“无法对数据库'XXX' 执行删除,因为它正用于复制
? ? ? ? ? ? ? ? 从今天起,把编程中遇到的所有问题都记录下来,以便今后参考,以及方便网友查阅,希望我的问题可以帮助到很多志同道合的人们,我也是受很多前辈的提点,一步一步走来,希望大家都不要吝啬,将自己遇到的问题记录下来, 因为 你的一个记录,
?
?
?
?
?
?
?
?
从今天起,把编程中遇到的所有问题都记录下来,以便今后参考,以及方便网友查阅,希望我的问题可以帮助到很多志同道合的人们,我也是受很多前辈的提点,一步一步走来,希望大家都不要吝啬,将自己遇到的问题记录下来,因为你的一个记录,也许就节省了别人很多的时间!希望有一天,我们能做到世界最好!
--------------------------------------------------------------------------------------------------
?
关于这个错误,是因为我今天在服务器上想把数据库复制到本地,使用了“发布、订阅”方案,结果还没成功……尴尬……后来,我就直接把服务器上的mdf和ldf文件都直接拷到本地上了。后来在本地修改表名的时候出现了这个错误,说“无法对数据库'XXX'执行删除,因为它正用于复制”。
后来我也是查找了网上的一些方法,只需要执行?sp_removedbreplication?'XXX'?就可以了。
这个语句的解释是:从数据库中删除所有复制对象,但不更新分发服务器上的数据。此存储过程在发布服务器的发布数据库或订阅服务器的订阅数据库上执行。
具体不是特别理解,不过,至少能解决我的问题了!
?
?
转自:http://blog.sina.com.cn/s/blog_4b1fdc220100wiea.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

1. First of all, it is false to block and delete someone permanently and not add them permanently. If you want to add the other party after you have blocked them and deleted them, you only need the other party's consent. 2. If a user blocks someone, the other party will not be able to send messages to the user, view the user's circle of friends, or make calls with the user. 3. Blocking does not mean deleting the other party from the user's WeChat contact list. 4. If the user deletes the other party from the user's WeChat contact list after blocking them, there is no way to recover after deletion. 5. If the user wants to add the other party as a friend again, the other party needs to agree and add the user again.

If the SQL Server installation fails, you can clean it up by following these steps: Uninstall SQL Server Delete registry keys Delete files and folders Restart the computer

1. Open the Douyin app, click [Message] at the bottom of the interface, and click the chat conversation entry that needs to be deleted. 2. Long press any chat record, click [Multiple Select], and check the chat records you want to delete. 3. Click the [Delete] button in the lower right corner and select [Confirm deletion] in the pop-up window to permanently delete these records.

The syntax differences between MySQL and SQL Server are mainly reflected in database objects, data types, SQL statements and other aspects. Database object differences include the storage engine and how filegroups are specified, and the creation of indexes and constraints. Data type differences involve differences in numeric types, character types, and date and time types. SQL statement differences are reflected in result set limitations, data insertion, update and delete operations, etc. Other differences include how identity columns, views, and stored procedures are created. Understanding these differences is important to avoid errors when using different database systems.

To delete a SQL Server database, please perform the following steps in sequence: 1. Log in to SQL Server Management Studio; 2. Expand the database node; 3. Right-click the database to be deleted; 4. Select "Delete"; 5. Confirm the deletion. Note: Deleting the database is irreversible, please make sure you have backed up important data and disconnected other objects.

The problem that SQL Server cannot be reinstalled due to incomplete deletion can be solved by following the following steps: manually delete files and registry entries; use SQL Server installation and uninstall tools; use third-party uninstall tools; check Windows Event Viewer; restart the computer; reinstall SQL Server.

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.
