I have the following store proc
SET @sql = 'RESTORE DATABASE ' + quotename(@dbname) + '
FROM DISK = N''E:\sql\template_' + @dbnamebak + '.bak''
WITH FILE = 1,
MOVE N''FromTemplate' + @dbname + '.Data'' TO N''E:\sql\' + @dbname + '.mdf'',
MOVE N''FromTemplate' + @dbname + '.Log'' TO N''E:\sql\' + @dbname + '_log.LDF'', NOUNLOAD';
EXEC (@sql);
I would like to make the output either 1 or 0 instead of:
Processed 8584 pages for database 'DatabaseName', file 'DatabaseName.Data' on file 1.
Processed 1 pages for database 'DatabaseName', file 'DatabaseName' on file 1.
RESTORE DATABASE successfully processed 8585 pages in 3.929 seconds (17.899 MB/sec).
Is it possible to control this?
Using MS SQL Server 2005.