Hi
We have a maintenance plan with two tasks. The first saves the db, the second should shrink the log and looks like:
backup log mydb with truncate_only
go
use mydb
go
dbcc shrinkfile(mydb_log, 100)
go
The second task fails while dbcc looks in the master db for mydb_log, so the command 'use mydb' doesn't work in the plan. The hole command can be run as query or job successfully.
What can be done to set another default db?
Thanks for help.
Jan