Question: 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.

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?

Answer: 
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.

Under Windows 7 and SQL Developer 3.1, by default for me that seems to store the `.lst` in `%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.
What the other guy said for the default location was true for oracle 10g but since I am using the latest oracle 21c(at the time of writing this answer) here is the solution that worked for me.

in case if you created a spool file lets say: `spool on;` `spool tempfile;`
then the default location would be at the place you installed the oracle db software which in my case is

> 
> D:\WINDOWS.X64\_213000\_db\_home\bin
> 
> 
> 

and then in the

> 
> bin
> folder the file would be created as
> `tempfile.LST`
> and in order to open a
> .lst
> file just use the default notepad or any such editors to open your output
> 
> 
> 

> 
> However here is a **better suggestion** by me:
> type `spool on;` `SPOOL C:/path/xyz.txt;` #here change your directory,the pathname and file name for query file
> and most importantly **DO NOT FORGET TO TYPE
> SPOOL OFF;
> at the end of the query**. In case if you forget then your file wont be created and you will lose all your progress of your saved output. and lemme give you another *pro tip:* and that is to **not write the same spoolfile name otherwise it will be overwritten**
> 
> 
>