Results 1 to 5 of 5

Thread: Error Log

  1. #1
    Join Date
    Feb 2003
    Location
    South Africa
    Posts
    41

    Unanswered: Error Log

    Hi PPL

    Is there any way for me to create a log file when I run a script for any errors or the results?

    The problem is that I have a very very long script and it gives quite a few errors but once it passes through the SQL Window or the script is done running, I can scroll up and see the errors.

    I use this command to run my script :

    SQL> @c:\upgrade.sql

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Error Log

    Use SPOOL:

    SQL> SPOOL myoutput.txt
    SQL> @c:\upgrade.sql [/SIZE][/QUOTE]
    SQL> SPOOL OFF

  3. #3
    Join Date
    Feb 2003
    Location
    South Africa
    Posts
    41
    Thanks for that...

    Will it complain if my script also has some stuff that it spools?


    [/SIZE][/QUOTE]

    What does this statements do?

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Yes, you can only be spooling to one file at a time. If the script contains a SPOOL command then spooling to the original file is turned off.

    [/SIZE][/QUOTE] is just some DBForums formatting I accidentally copied - please ignore!

  5. #5
    Join Date
    Feb 2003
    Location
    South Africa
    Posts
    41
    This is my script

    spool NewPeoUser.SQL

    select 'create user ' || sysadm.OA0P0990.USERID || ' identified by ' || sysadm.OA0P0990.USERID ||
    ' default tablespace users temporary tablespace temp account unlock; ' from sysadm.OA0P0990;


    select 'GRANT RESOURCE TO ' || sysadm.OA0P0990.USERID || ';' from sysadm.OA0P0990;
    select 'GRANT CONNECT TO ' || sysadm.OA0P0990.USERID || ';' from sysadm.OA0P0990;

    Spool off

    How can I get a commit statement inbetween each select to get spooled?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •