revilord
Programmer
- Oct 2, 2003
- 64
I have a table that, through a trigger on another table, is being writen to constantly by users, I want to rename it and then recreate the table because it is getting too big. When I say big I mean millions of records.
Background
There was a maintenenance script writen to be run nightly to keep this table under control but fun enough it was removed from the maintenance script. Running the script now will cause the maintenenance script to run for days.
Question
This is my process
EXEC sp_rename BIG_TABLE, BIG_TABLE_BACKUP
select * BIG_TABLE from BIG_TABLE_BACKUP where 1=2
Do I need to stop users from accessing BIG_TABLE before I rename it.
Background
There was a maintenenance script writen to be run nightly to keep this table under control but fun enough it was removed from the maintenance script. Running the script now will cause the maintenenance script to run for days.
Question
This is my process
EXEC sp_rename BIG_TABLE, BIG_TABLE_BACKUP
select * BIG_TABLE from BIG_TABLE_BACKUP where 1=2
Do I need to stop users from accessing BIG_TABLE before I rename it.