Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2002
    Posts
    1,245

    Unanswered: $echo command hangs in SQLPLus

    I am running Oracle 9i (Standard Edition) on a Windows 2000 SP4 Server. I am currently having an issue with certain commands that appear to "hang" in SQLPlus.

    For instance, when I try to run $echo %DATE% %TIME% - New Log Entry >> LogFile.log, SQLPlus appears to execute the command (the command is echoed to the screen), but no file is created and SQLPlus will not accept any new commands.

    I know that at one time, I was able to run this command correctly. To the best of my knowledge, here is what has changed since then:

    1. I was originally having problems logging in with a newly created account called backupPROD which had been granted the DBA role. Specifically, I was getting an error when logging in:

    Error accessing PRODUCT_USER_PROFILE
    Warning: Product user profile information not loaded!
    You may need to run PUPBLD.sql as SYSTEM

    To my eternal chagrin, I forgot that SYSTEM connects to the PUBLIC tablespace while SYS connects to the SYSTEM tablespace. I attempted to run the PUPBLD.sql while connected as backupPROD. Obviously, THAT didn’t work.

    2. I was able to go back and run PUPBLD.sql as SYSTEM, but it was right after that (I believe) that I began getting this issue where SQLPlus hangs.

    Does anyone have any suggestions?

    Regards,

    hmscott
    Have you hugged your backup today?

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Did you remember to DROP the PUPBLD.sql objects from the backupPROD account?
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    I don't know anything about Windows 2000, but on NT4,
    Code:
    $"echo %DATE% %TIME% - New Log Entry >> LogFile.log"
    at least creates a file. Unfortunately it just contains
    Code:
    %DATE% %TIME% - New Log Entry
    It might be easier to do this using SQL*Plus commands.

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    It does work on WinXP:
    Code:
    C:\WUTemp>echo %DATE% %TIME% - New log entry >test.log
    
    C:\WUTemp>type test.log
    Wed 12/22/2004 12:10:28.91 - New log entry
    
    C:\WUTemp>sqlplus scott/tiger@myDB
    
    SQL*Plus: Release 10.1.0.2.0 - Production on Wed Dec 22 12:13:04 2004
    
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    
    SQL> host dir
     Volume in drive C has no label.
     Volume Serial Number is C43B-940A
    
     Directory of C:\WUTemp
    
    12/22/2004  12:10 PM    <DIR>          .
    12/22/2004  12:10 PM    <DIR>          ..
    12/22/2004  12:08 PM                36 kk.log
    12/22/2004  12:10 PM                45 test.log
                   2 File(s)             81 bytes
                   2 Dir(s)  28,372,897,792 bytes free
    
    SQL> host echo %DATE% %TIME% - Another log entry >>test.log
    
    SQL> exit
    Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    
    C:\WUTemp>type test.log
    Wed 12/22/2004 12:10:28.91 - New log entry
    Wed 12/22/2004 12:13:46.28 - Another log entry
    
    C:\WUTemp>

    Last edited by LKBrwn_DBA; 12-22-04 at 13:16.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  5. #5
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by LKBrwn_DBA
    Did you remember to DROP the PUPBLD.sql objects from the backupPROD account?
    I started poking around a bit more today and discovered the objects in BackupPROD (oops). But alas, deleting them has not helped.

    Regards,

    hmscott
    Have you hugged your backup today?

  6. #6
    Join Date
    Dec 2002
    Posts
    1,245
    bump. any other thoughts?
    Have you hugged your backup today?

  7. #7
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >$echo command hangs in SQLPLus
    AFAIK, ECHO is NOT a valid SQLPLUS command.
    While it may be a valid OS command on Windoze or *nix,
    therefore it needs to be prefixed by "host " or in some cases "!".
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  8. #8
    Join Date
    Dec 2002
    Posts
    1,245
    That ignores that it was working before and works on other instances of Oracle that are installed and running.

    Something changed. Probably something that I did, but I can't figure out what it was.

    Regards,

    hmscott

    Quote Originally Posted by anacedent
    >$echo command hangs in SQLPLus
    AFAIK, ECHO is NOT a valid SQLPLUS command.
    While it may be a valid OS command on Windoze or *nix,
    therefore it needs to be prefixed by "host " or in some cases "!".
    Have you hugged your backup today?

Posting Permissions

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