Home Forums SQL Server 2005 T-SQL (SS2K5) Alter Database with variable RE: Alter Database with variable
Mike_D
Hall of Fame
Points: 3295
More actions
April 23, 2009 at 8:01 am
#982924
Try
DECLARE @sql varchar(255),
@db varchar(32)
SET @db = 'Test'
SET @sql = 'ALTER DATABASE ' + @db + ' SET RECOVERY SIMPLE'
EXEC (@sql)
Hope that helps.
Mike