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
 General SQL Server Forums
 New to SQL Server Programming
 how can reduce the my MSDB databse size

Author  Topic 

boreddy
Posting Yak Master

172 Posts

Posted - 2009-04-10 : 07:46:27
My server have many databases some of the databases are not using some using, my msdb database size is very high and free space is very less
That’s why
i deleted the databases which are not using now

i run this procedure sp_delete_backuphistory

By doing this i got some extra free space
How can get all free space of MSDB database
Please help me

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2009-04-10 : 09:29:31
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=59972

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210
scroll down to Shrink Database / Files

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL or How to sell Used Cars
For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2009-04-10 : 10:31:02
Also, if you are using SQL 2005 and database mail feature

-- delete old mail items
EXEC msdb.dbo.sysmail_delete_mailitems_sp @sent_before = "datehere"

-- delete the log of the sent items
EXEC msdb.dbo.sysmail_delete_log_sp @logged_before = "datehere"

-- delete the job history log
EXEC msdb.dbo.SP_PURGE_JOBHISTORY @oldest_date = "datehere"
Go to Top of Page
   

- Advertisement -