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 2008 Forums
 Transact-SQL (2008)
 create a special stored procedure

Author  Topic 

vahidam
Starting Member

13 Posts

Posted - 2010-07-21 : 04:32:10
hi all
i'm going to create a sp or function that perform this actions:
1: add a new filegroup to my DB
2: rename a table
3: move the renamed table to the new filegroup
4: create a new table on PRIMARY file group with a structure same as moved table
i can do steps 1,3,4 but my problem is in step 2 .the sp for rename
object (sp_rename) breaks scripts an stored procedures????

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2010-07-21 : 05:23:45
Why are you doing this in a stored procedure/function?
I'd perform these maintenance/once-off tasks in a script.



Go to Top of Page

vahidam
Starting Member

13 Posts

Posted - 2010-07-21 : 05:36:39
thanks ,but these actions must be perform frequently and automaticly,every month after a special condition
Go to Top of Page
   

- Advertisement -