Startup & shutdown database when reboot server

Dear Oracle guru
We have Digital Unix (True64) v.5.0, and Oracle v.81.5 on top, these days we need to manually startup and shutdown database when we need to maintain its server.
Wondering if you could suggest me for the startup and shutdown scripts to put at /sbin/rc*.d, so that when the server reboots, it will startup database automatically and vice versa for shutting down the server.
Would be very appreciated for your prompt help.

The instance is not going to start automatically when you reboot the server.
1.- Shutdown all instances with immediate, transactional or normal option.
2.- stop the listener services
3.- Stop all rest of Oracle services
4.- Reboot the server
5.- start the listener
6.- start the instance
7.- start all rest of Oracle services
Joel Pérez

Similar Messages

  • Automatically Shutdown Database During VMware Server 'Shut Down Guest'

    I have 10g Enterprise Edition Release 10.2.0.4.0 running on Windows Server 2003 R2 under VMware Server version 2.0.0.
    I 'Power On' the VM and the OS/database start normally. I don't even open the guest OS console from VMware. I use TOAD and SQLPlus from the host machine to access my database.
    I'm trying to set up the database to do a clean shutdown when I use the VMware console to 'Shut Down Guest'.
    I've used the Group Policy Object Editor (gpedit.msc) to create a shutdown script under 'Local Computer Policy/Computer Configuration/Windows Settings/Scripts (Startup/Shutdown)/Shutdown'.
    The shutdown script is called Shutdown.bat and contains:
    rem adding the first two lines didn't affect anything, so I REMed them
    rem set ORACLE_SID=mysid
    rem set ORACLE_HOME=c:\oracle\product\10.2.0\db_1
    C:\oracle\product\10.2.0\db_1\bin\oradim -shutdown -sid mysid -shutmode immediate -log C:\oracle\product\10.2.0\db_1\database\oradim.log
    exit
    I get this in the oradim.log:
    Wed Apr 15 13:16:50 2009
    C:\oracle\product\10.2.0\db_1\bin\oradim -shutdown -sid mysid -shutmode immediate -log C:\oracle\product\10.2.0\db_1\database\oradim.log
    Wed Apr 15 13:16:51 2009
    ORA-12560: TNS:protocol adapter error
    I get this in sqlnet.log:
    Fatal NI connect error 12560, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oraclemysid)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=mysid)(CID=(PROGRAM=C:\oracle\product\10.2.0\db_1\bin\oradim.exe)(HOST=myserver)(USER=OraUser))))
    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.4.0 - Production
    Time: 15-APR-2009 13:16:51
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 2
    nt OS err code: 0
    Note: If I open the guest OS console and execute the Shutdown.bat file as myself (I'm in the administrator and ora_dba groups), it works perfectly ... as does opening SQLPlus and issuing 'shutdown immediate'.
    I'm stuck. Any ideas?
    Thanks.

    We are also having the same issue. We create a shutdown script via the Group Policy editor which works fine if we do a manual shutdown, but if we do a remote shutdown ex: "shutdown /r /f /m <servername /t 120", it does not work, the Database crash.
    As mentionned the script works when we do a manual shutdown but does not work for a remote shutdown. The group policy script contains the following:
    echo Rebooting server START at %DATE% %TIME% >> E:\oracle\product\admin\test\Reboot.log
    net stop <Oracle servicename>
    echo Rebooting server MIDDLE at %DATE% %TIME% >> E:\oracle\product\admin\test\Reboot.log
    net stop <Oracle servicename>
    echo Rebooting server END at %DATE% %TIME% >> E:\oracle\product\admin\test\Reboot.log
    After the reboot we see all the echoed line in the "reboot.log" file but the "net stop" doesn't get executed or failed since the database crash and recovers
    Any ideas/feedback ?
    Thanks

  • Urgent: can not startup the database in unix server

    hi...i am facing a treamendous problem...
    to shutdown the database(unix environmment), I have connected through putty and from there in the sysdba login, I have given the command "SHUTDOWN IMMEDIATE"
    but after that suddenly the power failure occurred and my local machine from which i was accessing the unix server, got shutdown..
    after the restart, when I am again accessing the putty and connected to the oracle11g server and from sysdba login, given the "STARTUP OPEN" command, then it is showing the error...
    SQL> startup open
    ORA-10997: another startup/shutdown operation of this instance inprogress
    ORA-09968: unable to lock file
    Linux-x86_64 Error: 11: Resource temporarily unavailable
    Additional information: 29770
    please help...its very urgent..

    My advice is, as your request is 'urgent', you submit a Service Request at level 1 at My Oracle Support.
    This is a discussion forum and not a support forum, and it is manned by volunteers, not by Oracle Support Engineers.
    Thank you for your current and future cooperation not to submit 'Urgent' requests in a forum of volunteers.
    Sybrand Bakker
    Senior Oracle DBA

  • Startup/Shutdown database through java code

    I am trying to shutdown/startup my database 10gr2 using a java code.
    I am able to shutdown db through EM dbconsole .. so there should be way to perform these steps using java prog.
    Issue I am getting is that "shutdown immeidate" is not a valid sql statement.
    do "shutdown" command strickly belongs to sqlplus only
    [ shutdown/ shutdown immeidate/shutdown abort ] .. nothing works
    Error is
    Connected ..
    Shuting down database..
    java.sql.SQLException: ORA-00900: invalid SQL statement
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    Any idea how we can achive it
    here ismy code ..
    ======================
    /* shutdown/startup database */
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class DBTest
         public static void main (String args[])
         Connection connection = null;
         try {
              // Load the JDBC driver
              String driverName = "oracle.jdbc.driver.OracleDriver";
              Class.forName(driverName);
              // Create a connection to the database
              String serverName = "127.0.0.1";
              String portNumber = "1521";
              String sid = "prod";
              String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
              String username = "sys as sysdba";
              String password = "password";
              connection = DriverManager.getConnection(url, username, password);
              System.out.println("Connected ..");
              System.out.println("Shuting down database..");
              Statement stmt = connection.createStatement();
              stmt.execute("shutdown immediate");
              stmt.close();
              System.out.println("Shuting down database complete..");
              connection.close();
         } catch (ClassNotFoundException e) {
              e.printStackTrace();
              // Could not find the database driver
         } catch (SQLException e) {
         e.printStackTrace();
              // Could not connect to the database
    ==================================

    Link is perfect for OCI users.
    Do anyone have an idea how 10g enterprise manager console stops database server. Whats happening in background when shutdown button is clicked after provided database and host credential.

  • Cannot connect to the configuration database when App Server is down

    Hi, 
    We had a App Server not come up after a restart.
    When trying to access a site we get
    the "Cannot connect to the configuration database"
    We have now started the App Server and everything working again...
    My problem, there are 2 WFE servers with NLB Configured apart of the App Server ....Why wont the site work and why cant i connect to config DB?
    Something must be misconfigured? Sites should be connecting to the WFE servers and work if App server is down.
    Yes, NLB Points to the WFE Servers.
    Any ideas where i can look? This is a Project PWA Server, not sure if that will make a difference but the root SharePoint site had the same issue.
    Thanks

    Hi Danie,
    is it possible that the SQL Server is running on the same box as the SharePoint (application) server? This would be the only thing that can explain the symptoms. Please check following:
    IP address of the SharePoint Application server by typing nslookup AppServerName on the SharePoint WFE in Command Prompt (cmd.exe). Replace
    AppServerName with the FQDN of the application server, e.g. appserver.domain.local
    IP address of the SQL server by typing nslookup SQLServerName on the SharePoint WFE in Command Prompt (cmd.exe). Replace
    SQLServerName with the FQDN of the SQL server, e.g. sqlserver.domain.local
    SQL Server alias configuration by checking the entries in the cliconfg.exe on both SharePoint WFEs
    In most cases, SQL server has nothing to do with the SharePoint Application server role and it is stored on the separate box. My guess here is that the farm started as one-server farm setup and over the time got expanded by additional 2 WFEs, moving
    Web Server roles from the initial server, leaving it with the application role (service applications) and SQL server on the same box.
    But, I am just making an educated guess here. Can you provide some additional information?
    Hth,
    Aleks

  • Sutdown of a Database in Shared Server Modus

    Hi,
    I have set up today a database called "db03" in Shared Server Mode. After the installation everything looked fine beside that there was no entry in the listener.ora file for the Database. Anyways I added the entry to the listener.ora and was able to connect to it via the command
    sqlplus "sys@db03 as sysdba".
    But when I tried to shut it down it gave me the error message
    ORA-00106: cannot startup/shutdown database when connected to a dispatcher
    back.
    So I have checked in several forums and someone said the solution would be to connect to the Database via dedicated connection and there for a entry in the tnsnames.ora file must be added.
    (server=dedicated)
    I added the line to connection descriptor and if I connect back to the database it really works and I am able to shutdown the database.
    But is that really the best and Oracle recommended what to shutdown a Database running in shared server mode ????
    Thanks Marcus

    There is a note in the administrator's guide that you have to have a dedicated connection to be able to shut down the database...
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/start.htm#7871
    When a database is running in shared server mode, that just means that connections can be made to a shared server, not that all connections should connect to a shared server. When you are doing certain types of tasks, such as reporting, you are frequently better off requesting a dedicated connection. When you are shutting down the database, you have to request a dedicated session.
    If you expect some of the sessions started from a particular machine to need dedicated connections and other sessions to require shared server connections, there are options other than modifying the TNS entry, but 99 times out of 100, anyone who will be shutting down a database will always want a dedicated connection.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Oracle 8i Automatic Startup/shutdown on NT

    After installing Oracle 8.1.6 on Win NT/2000 and creating a database a new service is created too (OracleServiceSID). My problem is that this new service (which works like oradim starting srvc,inst) does not startup the db when rebooting the machine. I need always manual startup/shutdown with a script that uses svrmgrl while in Oracle guides it seems that would be enough to start the service. Every parameter in the registry is set according to these guides to permit automatic startup/shutdown but only the service, not the db, starts and stops automatically. Where is my error?
    Thanks
    Alex
    null

    Dear Alexdelarg,
    First launch the "Services" applet from the Windows NT Control Panel. Double-click on the "OracleService<SID>" service and verify that "Startup Type" is set to "Automatic", "Log On As" is set to "System Account", and that the "Allow Service to Interact with Desktop" check box is disabled.
    Then launch REGEDIT and check that the Value String ORA_<SID>AUTOSTART within the key My Computer\HKEYLOCAL_MACHINE\SOFTWARE\ORACLE is set to "TRUE".
    If the above does not rectify your startup problem, try issuing the following command from the Command Prompt:
    <ORACLE_HOME>\bin\oradim -edit -sid <SID> -startmode auto
    where <ORACLE_HOME> is the full path of your Oracle8i Server software and <SID> is the Service Identifier of your database.
    Hope this helps!

  • Automate startup/shutdown thru script on windows

    WIndows 2003
    oracle 9.2.0.7
    I am new to oracle on windows.
    Is there way to automated startup/shutdown database thru script on windows?
    I want to schedule this task at perticuler time.
    Thanks

    You have to come up with your own script to shutdown.
    There's a sample here
    [Start / Shut Oracle with a Click (Windows Script) |http://it.toolbox.com/wiki/index.php/Start_/_Shut_Oracle_with_a_Click_(Windows_Script)]
    Edited by: yingkuan on Oct 9, 2008 5:05 PM

  • Automatics Startup database in linux server 2.1

    Hi,
    How can I setup a file that can startup oracle database (9.2.0.4) after the linux server reboot? Can anyone teach me step by step? Thanks

    This will be help you:
    DB startup & shutdown in 10g DB on Linux
    Joel Pérez

  • Catch event when Application Server is shutdown

    Hi All,
    Actually I want to catch an event do something when weblogic server is shutdown.
    How can I catch the event.
    Any help would be highly appreciated.
    I tried by implementing ServletContextListener interface, but in that I can only catch the event when weblogic is started, but not when it is shutdown.

    Create a class that implements the ServletContextListener interface:
         public class myServletContextListener implements ServletContextListener
    The ServletContextListener interface has two methods that must be implemented:
         public void contextInitialized(ServletContextEvent sce)
         public void contextDestoyed(ServletContextEvent sce)
    Register the listener in the web.xml:
         <web-app>
              <context-param>
                   <param-name>param1</param-name>
                   <param-value>paramValue1<param-value>
              </context-param>
              <listener>
                                                     <listener-class>
                                                                com.listeners.MyServletContextAttributeListener
                     </listener-class>
              </listener>
              <servlet>
                   <servlet-name>test</servlet-name>
                   <servlet-class>com.test</servlet-class>
                   <init-param>
                        <param-name>param1</param-name>
                        <param-value>paramValue1</param-value>
                   </init-param>
                   <load-on-startup>1</load-on-startup>
              </servlet>
              <servlet-mapping>
                   <servlet-name>test</servlet-name>
                   <url-pattern>/test</url-pattern>
              </servlet-mapping>
         </web-app>When the server starts up the servlet context (usually on server start up) it will call the contextInitialized method of your myServletContextListener class. When the server shuts down the servlet context (usually on server shutdown) it will call the contextDestroyed method of your myServletContextListener class.
    With in these methods you can usually assume that the server is starting/stopping and do what it is you wish to do.
    However there are two things to bear in mind:
    1- Most servers offer a manager app that allows individual servlet contexts to be stopped/started without shutting down the server o you may get false results depending on you is managing the server.
    2- I am not sure if the methods will be called if the server suffers a catastrophic error and crashes. For example a out of memory error. So you may miss a server shut down but the error should be logged in the tomcat log files.

  • ORACLE DATABASE의 AUTOMATIC STARTUP/SHUTDOWN

    제품 : ORACLE SERVER
    작성날짜 : 1995-11-21
    오라클 database의 AUTOMATIC STARTUP/SHUTDOWN
    ============================================
    시스템이 startup 하면서 오라클도 함께 startup하거나 시스템을 shutdown
    할 때 오라클도 같이 shutdown 하는 것이 가능하다. 그 방법은 OS마다 차이가
    있는데 여기서는 UNIX 에 기반한 여러 플랫폼에 대해서 알아보기로 한다.
    본 내용에서 가장 많이 사용되는 화일은 다음과 같다.
    $ORACLE_HOME/bin/dbstart
    $ORACLE_HOME/bin/dbshut
    /etc/oratab 또는 /var/opt/oracle/oratab
    dbstart 와 dbshut 은 오라클을 startup/shutdown 시키는 스크립트인데
    이것은 automatic startup/shutdown 시에만 사용하도록 하고 평상 시의
    경우에는 사용하지 않도록 한다.
    oratab 화일은 일반 텍스트 화일로서 시스템에 설치된 오라클 인스턴스에
    대한 정보를 가지고 있는데 보통 3개의 필드로 이루어져 있으며 첫번재
    필드는 ORACLE_SID, 두번째 필드는 ORACLE_HOME, 세번째 필드는 Y 또는 N
    으로 구성되어 있다. 해당 인스턴스를 autostartup 시키려면 꼭 Y로
    세팅되어 있어야 한다.
    SYSTEM V
    System V 에 기반한 시스템은 /etc/rc<n>.d 디렉토리에 초기화 스크립트를
    가지고 있다. 여기서 <n> 은 해당 스크립트의 run-level 을 의미한다.
    일반적으로 run-level 0은 power shutdown mode 이고 run-level 2는 multi-user
    mode 이다. 각각의 디렉토리에 들어있는 초기화 스크립트는 다음과 같은 형태의
    이름을 갖고 있다.
    K{two-digit number][descriptive filename]
    예를 들면 S75cron, K30tcp 등이 있을 수 있다.
    S로 시작되는 스크립트는 startup 시에 실행되는 것이고 K 로 시작하는 것은
    shutdown 시에 실행된다.
    two-digit number가 의미하는 것은 스크립트가 실행되는 순서인데 숫자가 작은
    것부터 먼저 실행된다. 따라서 오라클 스크립트는 보통 다음과 같은 이름을 갖게 된다.
    S99oracle, K01oracle
    이와 같이 설정하면 시스템이 startup 될 때 모든 초기화가 끝난 후 마지막으로
    오라클이 startup 되며 시스템을 shutdown 할 때에는 오라클을 가장 먼저 shutdown
    하게 된다.
    BSD UNIX
    BSD 에 기반한 시스템은 시스템이 startup 될 때 초기화 화일로
    /etc/rc*(예를 들면, /etc/rc, /etc/rc.local) 를 사용한다.
    시스템을 shutdown 할 때에는 보통은 /etc/shutdown 만 실행하게 되므로
    특별히 실행되는 스크립트가 없지만 /etc/rc.shutdown 이 실행되는
    플랫폼도 있다.
    이제 각 플랫폼별로 자세히 알아보기로 한다.
    주의 : <oracle_owner> 는 oracle owner id 로 대체
    <$ORACLE_HOME> 은 oracle home directory 명으로 대체
    (1)SunOS 4.1.3
    SunOS 4.1.3 에서는 /etc/rc.local 을 startup 스크립트로 사용한다. 즉
    시스템이 startup 되면서 /etc/rc.local 이 실행된다. 따라서 이 화일의 끝에
    다음과 같은 라인을 추가하면 된다.
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbstart
    예를 들어 oracle owner 가 oracle7 이고 $ORACLE_HOME 이 /home/oracle
    이라면 다음과 같이 해주면 된다.
    su oracle7 -c /home/oracle/bin/dbstart
    여기서 /home/oracle 대신에 $ORACLE_HOME 과 같은 환경변수를 이용하여
    세팅하면 안된다.
    SunOS 에서는 시스템이 shutdown 될 때 실행되는 스크립트는 따로 없다.
    따라서 dbshut 을 실행시키는 방법은 다음과 같은 스크립트를 만들어서
    시스템을 shutdown 시킬 때 /etc/shutdown 을 실행시키지 말고 대신
    이것을 실행시켜야 한다.
    #!/bin/csh
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    /etc/shutdown $*
    만약 오라클을 shutdown 하지 않고 시스템을 shutdown 하면 다음에
    오라클을 startup 하려고 할 때 startup이 되지 않는다. 이 경우에는
    $ORACLE_HOME/dbs/sgadef<SID>.dbf 화일을 지우고 startup 시키면 된다.
    (2)OSF/1(DIGITAL UNIX)
    /etc/inittab : 초기화 과정을 콘트롤
    /sbin/rc3 : run-level 3 에서 사용되는 script
    /sbin/rc0 : run-level 0 에서 사용되는 script
    /sbin/rc3.d/S99oracle : /sbin/init.d/oracle 로 link
    /sbin/rc0.d/K01oracle : /sbin/init.d/oracle 로 link
    /etc/initab 화일에는 초기화 과정에 대한 정보가 들어 있다.
    예를 들면 다음과 같다.
    s3:3:wait:/sbin/rc3 < /dev/console > /dev/console 2>&1
    이렇게 설정하면 run-level 3 일 경우 /sbin/rc3 스크립트가 실행된다.
    /sbin/rc3 은 /sbin/rc3.d 디렉토리에 들어있는 스크립트를 실행한다. 만약
    스크립트 이름이 K 로 시작하면 이것은 stop 파라미터를 갖고 실행되어서 이
    스크립트에 지정된 프로세스를 정지시킨다. 한편, 스크립트가 S 로 시작하면
    /sbin/rc3 는 이 스크립트에 startup 파라미터를 부여하고 여기서 지정된
    프로세스를 실행시킨다. 따라서 /sbin/rc3.d/S99oracle 을 사용하여
    dbstart를 실행한다.
    shutdown 과정도 거의 비슷하다. /etc/inittab 에 다음과 같은 라인을 추가
    한다.
    s0:0:wait:/sbin/rc0 off < /dev/console > /dev/console 2>&1
    이것은 /sbin/rc0 를 실행시키는데 /sbin/rc0 는 /sbin/rc0.d 디렉토리에
    들어있는 스크립트를 실행시킨다. 스크립트의 이름이 S 로 시작하면 run
    time parameter 로 start 를 사용하게 되고 K 로 시작하면 stop 을
    사용한다.
    따라서 /sbin/rc0.d/K01oracle 스크립트는 stop 파라미터를 갖고
    실행되며 이 스크립트는 $ORACLE_HOME/bin/dbshut 스크립트를 실행시켜서
    오라클을 shutdown 시킨다.
    /sbin/rc3.d/S99oracle과 /sbin/rc0.d/K01oracle은 모두 /sbin/init.d/oracle
    에 대한 symbolic link 이다. /sbin/init.d/oracle 에 대한 symbolic link 는
    이들 외에 더 있을 수 있다.
    (3)Solaris 2.3 & SCO UNIX
    /etc/inittab : 초기화 과정을 콘트롤
    /etc/rc2 : run-level 2 에서 사용되는 스크립트
    /etc/rc0 : run-level 0 에서 사용되는 스크립트
    /etc/rc2.d/S99dbstart : /etc/init.d/dbstart 에 대한 link
    /etc/rc0.d/K01dbshut : /etc/init.d/dbshut 에 대한 link
    /var/opt/oracle/oratab
    Solaris 의 경우는 OSF/1 과 매우 유사하다. 차이점이라고 한다면 /sbin
    디렉토리 대신에 /etc 디렉토리에 필요한 스크립트가 들어있다는 것이다.
    rc0.d, rc2.d 같은 디렉토리는 실제로 /etc 디렉토리에 위치하고 있으며
    rc0, rc2 와 같은 스크립트는 /etc/init.d 에 존재하는 같은 이름의 스크립트에
    대한 symbolic link이다.
    /etc/init.d/dbstart 와 /etc/init.d/dbshut 스크립트의 내용은 각각 다음과
    같이 한줄로 구성되어 있다.
    su - <oracle_owner> -c <$ORACLE_HOME>/bin/dbstart
    su - <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    Solaris 에서는 start, stop 같은 파라미터는 /etc/init.d/dbstart,
    /etc/init.d/dbshut 에서는 무시된다.
    /etc/init.d/dbstart, /etc/init.d/dbshut 화일은 owner가 oracle owner id
    이여야 한다.
    /etc/init.d/README 를 읽어보면 좀 더 자세한 내용이 설명되어 있으니 참조하기
    바란다.
    (4)AIX
    /etc/inittab : 시스템 초기화 화일
    /etc/rc : 시스템 초기화 스크립트
    /etc/mkitab : /etc/inittab 을 수정하는 유틸리티
    /etc/shutdown : 시스템 shutdown 스크립트
    AIX 에서는 오라클 autostartup 방법은 여러가지가 가능하지만 shutdown 은
    한가지만 가능하다. 우선 autostartup 은 다음과 같은 방법 가운데 하나를
    사용하면 된다.
    a)/etc/mkitab 를 사용하여 /etc/inittab 에 entry 를 추가한다. 즉,
    /etc/mkitab "<oracle_owner>:2:wait:/bin/su <oracle_owner> -c
    <$ORACLE_HOME>/bin/dbstart > /dev/console 2>&1"
    이렇게 하면 /etc/inittab 화일에 dbstart 기능이 추가된다. 이렇게 하면
    시스템이 뜨면서 run-level 2일 경우 오라클이 자동으로 startup 된다.
    b)다음과 같은 방법도 가능하다.
    /etc/mkitab "rcoracle:2:wait:/etc/rc.oracle > /dev/console 2>&1"
    그리고, root 소유의 /etc/rc.oracle 스크립트를 다음과 같이 작성한다.
    su <oracle_owner> <<EOF
    <$ORACLE_HOME>/bin/dbstart
    EOF
    c)/etc/rc 스크립트의 마지막에 다음을 추가한다.
    /bin/su <oracle_owner> - c <$ORACLE_HOME>/bin/dbstart
    AIX 에서 시스템 shutdown 은 /etc/shutdown 에 의한다. 시스템을 내릴 때
    오라클을 shutdown 하려면 별도의 시스템 shutdown 스크립트(root 소유로)를
    다음과 같이 만들어서 /etc/shutdown 을 사용하지 말고 이것을 사용해야 한다.
    #!/bin/sh
    /bin/su <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    /etc/shutdown $*
    (5)HP/UX
    /etc/rc : 시스템 startup 화일
    /etc/shutdown : 시스템 shutdown 실행 화일
    /etc/shutdown.d : 시스템 shutdown 디렉토리
    HP/UX 에서는 시스템 startup 시에 /etc/rc 가 실행된다. 따라서 다음 라인을
    /etc/rc 스크립트의 마지막에 추가하면 auto startup 이 가능해진다.
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbstart
    시스템의 shutdown 은 /etc/shutdown 화일을 실행하여 수행된다. 이 프로그램은
    /etc/shutdown.d 디렉토리에 들어있는 스크립트를 실행시키는데 다음과 같은
    세 가지 방법 가운데 하나로 auto shutdown 을 세팅할 수 있다.
    a)$ORACLE_HOME/bin/dbshut 화일을 /etc/shutdown.d 디렉토리 아래에 copy
    b)/etc/shutdown.d/dbshut 을 $ORACLE_HOME/bin/dbshut 으로 symbolic link 지정
    c)다음과 같은 스크립트 작성
    #!/bin/sh
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    단,이 스크립트는 root의 소유이고 root에 의해서만 실행 가능해야 한다.
    만약 V6 와 V7 을 동시에 사용하는 경우라면 V7 에서 제공하는 dbshut을
    사용하도록 한다.

    Dear Alexdelarg,
    First launch the "Services" applet from the Windows NT Control Panel. Double-click on the "OracleService<SID>" service and verify that "Startup Type" is set to "Automatic", "Log On As" is set to "System Account", and that the "Allow Service to Interact with Desktop" check box is disabled.
    Then launch REGEDIT and check that the Value String ORA_<SID>AUTOSTART within the key My Computer\HKEYLOCAL_MACHINE\SOFTWARE\ORACLE is set to "TRUE".
    If the above does not rectify your startup problem, try issuing the following command from the Command Prompt:
    <ORACLE_HOME>\bin\oradim -edit -sid <SID> -startmode auto
    where <ORACLE_HOME> is the full path of your Oracle8i Server software and <SID> is the Service Identifier of your database.
    Hope this helps!

  • How Auto starting Physical Standby Database ( when Server Restart)

    Dear All(s)
    I have configure oracle (10.2.0) dataguard on production database, some time server restart due to power disconnectivity, i want to restard dataguard when server restart. i am using Server 2003 32bit. Guide me how i can run following commands when server restart.
    SQL> connect/as sysdba
    SQL> Startup mount;
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    Thanks in Advance

    i want to run these command each time when server restart.Yes, I did understand that... but what's the problem ? can't you schedule a task when the server starts ?

  • Permission denied when creating database in Sql Server 2008 for SQLExpress

    I'm getting an permission error while restoring the database. I'm using SQL Server 2008 SQLEXPRESS
    I'm able to create the user using this script " CREATE LOGIN [darth\vader] FROM WINDOWS;
    GO;"
    But when I try to give role to the user it's still give me permission error.. SP_ADDSRVROLEMEMBER ‘darth\vader’, ‘sysadmin’
    Can someone guide me how to resolve this issue?

    http://msdn.microsoft.com/en-us/library/ms186858.aspx
    Permissions
    If the database being restored does not exist, the user must have CREATE DATABASE permissions to be able to execute RESTORE. If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed
    server roles and the owner (dbo) of the database (for the FROM DATABASE_SNAPSHOT option, the database always exists).
    RESTORE permissions are given to roles in which membership information is always readily available to the server. Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE
    is executed, members of the db_ownerfixed database role do not have RESTORE permissions.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Reporting Services will not automatically use a different replica for the report server databases when a failover occurs. How to overcome this issue

    Reporting Services offers limited support for using AlwaysOn Availability Groups with report server databases. The report server databases can be configured in AG to be part of a replica; however Reporting Services will not automatically use a different
    replica for the report server databases when a failover occurs. How to overcome this issue? is there any workaround for that..
    Rahul

    Hi.
    With the AlwaysOn listener you should have a single DNS name to connect to regardless of which cluster node is active. Are you using the listener service? If not, please refer to the link below.
    http://msdn.microsoft.com/en-us/library/hh213417.aspx#AGlisteners

  • On Windows Server 2008, local account passwords are reset when the server is rebooted. Why, and how do we fix?

    We are running a commercial application on a Windows 2008 Server. After reboot, we cannot access the application because two services fail to start. The reason they fail to start is that the passwords to the local user accounts tied to those services have
    either been deleted or reset to a different value. In order to restart the application, we must reset the passwords of these two local accounts, then stop and restart all the application's services.  According to the application's maker, the accounts
    must be local.
    My colleague believes the passwords are being deleted or reset as a result of a global domain policy.  Is this likely?
    Assuming my colleague is correct, is there anything we can do locally to prevent these passwords from being deleted or reset when the server reboots?  If not, what is the most granular change we can ask our AD adminstrators to make to the policy, so
    that these local accounts are not touched at reboot.
    Thanks.

    Hello,
    have you configured the accounts to have the permission "Log on as a service"? I have seen that this is not given to the account and therefore the service fails to start.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

Maybe you are looking for