Showing posts with label dropping. Show all posts
Showing posts with label dropping. Show all posts

Sunday, March 11, 2012

Change column length

Can you alter a column and make it longer without dropping the columnFound the script!

change column length

Is there any tricks to change a column length in a table participating transaction replication? Is there any 'work around' without dropping & re-creating the articles?
i am aware of adding a new column (sp_repladdcolumn) and dropping an existing column (sp_repldropcolumn)
TIA
MoorthyYou can try an Alter Table statement to update the column. Test this out on a new publication before you alter the production table.||||
| You can try an Alter Table statement to update the column. Test this
out on a new
| publication before you alter the production table.
--
You can't use ALTER TABLE to change column properties on a table
participating in replication. From Books Online:
Schema Changes on Publication Databases
"Important Schema changes to a published table must be made only through
the replication publication properties dialog box in SQL Server Enterprise
Manager or through replication stored procedures. Do not make schema
changes to published tables using the SQL ALTER TABLE statements in a tool
such as SQL Query Analyzer or by using SQL Server Enterprise Manager visual
database tools. Changes made to the schema of a published table using these
tools will not be propagated to Subscribers."
A workaround to this limitation would be to:
1. add a new column, using replication stored procedures
2. update the new column with contents of old column
3. drop the old column. using replication stored procedures
Hope this helps,
--
Eric Cárdenas
SQL Server support

Thursday, March 8, 2012

Change a Pull Subscription to a Push Subscription?

Is there a way to change a subscription from a Pull subscription to a Push
subscription without dropping it and creating a new one? This is in SQL
Server 2000 using transactional replication.
Thanks
No, not without considerable hacking, the likes of which I am unwilling to
even attempt
What you could do is kick everyone off your publication database, drop the
push subcription, create the pull subscription and then allow the users back
onto the publication database.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"John" <someone@.microsoft.com> wrote in message
news:eeD7UwJrEHA.2948@.TK2MSFTNGP11.phx.gbl...
> Is there a way to change a subscription from a Pull subscription to a Push
> subscription without dropping it and creating a new one? This is in SQL
> Server 2000 using transactional replication.
> Thanks
>