Unable to shrink database log

Database was in simple mode, no transactions to be written.

Receiving the following errors after tatting about trying to shrink the log prior to a backup.

“Cannot shrink log file because total number of logical log files cannot be fewer than 2.”
“Cannot shrink log file because requested size is larger than the start of the last logical log file”

detach database, rename the transactioon log.

Attach the database, dont use the gui, script it from the gui and delete reference to the log.

A new log will be generated. Boom.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: