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.
Author |
Topic |
farshad
Starting Member
10 Posts |
Posted - 2004-06-09 : 02:18:28
|
HiI want to know what is command that i add to the Query Analyzer untili tell to the database that it Shrink my DB every 1 dayI know it can be done from all Tasks > Shrink Database ..i want to know how can i schedule the shrink processThe command is this : DBCC SHRINKDATABASEBut i want to know the Code commands for that for using in Query Analyzer that i can schedule the shrink processThanks |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-06-09 : 02:43:37
|
Create a job in the SQL Server agent. This will shrink the DB as often as you want.Tim |
|
|
farshad
Starting Member
10 Posts |
Posted - 2004-06-09 : 03:25:40
|
how can i creat a job using the Query AnalyzerThanks |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-06-09 : 19:11:23
|
Check out BOL.The sp's you need are:Execute sp_add_job to create a job.Execute sp_add_jobstep to create one or more job steps.Execute sp_add_jobschedule to create a job schedule. HTH,TIm |
|
|
|
|
|