Oracle 假脱机位置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11685972/
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
Oracle spool location
提问by Vlad Cozma
I'm using SQL Developer to spool the DDL for some packages, but I cannot identify the location where the server is spooling. Oracle is installed on AIX, but I don't know the user it's using to connect to the OS.
我正在使用 SQL Developer 为某些程序包假脱机 DDL,但我无法确定服务器假脱机的位置。Oracle 安装在 AIX 上,但我不知道它用于连接到操作系统的用户。
Basically, when I run:
基本上,当我运行时:
spool test.lst
select 1 from dual;
spool off
I get a confirmation message in console
我在控制台收到一条确认消息
1
----------------------
1
and whenever I try to give a path, I'd get an error, probably because of user rights:
每当我尝试提供路径时,我都会收到错误消息,可能是因为用户权限:
spool /tmp/test.lst
select 1 from dual;
spool off
Cannot create SPOOL file /tmp/test.lst
1
----------------------
1
So my question is where is test.lst?
所以我的问题是 test.lst 在哪里?
回答by Alex Poole
Spool is a client activity, not a server one; the .lst
file will be created on the machine that SQL Developer is on, not the server where the database it's connecting to resides.
假脱机是客户端活动,而不是服务器活动;该.lst
文件将在 SQL Developer 所在的机器上创建,而不是在它所连接的数据库所在的服务器上创建。
Under Windows 7 and SQL Developer 3.1, by default for me that seems to store the .lst
in %APPDATA%\Sql Developer\
在Windows 7和SQL开发3.1,默认情况下对我来说,这似乎存储.lst
在%APPDATA%\Sql Developer\
You can spool to a specific directory, e.g. spool c:\windows\temp\test.lst
, and if you have it set up can use something like spool \\<aix-server>\<dir>\test.lst
. Paths vary according to your client OS, of course.
你可以假脱机到一个特定的目录,例如spool c:\windows\temp\test.lst
,如果你设置了它,可以使用类似spool \\<aix-server>\<dir>\test.lst
. 当然,路径因您的客户端操作系统而异。
回答by OraNob
Under my LINUX installation the default spool directory is from where you are running sqlplus. ie. If you run sqlplus from a directory where you do not have write permissions it will fail.
在我的 LINUX 安装下,默认的 spool 目录是您运行 sqlplus 的位置。IE。如果您从没有写权限的目录运行 sqlplus,它将失败。
Try typing "!" or "host" at the sqlplus prompt to goto the OS. pwd the directory end up in and I guess this is location of your spool.
尝试输入“!” 或在 sqlplus 提示符下输入“host”以转到操作系统。pwd 目录最终进入,我想这是您的线轴的位置。
(type exit to go back to sqlplus)
(输入 exit 返回 sqlplus)