How to remove column "rowguid" from table in SQL server 2008?
-
Dear all, My hosting server is using SQL server 2008 and it is using replication. I have copied the databases from hosting to restore in my laptop then i see all tables are attached with "rowguid" column, i want to remove it from all tables but it did not allow me to remove at all. How to resolve this problem??? please see the error message below: ======================================================== TITLE: Microsoft SQL Server Management Studio ------------------------------ Drop failed for Column 'rowguid'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ\_RTM).100402-1540+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+Column&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ It is invalid to drop the default constraint on the rowguid column that is used by merge replication. The schema change failed during execution of an internal replication procedure. For corrective action, see the other error messages that accompany this error message. The transaction ended in the trigger. The batch has been aborted. (Microsoft SQL Server, Error: 25005) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=25005&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ ================================================= :( I am looking forward to hear from you. regards, Han
-
Dear all, My hosting server is using SQL server 2008 and it is using replication. I have copied the databases from hosting to restore in my laptop then i see all tables are attached with "rowguid" column, i want to remove it from all tables but it did not allow me to remove at all. How to resolve this problem??? please see the error message below: ======================================================== TITLE: Microsoft SQL Server Management Studio ------------------------------ Drop failed for Column 'rowguid'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ\_RTM).100402-1540+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+Column&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ It is invalid to drop the default constraint on the rowguid column that is used by merge replication. The schema change failed during execution of an internal replication procedure. For corrective action, see the other error messages that accompany this error message. The transaction ended in the trigger. The batch has been aborted. (Microsoft SQL Server, Error: 25005) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=25005&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ ================================================= :( I am looking forward to hear from you. regards, Han
I just found a solution it helped me a lot now. To remove all ""rowguid" column from all table in SQL server which used replication you just run this script "exec sp_removedbreplication" in sql query and then all rowguid column will be deleted. thanks, Han :)