MSSQL 常用
--查看error日志
use [master]
Exec sp_readerrorlog 0,1,'Recovery of database'
--查看error日志
use [master]
Exec sp_readerrorlog 0,1,'Recovery of database'
catch(Exception::CLRError)
{
System.Exception interopException = CLRInterop::getLastException();
obj.Add("Code", 1);
obj.Add("Message", interopException.Message.ToString());
}
catch
{
SysInfoLogEnumerator infoLogEnum;
str Message;
infoLogEnum = SysInfoLogEnumerator::newData(infolog.copy(1, infologLine()));
while(infoLogEnum.moveNext())
{
Message += infoLogEnum.currentMessage();
}
obj.Add("Code", 1);
obj.Add("Message", Message);
}