Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 513
  • Last Modified:

spool usage

I have the following line working but I want to put the log file into a folder like myfolder
But the folder is not created previously.

When I run the program, it will auto create the folder?


spool create_my_views.log

Can I put this line like below?

spool myfolder\create_all_views.log
0
wasabi3689
Asked:
wasabi3689
  • 4
  • 3
1 Solution
 
slightwv (䄆 Netminder) Commented:
Maybe just try it?  It will either work or it won't.

The answer is: No.  It will not create the folder for you.

You can issue the HOST command and create it from inside the script.

Note: sqlplus doesn't really like folders with spaces in them.  At least it didn't used to like them.
0
 
wasabi3689Author Commented:
If I pre-create the folder "MyFolder" before I run  spool, still use this line

spool myfolder\create_all_views.log

it works? I mean  the log file will go to MyFolder?
0
 
slightwv (䄆 Netminder) Commented:
You could have tried this and had your answer in less time than it took to post this and wait for a reply.

>>>I mean  the log file will go to MyFolder?

Yes
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
HuaMinChenBusiness AnalystCommented:
If I pre-create the folder "MyFolder" before I run  spool, still use this line

spool myfolder\create_all_views.log

it works? I mean  the log file will go to MyFolder?

Yes, please put this
spool c:\myfolder\create_all_views.log
0
 
slightwv (䄆 Netminder) Commented:
HuaMinChen,

This had already been posted.  Please review previous posts before posting.

Your post also adds the drive letter.  This may not be what is wanted and can lead to errors.  If they want the output in a sub- folder from the 'current' folder, the full qualification will not work.
0
 
wasabi3689Author Commented:
I want the output .log go to its folder, not come out to the same folder as stored the .sql files. Otherwise, it will go to the same folder with all. sql files
0
 
slightwv (䄆 Netminder) Commented:
>>I want the output .log go to its folder, not come ou

I understand this.  Adding the folder or fully qualifying the path will work.

Have you not tested it yet?
0
 
wasabi3689Author Commented:
not yet. will do later
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now