Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Delete a column XYZ from a table ABC which is a part of merge replication Expand / Collapse
Author
Message
Posted Thursday, December 12, 2013 5:44 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 3:49 AM
Points: 32, Visits: 135
Guys,

I have a task to delete a column XYZ from a table ABC. It is not a having any constraints on it, Its datatype is UNIQUEIDENTIFIER, I have done some research and come up with below script:

--**********************************************
declare @tbl sysname
declare @col sysname
set @tbl='ABC'
set @col='XYZ'

exec sp_repldropcolumn @tbl, @col
--**********************************************
I am a database developer and not a DBA. I plan to take a backup before running is but I cannot test this beforehand. Need to run directly on prod. Kindly assist with what can go wrong with this, or if some other approach is more suitable? Precautions, etc.

Thanks
Gaurav
Post #1522257
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse