I have a little script to shrink log files.
The problem is when I run
set @sql='DBCC SHRINKFILE ('+ @logfilename +' , 500)'
print (@sql)
exec (@sql)
I need to be in that database and
set @test = 'use [Warehouse]'
print @test
exec @test
does not work. I think I had solved this one time before but I cannot find my solution.
Thanks
Simi
The problem is when I run
set @sql='DBCC SHRINKFILE ('+ @logfilename +' , 500)'
print (@sql)
exec (@sql)
I need to be in that database and
set @test = 'use [Warehouse]'
print @test
exec @test
does not work. I think I had solved this one time before but I cannot find my solution.
Thanks
Simi