oracle 如何在控制文件中设置 sqlldr 日志文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14275828/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I set sqlldr log file within control file
提问by Dave Richardson
I have a sqlldr (Oracle SQL Loader) control file (say myControlFile.ctl) and when run it all works OK. However, it writes a log to a file named myControlFile, I would prefer for it to be called myControlFile.log
我有一个 sqlldr(Oracle SQL Loader)控制文件(比如 myControlFile.ctl),运行时一切正常。但是,它将日志写入名为 myControlFile 的文件中,我希望将其称为 myControlFile.log
I've read through the docs for sqlldr and I know I can set the logfile as a command line parameter, but I want to set it within the control file itself. This doesn't seem unreasonable given that I can set the bad and discard filenames this way.
我已经通读了 sqlldr 的文档,我知道我可以将日志文件设置为命令行参数,但我想在控制文件本身中设置它。鉴于我可以通过这种方式设置坏文件名并丢弃文件名,这似乎并不合理。
What am I missing? I'm currently running this on Windows but it will ultimately be run on Unix.
我错过了什么?我目前在 Windows 上运行它,但它最终将在 Unix 上运行。
回答by David Aldridge
I believe that you can specify the log file in the parameter file, specified with the PARFILE parameter on the command line.
我相信你可以在参数文件中指定日志文件,在命令行上用PARFILE参数指定。
Possibly the log file name has to be passed to the sql loader executable so that a failure in reading the control file or other fatal errors will always be logged.
可能必须将日志文件名传递给 sql 加载程序可执行文件,以便始终记录读取控制文件的失败或其他致命错误。
回答by alexherm
You specify where the sqlldr log file is written in the sqlldr call to control file, not in the control file itself.
您可以在对控制文件的 sqlldr 调用中指定 sqlldr 日志文件的写入位置,而不是在控制文件本身中。
Such as: sqlldr user/password /folder/folder2/controlfile.ctl log=/folder/folder3/logfile.log
如:sqlldr 用户/密码 /folder/folder2/controlfile.ctl log=/folder/folder3/logfile.log