MS SQL script - how to check the error messsage?
Posted: Mon Jan 05, 2009 6:18 am
Hi,
I'm just wondering if there is any possibility to check the error message that comes from MS SQL Server during script run. I'm trying to restore database backup file using SQL Server command:
RESTORE DATABASE [$DATABASE_RESTORE_NAME$] FROM DISK = N'$SELECTED_BAK_FILE$' WITH FILE = 1, NOUNLOAD, STATS = 10
GO
For some reason script works fine only sometimes, mostly there's an error. Does any possibility exists to check the error message?
Thanks,
BarBQ
I'm just wondering if there is any possibility to check the error message that comes from MS SQL Server during script run. I'm trying to restore database backup file using SQL Server command:
RESTORE DATABASE [$DATABASE_RESTORE_NAME$] FROM DISK = N'$SELECTED_BAK_FILE$' WITH FILE = 1, NOUNLOAD, STATS = 10
GO
For some reason script works fine only sometimes, mostly there's an error. Does any possibility exists to check the error message?
Thanks,
BarBQ