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 |
|
anxcomp
Starting Member
41 Posts |
Posted - 2007-08-09 : 12:40:34
|
| Hi,May somebody send script which will shrink all databases on server (SQL 2005). I think about DBCC SHRINKFILE and DBCC SHRINKDATABASE.I need do this at many servers, so I can't do this manually.Thanks--Regardsanxcomp |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-09 : 13:16:42
|
| script library is a forum for posting working scripts only.moved from script library.and shrinking databases is a bad thing._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
|
|
anxcomp
Starting Member
41 Posts |
Posted - 2007-08-09 : 14:02:53
|
| Thanks for help, I've seen this post yet. This script shrink database file, but i need shrink log file (.LDF). Could tell me how modify this script, please. And how use it to all database log files on server?--Regardsanxcomp |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-08-09 : 22:35:06
|
| Specify log file name or id in the script. |
 |
|
|
anxcomp
Starting Member
41 Posts |
Posted - 2007-08-10 : 03:15:37
|
| Hi, Thanks, do you mean set "@DBFileName = 'MyDatabaseFileName'" as set @DBFileName = 'MyDatabaseLOGFileName'?--Regardsanxcomp |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-08-11 : 00:54:01
|
| That's correct. |
 |
|
|
anxcomp
Starting Member
41 Posts |
Posted - 2007-08-11 : 07:32:55
|
| Thanks rmiao, I'll tray this--Regards,anxcomp |
 |
|
|
|
|
|