Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Shrink Log file for all Databases Expand / Collapse
Author
Message
Posted Monday, September 24, 2007 2:08 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, October 15, 2014 1:42 PM
Points: 185, Visits: 1,021
Comments posted to this topic are about the item Shrink Log file for all Databases

David Bird

My PC Quick Reference Guide
Post #402223
Posted Tuesday, November 29, 2011 8:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, December 7, 2011 5:27 AM
Points: 1, Visits: 6
I've tried this script, but it will only work if there are no spaces in the db_name. We have a database named Mediabin Repository and when I run this script, I'll get the following error:
"Msg 911, Level 16, State 1, Line 1"
"Could not locate entry in sysdatabases for database 'MediaBin'. No entry found with that name. Make sure that the name is entered correctly."

What is the correct way to run this script when there are spaces in the database name?
Post #1213286
Posted Monday, March 18, 2013 7:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, October 24, 2013 11:22 AM
Points: 15, Visits: 95

Thanks a lot.
The script was very helpful.
Post #1432189
Posted Monday, March 18, 2013 8:02 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 10:19 AM
Points: 4,399, Visits: 6,255
reddi_arjun (3/18/2013)

Thanks a lot.
The script was very helpful.


PLEASE DO NOT DO THIS!!! IT IS A HORRIBLE, HORRIBLE THING TO DO ON YOUR SQL SERVER!!!


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1432196
Posted Monday, March 18, 2013 9:54 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 3:49 PM
Points: 20,731, Visits: 32,493
F. van 't Hoff (11/29/2011)
I've tried this script, but it will only work if there are no spaces in the db_name. We have a database named Mediabin Repository and when I run this script, I'll get the following error:
"Msg 911, Level 16, State 1, Line 1"
"Could not locate entry in sysdatabases for database 'MediaBin'. No entry found with that name. Make sure that the name is entered correctly."

What is the correct way to run this script when there are spaces in the database name?


Because your database name has a space in it, you would need to put it in brackets, [Mediabin Repository].

I also agree with Kevin. This is not something that should be done on a regular basis. I can see it as a one off due to extraordinary operations, such as a major archiving of data to another database.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1432239
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse