sp_errorlog "change log", "<new_path>" [,{"jslog true" | "jslog false"}]
sp_errorlog "help", "change log”
<h3>参数</h3> <code><new_path>是错误日志的新路径。的最大长度为 255 个字符。 jslog true(缺省)如果正在运行 Job Scheduler,则 sp_errorlog "change log" 会尝试将 Job Scheduler 代理日志更改至存储新 SAP ASE 错误日志的目录当中。两份日志均将指示错误消息(如果有)。jslog false指定到不更改 Job Scheduler 代理日志的位置。示例
示例 1
更改 SAP ASE 错误日志,以在不更改 Job Scheduler 日志位置的情况下使用新位置:
sp_errorlog "change log",
"$SYBASE/$SYBASE_ASE/install/new.log", "jslog false"
SAP ASE 错误日志位置更改至 <code>$SYBASE/$SYBASE_ASE/install/new.log。但 Job Scheduler 代理日志的位置不变。示例 2
将错误日志位置更改为$SYBASE/$SYBASE_ASE/install/new.log:
sp_errorlog "change log",
"$SYBASE/$SYBASE_ASE/install/new.log", "jslog true"
如果正在运行 Job Scheduler 代理,则代理日志位置也将更改为 $SYBASE/$SYBASE_ASE/install/new.log。
如果未运行 Job Scheduler 代理,则 SAP ASE 不会更改代理日志位置。您将看到代理日志位置未更改的消息。
<h4>示例 3</h4>
将 SAP ASE 错误日志位置更改为 $SYBASE/$SYBASE_ASE/install/new.log:
sp_errorlog "change log",
"$SYBASE/$SYBASE_ASE/install/new.log"
``</p>
<p>如果正在运行 Job Scheduler 代理,则代理日志位置也将更改为 $SYBASE/$SYBASE_ASE/install/new.log`。
如果未运行 Job Scheduler 代理,则 SAP ASE 不会更改 Job Scheduler 代理日志的路径。您会看到代理日志位置未更改的消息。
如果成功切换至新位置,sp_errorlog 返回 0。返回非零值表示出错。请使用 @@errorlog 全局变量查看当前错误日志位置。
⚠️
要在服务器重启时选取错误日志的新位置,请更新 runserver 文件中的 -e 参数。