How to automate the Oracle database start and shutdown process

How we can automate and oracle database start and stop procees with Linux start/shutdown process.
I want to automatically start the oracle database at the time linux server and shutdown the database on shutdown linux server.

Hi,
I can share my scripts:
1) /home/oracle/start_oracle.sh
#Script should be ran as Oracle user
cd /tmp
export ORACLE_SID=orcl
export ORACLE_HOME=/oracle/ora9i
lsnrctl start
sqlplus -S /nolog <<ENDSQL
connect / as sysdba
startup
exit
ENDSQL
emctl start dbconsole
isqlplusctl start
NOTE: emctl and isqlplus are optional
2) /home/oracle/stop_oracle.sh
#Script should be ran as Oracle user
cd /tmp
export ORACLE_SID=orcl
export ORACLE_HOME=/oracle/ora9i
isqlplusctl stop
emctl stop dbconsole
sqlplus -S /nolog <<ENDSQL
connect / as sysdba
shutdown immediate
exit
ENDSQL
lsnrctl stop
NOTE: emctl and isqlplus are optional
Then what you need:
1) K91oracle_stop (put it in the desired run level)
#!/bin/bash
# description: Stop Oracle before reboots
su - oracle -c "/home/oracle/stop_oracle.sh" >> /home/oracle/stoporacle.log
2) S91oracle_start (put it in the desired run level)
#!/bin/bash
# description: Start Oracle after reboots
su - oracle -c "/home/oracle/start_oracle.sh" >> /home/oracle/startoracle.log
Bye.

Similar Messages

  • How to config the oracle database connection pool in IAS

    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

    Jacky,
    You need do the following for oracle type4 driver:
    1) register the driver:
    $IAS_HOME/bin/jdbcsetup
    Driver Identifier: Oracle_Type4_816 (whatever name you like)
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Driver Classpath: .../classes12.zip (install this this zip file somewhere
    and add this zip into the Classpath later).
    2) DataSource Setup:
    start iAS Administration Tool (iASAT)
    Choose Database, unfold iAS1 (your app server instance),
    choose External JDBC Datasource -> add: DataSource Registration
    JNDI Name: yourPoolName
    Driver Type: Oracle_Type4_816 (select what you just register)
    DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
    Username: your_user_name
    Password: your_passwd
    (Datasource Pool: using defaults for now): you can also customrize the
    parameters for the pool.
    3. Add classes12.zip into CLASSPATH.
    In your application, you can use JNDI lookup to get the DataSource from
    which you get the connection from the pool.
    Hope this helps.
    Good luck.
    Xuran
    "Jacky Yan" <[email protected]> wrote in message
    news:9m0tmp$[email protected]..
    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

  • How to automate the changing of Width and Height of the document

    Hi,
    I just want to know if anyone already automate the changing of width and height of document(eps file).
    Thanks,
    Buddy

    Check out SetDocumentSetup from kAIDocumentSuite.

  • How to create the oracle database for MDM

    Hello Friends,
    I am new to MDM technology. I have been asked to install MDM 5.5 on windows with oracle database.
    i have gone through the installation guides and master guide of MDM. But in the installation the procedure is not given to create the data base after oracle installation. i want to know do i need to create the database manually if yes then what should be the DBSID of the database and schema name etc.
    Please help.
    Thanks,
    Manoj

    Well, let's rock.
    <b>Oracle database creation</b>
    Use <b>Oracle Database Configuration Assistant</b> (Start -> Programs -> ...) to create a new database.
    The database naming (on Step 3) is up to you. I used MDM as for SID and MDM.<MYHOSTNAME>.<MYDOMAIN> as for the db name.
    Be sure you select UTF8 for the character set (on Step 12) - this requirement is mentioned in the SAP MDM Installation Guide.
    All other settings can go default.
    <b>Listener and TNS name configuration</b>
    The next step is to configure a listener and tns name for your database.
    Run the <b>Oracle Net Configuration Assistance</b> and select the "Listener configuration". Default settings on the wizard pages should suite your configuration.
    Click Finish.
    Run the <b>Oracle Net Configuration Assistance</b> again and select the "Local Service Name configuration". Add one. Choose the name of the database for the service name. It was MDM.<MYHOSTNAME>.<MYDOMAIN> for me.
    Ensure that you use name of the database that you've entered during the database creation.
    Everything else should go as suggested by default.
    Once you are at the Test stage of the wizard and get the "invalid login/password" message, clisk "Change login" and use SYSTEM user and the password you\ve entered during databae creation.
    After the test passes, you can connect to your Oracle database through the MDM Console.
    Please, let me know if you have any questions, I'll help.
    Thanks!

  • The Oracle database engine and forms - functionality query

    I have an interest in establishing how the Oracle System Catalogues cope with particular changes. I have never used Oracle, but I have carried out the same test on another RDBMS. If I had access to Oracle I would have carried out this test myself.
    The test goes as follows.
    Create a new database.
    Create a new simple table, with just a few columns.
    Create a form for the table, and add a few rows.
    Rename the table or a column – if you can’t, then the RDBMS is Code Class.
    If you can rename the table or a column, then do so, and invoke the form that you used before changing the table or column name. If it doesn’t work, the RDBMS is Code Class; if it does then the RDBMS is Identifier Class.
    In an Identifier Class RDBMS changes of column or relation/table name will not interfere with the operation of any form already in place based on that table.
    I'll be very grateful if anybody can give me a definitive answer on this, either through already having explored the issue or by running the test.

    Hello again William,
    now it becomes challenging. The conceptual shift required to get to Identifiers is similar in scale to the shift involved in going from Newtonian Mechanics to Quantum Mechanics or from Cartesian Space-Time to Special Relativity, with the added proviso that the concept of identity built into the Relational Model is implicit rather than explicit as respectively in the cases of Newton and Descartes.
    Your "you are not expecting.." sentence is a perfect statement of where I am - I'm not looking for the RDBMS to have any impact on application code - that would be a truly ridiculous expectation; this would make some crazy version of a cascade update, with remoteness as an extra complication. In IC applications (including RDBMSs) cascade updates are never needed.
    The next sentence also has a very strong aspect ("allow applications ... to .. compilation time) but is weaker in the "simply hoping" and "might". I havn't developed a RDBMS that does that, although I hope to participate in such a development exercise soon, but I have developed an application that does exactly what you say. Binding/joining depends on something permanent rather than something transient, where names and abbreviations are all transient, as are all pure attributes once they have had identity (and relative position) stripped out them.
    In your next paragraph I disagree that there is only a shift of problem. The dropping of whole tables or the deletion of columns is on a different scale from the changes that I am talking about, which do not but could get sensibly reflected in the current Code Class RDBMSs and applications. I'm aware that no application development tool allows what you say, (the problem is actually in the system tables) but I have achieved the completely analogous result in the application that I have developed.
    Your comments about the AREAS table precisely highlight the issues of permanence and transience on which all of my work sits. What are you doing when you drop the table and replace it with a table with the same name? Do you want to think of the "new" table as the SAME as the "old" table or is it something entirely DIFFERENT, in which case giving it the name of a table that you have dropped might easily result in serious confusion.
    If the new table is doing the same conceptual job as the old, then I would certainly want the continuity of its existence to be explicitly preserved, via the enduring identifier value (which reflects the fact that we are thinking of the table as having continuity of existence). So I would alter the table rather than dropping it and recreating it.
    If I have ended up in a cul-de-sac (I've been there) and I have to throw away the table and all its related operators, then that is what happens if I don't get it right first time. I don't want any continuity, and I'll have to junk all the form and report etc operators unless I want to preserve some bits for my next attempt. I certainly won't expect anything to continue to work, because there is nothing to work on.
    Your use of the expression "fancy name-independent code" is disappointing in all respects. I experience your use of "fancy" as sarcastic, and my full expression for "name-independent code" is "attribute independent and relative position independent identifier" whose acronym is "airpii". This is not just name-independent, it's independent of all other attribute and relative position values in the same row. It's certainly not a code: the word does not have a place in Identifier talk, since it has been replaced by abbreviations and acronyms, which are undiluted attribute; they don't have identity mixed up in them as with the "codes" of the "Codes Mistake". (In RDBMSs the mistake is called the "Names Mistake" because table and column names bear identity as well as attribute; there are no codes.)
    I very much hope that our dialogue can continue - other dialogues have stopped at this sort of stage. On my website www.identifiers.org there is a page called "Identifiers - a Visual Representation" that sets out to communicate identifiers visually, that I created to communicate this entirely new concept in a different way after another database professional got stuck. I understand from another forum user that there may be a problem getting hold of the pdf file concerned if using Firefox - please let me know.
    I have an RDBMS application on a SCO partition on a PC that proved identifiers for me. I can input a work instruction successfully using one set of abbreviations (the codes of old) and the stored instruction row makes no reference to the abbreviations that I have input - there's just a single identifier value in the appropriate column of the work instructions relation. The relationship between the abbreviations and the identifier value becomes clear from rows in other relations.
    If I then want for some good reason (some purely operational entity has been renamed) to change one of the abbreviations when also changing the full name, I can do so in the relevant relation - this is an abbreviation rather than a code that I am now dealing with; I can change it because it's not also used for joins.
    When I input the next work instruction I use the new abbreviation rather than the old; the form is entirely happy and works fine, and exactly the same identifier value ends up in the appropriate column of the work instruction relation. So I have input a different set of values to achieve exactly the same result. Is this crazy? No! This reflects the ways in which we naturally think and talk, and at last the application makes sense - I don't have to use a code that does not tie up with the name. The core of the issue is that I have been able to reflect external CHANGE fully and successfully in the database. We are surrounded by change, but RDBMSs and applications currently do not allow us to process it properly.
    I acknowledge that no application development tool works in this way at present, but that's the fault of the architecture of system tables, which I intend to remedy. One can't remove the Codes Mistake from these tables.
    However Identifier Class Applications can be developed using Code Class RDBMSs, because the developer has control over the application relation design, which can be carried out under identifier principles. I redeveloped from relation design scratch a very successful application, so I had a good placebo. In my environment I needed a 4GL form development tool so that I could get identifier values (and other attribute values) from attribute input rather than being limited to searching for a "code" to get other row values.
    If seeing is believing and of interest, then we might arrange for you to see the IC application working.
    Yours,
    George

  • How to run the Oracle Triggers,Functions and Procedures from java

    Hi ,
    I want to execute the Oracle's Triggers, Functions and Procedures from java as like executing the SQL commands by using Execute statements.
    Or can we have some other option for doing this.
    Plz help me ...

    you can use CallableStatement interface of JDBC to execute any DBMS triger,stored procedure ....
    refer any of the JDBC book for extra help
    hope you got it
    Azeem Ahmed

  • How to check the Oracle database version

    Hi,
    How can i check, what type of database am using and which version?
    Can anyone help me to know?

    I am not sure what exactly you mean by "what type of database am using " but you can try this:
    select from v$version;*
    This will give you detailed version number of the database components. You can also use
    select from PRODUCT_COMPONENT_VERSION;*
    to get various components of the DB with their version.
    Onkar

  • How to run the Oracle SOA Suite and all its prerequisites on different mach

    Greetings,
    Due to the difficulty to run the SOA Suite and all its prerequisites, including JDeveloper, on a single machine, I would like to deploy the admin server, the soa server and the bam server on separate machines. Is it possible and, if yes, how ?
    Kind regards,
    Nicolas

    yes.
    You can just install db + rcu + wlst + soa on 1 machine. After that you middleware should be up and running.
    Now you can install jdeveloper + soa extensions on your client and connect to the remote location of the soa server
    or did i misunderstood you ?

  • How to access the oracle database using JNDI in iplanet sp1(i have used CURSOR TYPE with CALLABLE STATEMENT)

     

    ya, I have restarted. Can you please tell me whether the path which i am giving is right or not in the context file?
    Thanks,
    Gana.

  • What is the password for start and Shutdown Oracle8i?

    Dear all,
    I Can not know the password for shutdown and start(lost the password)
    My Sid & Global database is : ORCL
    After install complete
    Just do below step:
    Step 1 Start up/Mount my installed database with Oracle 8 SQL Plus.
    Connect as system/manager.
    Alter user sys identified by sys;
    Step 2 Connect as scott/tiger.
    Select * from emp;
    After I do this when I want Shutdown Oracle8i
    system ask my enter password!!
    can anyone help me?
    Nick wong

    try the following
    svrmgrl
    connect internal
    startupor
    svrmgrl
    connect internal/oracle
    startupIf you have a standard installation here are the passwords:
    Userid Password
    Internal Oracle
    Sys change_on_install
    System Manager
    BTW the documentation states how to change all of the passwords. There is a big security hole if you do not.
    Also there is a DBA discussion group where you can post database questions.

  • How to start oracle database server and client in windows 8

    Hi at all
    I'm a new entry in this forum and I'm a beginner with database oracle.
    I used always SQL Server as database and it was easy to use after installation.
    With SQL Server configuration management program I could to launch the SQL Server (SQLEXPRESS) service and the database server start up!!
    With SQL Server management studio I could to launch the client application, then was establishing a connection to the server and all was working fine!
    Now, how to work with oracle database?
    I installed oracle server and client version 11g R2 on windows 8, but how can I start the server database? .. and how can I start the client application for querying?
    regards in advance.
    P.S.: Sorry for my english. 

    SomeoneElse
    thanks for the response.
    I setting the service to start manually because otherwise windows is slow to startup.
    In particular I have precisely this oracle service on my operating system after installation.
    - ) OracleVssWriterSYSDBA
    - ) OracleDBConsolesysdba
    - ) OracleJobSchedulerSYSDBA
    - ) OracleMTSRecoveryService
    - ) OracleOraDb11g_home1ClrAgent
    - ) OracleOraDb11g_home1TNSListener
    - ) OracleServiceSYSDBA
    What are the services that start the server and I have to launch?
    What is the client program in menu --> start -- > all program --> Oracle - OraClient 11g home..... that I have to use for querying database?
    thanks.

  • Today My c: drive crashed...i had all my oracle database files and others in other resp drives.How to start by DB again as my services are destroyed.?!

    Today My c: drive crashed...i had all my oracle database files and others in other resp drives.How to start by DB again as my services are destroyed.?!
    or how to create a service for the database i had previously ??
    any help
    Aravind.

    AravindanJ wrote:
    Today My c: drive crashed...i had all my oracle database files and others in other resp drives.How to start by DB again as my services are destroyed.?!
    or how to create a service for the database i had previously ??
    any help
    Aravind.
    Where did Oracle software reside before  the failure & now?
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Not able to start the oracle database with ASM

    HI all,
    WE are using oracle10.2.0.1 on OEL5.
    I have mounted ASM but when i try to start the oracle database, it is asking "db is already started shut it down first"
    [root@localhost ~]# /etc/init.d/oracleasm listdisks
    VOL1
    VOL2
    [root@localhost ~]#
    [root@localhost ~]# su - oracle
    -bash-3.2$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:12:06 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> shutdown
    ORA-01012: not logged on
    SQL> startp mount
    SP2-0734: unknown command beginning "startp mou..." - rest of line ignored.
    SQL> conn / as sysdba
    Connected.
    SQL> shutdown
    ASM diskgroups dismounted
    ASM instance shutdown
    SQL> startup mount
    ASM instance started
    Total System Global Area  130023424 bytes
    Fixed Size                  2019032 bytes
    Variable Size             102838568 bytes
    ASM Cache                  25165824 bytes
    ASM diskgroups mounted
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    -bash-3.2$ export ORACLE_SID=dbtest
    -bash-3.2$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:13:30 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> exit
    -bash-3.2$ cd /u01/app/oracle/admin/dbtest/pfile/
    -bash-3.2$ ls -l
    total 8
    -rw-r----- 1 oracle oinstall 2442 May 27 23:07 init.ora.427201023913
    -rw-r--r-- 1 oracle oinstall 1406 May 31 01:44 sqlnet.log
    -bash-3.2$ pwd
    /u01/app/oracle/admin/dbtest/pfile
    -bash-3.2$ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:14:00 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> exit
    -bash-3.2$ sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:14:09 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> startup pfile="/u01/app/oracle/admin/dbtest/pfile/init.ora.427201023913';
    ORA-01081: cannot start already-running ORACLE - shut it down first
    SQL>
    -bash-3.2$ ps -ef|grep ora
    root      5501  5483  0 00:32 ?        00:00:00 hald-addon-storage: polling /dev/hdc
    root      6333     1  0 00:32 ?        00:00:00 /bin/su -l oracle -c sh -c 'cd /u01/app/oracle/product/10.1.0/db_1/log/localhost/cssd;  ulimit -c unlimited; exec /u01/app/oracle/product/10.1.0/db_1/bin/ocssd '
    oracle    6527  6333  0 00:33 ?        00:00:00 /u01/app/oracle/product/10.1.0/db_1/bin/ocssd.bin
    oracle    6849     1  0 00:49 ?        00:00:00 /u01/app/oracle/product/10.1.0/db_1/bin/tnslsnr LISTENER -inherit
    root      7637  7617  0 01:53 pts/2    00:00:00 su - oracle
    oracle    7638  7637  0 01:53 pts/2    00:00:00 -bash
    root      7751  6763  0 02:11 pts/1    00:00:00 su - oracle
    oracle    7752  7751  0 02:11 pts/1    00:00:00 -bash
    oracle    7773     1  0 02:12 ?        00:00:00 oracledbtest (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle    7777     1  0 02:13 ?        00:00:00 asm_pmon_dbtest
    oracle    7779     1  0 02:13 ?        00:00:00 asm_psp0_dbtest
    oracle    7781     1  0 02:13 ?        00:00:00 asm_mman_dbtest
    oracle    7783     1  0 02:13 ?        00:00:00 asm_dbw0_dbtest
    oracle    7785     1  0 02:13 ?        00:00:00 asm_lgwr_dbtest
    oracle    7787     1  0 02:13 ?        00:00:00 asm_ckpt_dbtest
    oracle    7789     1  0 02:13 ?        00:00:00 asm_smon_dbtest
    oracle    7791     1  0 02:13 ?        00:00:00 asm_rbal_dbtest
    oracle    7793     1  0 02:13 ?        00:00:00 asm_gmon_dbtest
    oracle    7805  7752  0 02:15 pts/1    00:00:00 ps -ef
    oracle    7806  7752  0 02:15 pts/1    00:00:00 grep ora
    -bash-3.2$
    {code}
    so anybody can help me how to start the oracle database....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    -bash-3.2$ sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:26:11 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> show parameter instance
    NAME                                 TYPE        VALUE
    active_instance_count                integer
    cluster_database_instances           integer     1
    instance_groups                      string
    instance_name                        string      dbtest
    instance_number                      integer     0
    instance_type                        string      asm
    open_links_per_instance              integer     4
    parallel_instance_group              string
    parallel_server_instances            integer     1
    SQL>
    -bash-3.2$ sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 31 02:26:11 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> show paramete instance_name
    SP2-0158: unknown SHOW option "paramete"
    instance "local"
    SP2-0158: unknown SHOW option "_name"
    SQL> show parameter instance
    NAME                                 TYPE        VALUE
    active_instance_count                integer
    cluster_database_instances           integer     1
    instance_groups                      string
    instance_name                        string      dbtest
    instance_number                      integer     0
    instance_type                        string      asm
    open_links_per_instance              integer     4
    parallel_instance_group              string
    parallel_server_instances            integer     1
    SQL>
    -bash-3.2$ ps -ef|grep pmon
    oracle    7777     1  0 02:13 ?        00:00:00 asm_pmon_dbtest
    oracle    7851  7752  0 02:32 pts/1    00:00:00 grep pmon
    -bash-3.2$
    -bash-3.2$

  • How do i connect to the oracle database

    I just downloaded oracle 9i from your website. I wanted to know how do I receive or create my own username and password so I can access the oracle database.

    Hi,
    Two user accounts are automatically created with the database:
    SYS (default password: CHANGE_ON_INSTALL)
    SYSTEM (default password: MANAGER)
    (More info at : http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96521/dba.htm#852)
    Both these accounts are database adminstrators. You can use either of these to connect to your database and create more users.
    To create new users use this SQL command after connecting to your database
    SQL> CREATE USER <username> IDENTIFIED BY <password>
    SQL> GRANT CREATE SESSION TO <username>
    For more information on creating users refer to http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96521/users.htm#16513
    Hope this helps.
    Sujatha.

  • Help! How do I know the Oracle daemon started on Linux.

    Dear Madem/Sir!
    I had installed the Oracle 9.2 on the Red Hat Linux 8.0 platform.
    But how do I know the Oracle Daemon started when the Linux startup?
    Please help me to figure out it!
    thanks and regards,
    Janus
    [email protected]

    A couple of ways, but easiest is to run the command "ps -ef" at a shell prompt. It will tell you which processes are running on your server. If oracle is running, you should see several oracle processes.
    You may also try running "sqlplus" and see if it will let you connect to the database. Generally, if you try to run SQL*Plus and the database is not started, you will get an error message to that effect.

Maybe you are looking for