Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 adding new field to production

Author  Topic 

csphard
Posting Yak Master

113 Posts

Posted - 2005-09-12 : 12:44:08
If I add a new field to a database that currently in use what would be the affect?

This will not stop updates that are happening at the same time will it?

X002548
Not Just a Number

15586 Posts

Posted - 2005-09-12 : 12:51:02
Sure, it will hold an exclusive lock on the table for the length of time it takes.

And it's column, not field.

How many rows in the table?

There are different way to do these things though.



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

csphard
Posting Yak Master

113 Posts

Posted - 2005-09-12 : 13:12:41
There are 45003 rows.
I was going to do this using enterprise manager (design table)

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-09-12 : 13:22:47
Save the script changes in EM but don't say yes to saving the change.

Take the code you get from that and turn it in to a stored procedure.

Schedule the stored procedure to run "off-hours" if there is such a thing, and make sure you have error handling in there if the script doesn't



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

homebrew
Posting Yak Master

114 Posts

Posted - 2005-09-12 : 14:50:54
As standard procedure, whenever you make changes in Production, be sure you have a current backup. I also like to archive a copy of the table as a "before" copy, just in case something goes wrong ... for example, your finger slips & you delete the table by mistake !!
Go to Top of Page
   

- Advertisement -