Microsoft Sql Server Error 15051
Contents |
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums cannot rename the table because it is published for replication Answered by: Rename a column in a replicated table SQL
Sp_removedbreplication
Server > SQL Server Replication Question 0 Sign in to vote Hi, I tried to
Sql Server Remove Table From Replication
run this(below) the table is replicated(transactional). EXECUTE sp_rename N'dbo.Tablename.Columnname, N'New_Columnname', 'COLUMN'But getting this error message: Msg 15051, Level 11, State 1, Procedure sp_rename,
Cannot Alter Column 'name' Because It Is 'replicated'
Line 227 Cannot rename the table because it is published for replication. Thank You Friday, January 29, 2010 4:24 PM Reply | Quote Answers 1 Sign in to vote That is correct - you can't rename columns, however what you can do is to add a new column with the new name, update this column to have the same values as the old column, then drop the old column.looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941 Marked as answer by SQL_Jay Friday, January 29, 2010 5:14 PM Friday, January 29, 2010 4:50 PM Reply | Quote Moderator All replies 1 Sign in to vote That is correct - you can't rename columns, however what you can do is to add a new column with the new name, update this column to have the same values as the old column, then drop the old column.looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941 Marked as answer by SQL_Jay Friday, January 29, 2010 5:14 PM Friday, January 29, 2010 4:50 PM R
SERVER - FIX - ERROR : Cannot drop the database because it is being used for replication. (Microsoft SQL Server, Error: 3724) September 5, 2009Pinal DaveSQL, SQL Server, SQL Tips and Tricks31 commentsI have set up replication at many different organization. One error I quite commonly face is after I have removed replication I can not remove database. When I try to remove the database it gives me following error.Cannot drop the database because it is being used for replication. (Microsoft SQL Server, Error: 3724)Fix/Workaround/Solution:The solution is very simple. Create the empty database with the same name on another server/instance first. Take full back of the same and forced restore over this database.Do let me know if you have any https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e3238fa4-39f1-4d2d-93dc-d54be6536e9e/rename-a-column-in-a-replicated-table?forum=sqlreplication better idea or suggestion.Reference : Pinal Dave (http://blog.sqlauthority.com) Tags: SQL Error Messages, SQL Replication, SQL ScriptsRelated Articles SQL SERVER - Executing Remote Stored Procedure - Calling Stored Procedure on Linked Server October 6, 2007Pinal Dave SQL SERVER - FIX : Error 15023: User already exists in current database. February 15, 2007Pinal Dave SQL SERVER - 2016 - Check Value as JSON With ISJSON() February 26, 2016Pinal Dave 31 comments. Leave new Ted Krueger http://blog.sqlauthority.com/2009/09/05/sql-server-fix-error-cannot-drop-the-database-because-it-is-being-used-for-replication-microsoft-sql-server-error-3724/ September 5, 2009 6:31 pmBelieve I had this problem a year ago and the fix was to manually remove the subscriptions. There seemed to be entries left after the SSMS style deletion. Used sp_droppullsubscription on the subscriber and then to follow up cleaning on the publication sp_dropsubscriptionI'll test that out maybe later. This is coming from poor old guy memory ;-)Reply Nakul Vachhrajani September 5, 2009 9:51 pmHello!This is a nice, new way to trick the SQL Server into "forgetting" that a database is marked for replication - and is different than the one I am used to using; which has aroused my curiosity.The databases in the system that I sustain are typically configured in a replicating configuration with one publisher/distributor (our product does not support isolated publisher/distributor configuration) and n number of subscribers (highest count in production is 25). The high-level sequence that we typically follow during a server move and/or server rebuild is:1. Unregister the subscribers one by one 2. Uninstall the distributor 3. Remove the distribution DB 4. Uninstall publisher 5. Finally run sp_removedbreplication on all servers to remove any meta-data that the server might have remembered 6. Now, backup/remove the databasesMy question now is: what is the difference (internally) between sp_removedbreplication and the method described in this article?Have a great week-end and a
Discussions Activity Best Of... Unanswered Categories 62.5K All Categories73 General 73 Announcements 57.1K Microsoft Dynamics NAV 11.3K http://forum.mibuso.com/discussion/33989/nav-error-caused-by-sql-replication-process NAV Three Tier 37.1K NAV/Navision Classic Client 3.6K Navision Attain 2.2K Navision Financials 107 Navision DOS 828 Navision e-Commerce 532 NAV Tips & Tricks 728 NAV Dutch speaking only 580 NAV Courses, Exams & Certification 1.8K Microsoft Dynamics-Other 1.4K Dynamics AX 195 Dynamics CRM 96 Dynamics GP 5 Dynamics SL 1.4K Other 928 SQL General 354 sql server SQL Performance 24 SQL Tips & Tricks 17 Design Patterns (General & Best Practices) 0 Architectural Patterns 6 Design Patterns 2 Implementation Patterns 28 3rd Party Products, Services & Events 860 General 860 General Chat 1.5K Website 73 Testing 1.1K Download section 23 How Tos section 231 Feedback 12 NAV TechDays 2013 Sessions 13 NAV TechDays because it is 2012 Sessions Nav Error caused by SQL Replication process??? Simo_ba Member Posts: 78 2009-04-29 edited 2009-04-30 in SQL General Hi guys, I need your help to fix this issue,guys. I get an error message when I upload fob file to Nav that contain replicated tables, the error message is: Microsoft Dynamics NAV The following SQL Server error(s) occurred while accessing the Item Ledger Entry table: 3724,"42000",[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the view 'dbo.Test$Item Ledger Entry$VSIFT$2' because it is being used for replication. SQL: IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'dbo."Test$Item Ledger Entry$VSIFT$2"') AND OBJECTPROPERTY(id, N'IsView') = 1) DROP VIEW dbo."Test$Item Ledger Entry$VSIFT$2" OK I found Microsoft solution but it's not be applied to me sorry. ' Error occurs for objects that are replicated For objects that are replicated, remove the object from the publication before attempting to alter or drop it. If the publication has subscriptions, you must delete all subscriptions before removing the object from the publication. ' Thank you g