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
MS SQL script - how to check the error messsage?
I can't seem to work out how to do this either.
I can get a SUCCESS/ERROR response in "Return result in variable" variable, but I would like to get a meaningful error message from RAISERROR.
Example of one of the scripts I'm running:
Do I need to write a custom plug in to do this?
I can get a SUCCESS/ERROR response in "Return result in variable" variable, but I would like to get a meaningful error message from RAISERROR.
Example of one of the scripts I'm running:
Code: Select all
EXEC('IF SERVERPROPERTY(''collation'') <> ''SQL_Latin1_General_CP1_CI_AS''
RAISERROR(''SQL ErrorID: 235E86A3-2DC6-4D0F-B892-CB8F8E47AE29
Message: Invalid SQL Collation for install'', 16, 127) with nowait')-
CandiceJones
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
We'd like to add this feature. Please contact me privately if you would like to participate in testing a new version of the plugin which has this implementation in place.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/

