Dynamically changes the path of the error log.
sp_errorlog “change log“, “new_path“ [,{“jslog true“ | “jslog false“}]
sp_errorlog “help”, “change log”
sp_errorlog 'change log', '$SYBASE/$SYBASE_ASE/install/new.log', 'jslog false'
The SAP ASE error log location is changed to $SYBASE/$SYBASE_ASE/install/new.log. However, the location of the Job Scheduler Agent log is not changed.
If the Job Scheduler Agent is running, the agent log location is also changed to $SYBASE/$SYBASE_ASE/install/new.log.
sp_errorlog 'change log', '$SYBASE/$SYBASE_ASE/install/new.log', 'jslog true'
If the Job Scheduler Agent is running, the agent log is also changed to $SYBASE/$SYBASE_ASE/install/new.log.
sp_errorlog 'change log', '$SYBASE/$SYBASE_ASE/install/new.log'
sp_errorlog returns 0 if the switch to the new location is successful. A non-zero return value implies an error.
See Logging Error Messages and Events in the Configuration Guide for information on the runserver file.
The permission checks for sp_errorlog differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be a user with manage server privilege. |
Disabled | With granular permissions disabled, you must be a user with sa_role. |
Use the errorlog auditing option to audit changes to the error log administration.
select * from sybsecurity..sysaudits01 where event=127
sp_audit 'errorlog', 'all', 'all', 'on'