Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2004
    Posts
    10

    Unanswered: how to start oracle from the command line????

    hello
    i download and install oracle10g in my laptop computer(windows xp),and works well.in order to save the resource of my machine,i modify all the oracle services in the windows service console to MANUAL,when i need,i can start it from the service console.

    but sometimes,i need to start the oracle from the dos windows,i execute following command sequence:

    1 lsnrctl start
    the tns listener can be started successfully.
    2 set oracle_sid=mydb
    mydb is my oracle instance name.
    3 sqlplus /nolog
    i can enter the sqlplus prompt.
    4 connect /as sysdba
    failed,"ORA-12560: TNS: protocol adapter error".
    if i start my oracle instance FIRST from the windows service console,then the "connect /as sysdba" works.


    but i want to start oracle COMPLETELY from the command line,how?

    thank for any helps!!!

  2. #2
    Join Date
    Jul 2004
    Posts
    4
    I had never seen command to start Oracle service in your answer. In window, you can using command : Net start Oracleservicexxx to start Your database service.

  3. #3
    Join Date
    Jul 2004
    Posts
    4
    I had never seen command to start Oracle service in your answer. In window, you can use this command : Net start Oracleservicexxx to start Your database service.

  4. #4
    Join Date
    Aug 2004
    Posts
    10
    yes,"net start" can start oracle service in the windows os,but following command sequence can start the oracle instance in linux too:

    sqlplus /nolog
    connect /as sysdba
    startup

    i think they should work in windows too.

  5. #5
    Join Date
    Jul 2004
    Posts
    4
    in Windows I often use following command in command promp to start my dabase base:
    >lsnrctl start;
    > net start oracleserviceXXX;
    >sqlplus/nolog
    >conn sys@xxx as sysdba;
    >password;
    >startup;

  6. #6
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    49
    This from my Oracle networking class. The Oracle startup in Windows is a 'two phase' startup. Phase one must be done from the services. (in the control pannel) the net start command will accomplish this. This will bring up the database fully (both phases) from that point on you can SQLplus to start and stop Oracle all you want (or until you reboot the machine.)

  7. #7
    Join Date
    Jul 2003
    Posts
    2,296
    Quote Originally Posted by zhebincong
    hello

    3 sqlplus /nolog
    i can enter the sqlplus prompt.
    4 connect /as sysdba
    failed,"ORA-12560: TNS: protocol adapter error".
    if i start my oracle instance FIRST from the windows service console,then the "connect /as sysdba" works.
    looks like your sqlnet.ora is not setup properly (or your ORACLE_SID is not set).
    can you post the contents of this file?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  8. #8
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    In a windows environment, you have to have the Oracle services running before you can start an instance. The commands

    sqlplus /nolog
    connect /as sysdba

    can only be issued after the service is started. Use the net command as shown by the other posts.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  9. #9
    Join Date
    Aug 2004
    Posts
    10
    thanks
    it seem like that the "net start" is the only choice,the linux oracle is different from the windows oracle.

  10. #10
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >the linux oracle is different from the windows oracle.
    No, Windoze is different from *nix.
    NET START is a WINDOZE only command.
    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.

Posting Permissions

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