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
 msdbdat.mdf size increased

Author  Topic 

gauravkits
Starting Member

11 Posts

Posted - 2008-06-03 : 08:40:39
How to decrease msdbdat.mdf size? This is a bit urgent and it would be great if anyone can reply on this.

Gaurav Arora

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-03 : 08:53:15
DBCC SHRINKFILE
DBCC SHRINKDB

Take your pick. Examples and explanations are to be found in BOOKS ONLINE.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

gauravkits
Starting Member

11 Posts

Posted - 2008-06-03 : 09:06:53
I am very new to SQL server. Tell me with Syntax. It would be great.

Gaurav Arora
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-03 : 09:13:28
Syntax is found in BOOKS ONLINE, the Microsoft SQL Server help file.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-03 : 16:27:06
You may need delete old backup history with msdb..sp_delete_backuphistory first.
Go to Top of Page

gauravkits
Starting Member

11 Posts

Posted - 2008-06-04 : 08:07:34
Should sp_delete_backuphistory be run in off hours? Is it a safe option?

Gaurav Arora
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-07 : 00:46:38
It's safe and you can run it any time, will not affect user dbs.
Go to Top of Page

gauravkits
Starting Member

11 Posts

Posted - 2008-06-16 : 06:02:01
Is there anyway to keep the last 30 entries?

Gaurav Arora
Go to Top of Page

gauravkits
Starting Member

11 Posts

Posted - 2008-06-16 : 06:19:37
My disk is instead getting full after running sp_delete_backuphistory. Please advice. I am running out of space.

Gaurav Arora
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-21 : 18:16:53
You should specify smaller date range when use sp_delete_backuphistory, now you need backup msdb's log and shrink it.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-21 : 21:50:18
quote:
Originally posted by rmiao

You should specify smaller date range when use sp_delete_backuphistory, now you need backup msdb's log and shrink it.



He is talking about .mdf size also? Is there any tables created in MSDB? How big is size?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-21 : 22:32:18
>> My disk is instead getting full after running sp_delete_backuphistory. Please advice. I am running out of space.

Where?
Go to Top of Page
   

- Advertisement -