Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Jack Blade,
Scroll down to the line where it mentions;
--This is the name of the database for which the log will be shrunk.
USE [databasename] put the logical name of the database to replace the database name
Also where it mentions;
--Use sp_helpfile to identify the logical file name that you want to shrink.
SET @LogicalFileName = 'database_Log';
Do the same here replace the database_log for the database log name.
Run the script, if it doesn't run then it's down to the logical name of the database that isn't right.
This has been tested on SQL 2000, 7 and 2005 databases very successfully. 40 GB went down to under 1 GB, 176GB went down to 105MB
Make sure that you understand the implications of this script on the backup and recovery of your database(s): Managing Transaction Logs.
SQL Server Databases are made up of physical and logical names. This article goes over the logical n...
Today I encountered a interesting issue when rename logical name for mirror database.
We have a d...
Correction to title. Should have read Multiple Databases or 1 Database Logically broken up by fileg...
Need a tool to represent my Logical and physical database model