How to bounce database automatically

Dear all,
I want to write a script and schedule it in crontab, if it is ebs I have scripts addbctl.sh and addlnctl.sh to stop database and listner. But in another application (not ebs) these scripts are not available and I have to manually bounce database, giving commands SHUTDOWN IMMEDIATE and STARTUP after logging in into sqlplus, Is there any way to do this.
Regards,
Charan

Hi Charan;
I have exported ORACLE_HOME and ORACLE_SID, but still not working. This is the script after exporting them
export ORACLE_HOME=/aa/aa/aa/aa/aa
export ORACLE_SID=aaa
sqlplus apps/pwd
select count(*) from dba_objects where status='INVALID';
exit
echo "the date of checking is $(date)"Firslty you are mention how you bounde database in your thread and now you are trying to solve your script. This scirpt doesnt mention any db related issue.
So what you want to want
1. Bounde db
2. Edit sh?
If you mention sh than your sh not correct, you can try to type something like
export ORACLE_HOME=/xxx/11.2.0
export ORACLE_SID=VIS
$ORACLE_HOME/bin/sqlplus apps/xxxd @/xxx/cm_invalid.sql log=/xxx/cm_invalid.log
You can check log or can send email to yourself
PS:cm_invalid.sql=your query
Regard
Helios

Similar Messages

  • Upgraded 9.2.0.6 on Windows - How to Start Database Automatically?

    I upgraded a 9.0.1.5FIPS database used as a metadata repository for OracleAS 10g (9.0.4) to 9.2.0.6 to meet a customer's security requirements.
    The Windows service for the database is set to automatic and the instance starts automatically but the database is no longer started. I must issue a STARTUP command to mount and start the database. Before this was done automatically when the Windows service started.
    Anyone know how I can configure the database to mount and start when the instance is started?
    TIA,
    Jim

    Hi Nicolas,
    Thanks very much for the instructions. I altered the system as you described and shutdown and restarted the database:
    SQL> alter system set compatible = '9.2.0.6.0' scope=spfile;
    System altered.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 185671468 bytes
    Fixed Size 454444 bytes
    Variable Size 134217728 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    SQL> show parameter compatible
    NAME TYPE VALUE
    compatible string 9.2.0.6.0
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> exit
    ERROR:
    ORA-12152: TNS:unable to send break message
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production (with complications)
    D:\orahome3\bin>sqlplus /nolog
    SQL*Plus: Release 9.2.0.6.0 - Production on Wed Nov 30 08:20:36 2005
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> connect / as sysdba
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 185671468 bytes
    Fixed Size 454444 bytes
    Variable Size 134217728 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    Now I get these error messages in oradim.log when I stop and start the Windows service:
    Wed Nov 30 08:25:14 2005
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Wed Nov 30 08:25:16 2005
    ORA-01078: failure in processing system parameters
    Any ideas on what else I could look at?
    Thanks!
    Jim

  • How to mounted oracle database automatically  in oracle version 8.1.7?

    i want to know,how to mounted oracle database automatically in oracle version 8.1.7?

    Does this mean you are not using the WIndows operating system, or you doi not want to do this 'manually' using some point and click method?
    If this means, "do it automatically for reboots" and you are using the Windows OS, you need to set up a service and set it to automatic at reboot. Or, again in a Windows environment but at commnand line, use "net start {service name}" - as described in the manual.

  • How to create database item for fast formula?

    Hi,
    Is there any document for how to create database item for fast formula? I could not find in Metalink or this forum. Thanks.
    Andy

    Oracle ship many pre-delivered Database Items plus they're created automatically when you create Input Values (etc).
    There's often something already there for you. If there's not, you usually create Fast Formula functions to retrieve other data. You don't create your own custom DBIs; Oracle don't deliver APIs for that.

  • How to Export DataBase

    Hello
    How to export database in one line query in command Prompt. Again i explain Single Line Query. I have some Problem in it.
    Thanks

    Hi
    It comes bundled with 10g DB Software so when you install your DB software it is automatically installed and available to you.
    Follow this link to get more info on EXPDP
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_overview.htm
    Cheers

  • How to create database with ASM

    HI
    How to create database with ASM?
    I install vmware workstation on window XP .On virtual machine install Linux 5 enterprise (Oracle) install.
    I install oracle DB software only. Also make 3 disk for ASM .
    1 -- When I want to install oracle DB with ASM . In this process candidate disks not show . Why?
    How I can see disks ..
    so I simple install oracle DB software only.
    2 -- Now I want to create database with ASM by DBCA .
    What process I will follow ?
    Please guide me
    Thanks

    Hi
    Steps to create database with ASM.
    1.Install oracle binary with active CRS(For single node installation CRS is activated when you run root.sh) .
    2.Create disk without file ssytem.
    3.Assign disk to raw .
    4.Change owner and permission to raw devices.
    5.Configure ASM manually or USing DBCA.
    Manually ASM Configuration.
    a.Create initialization parameter file and password file.
    b.Mandatory parameter is "instance_type=asm" as per your need configure rest of parameter like db_cache_size,large_pool_size,processes,remote_login_passwordfile,shared_pool_size etc..
    c.To discover disk configure "asm_diskstring=/dev/raw/raw*"
    Using DBCA to configure ASM.
    1.In storage type section choose ASM.It will ask for password of sysdba in 10g.
    2.ASM configuration window will open -> here it create disk group -> it shows all available ASM candidate disk automatical -> choose normal redundancy,external redundancy or high redundancy.
    ASM disk also can be conbfigured with ASMLIB .
    If ASM disk is configured you can start asm instance in nomount state and query to v$asm_disk to see all candidate disk.V$asm_disk only shows disk which is configured in asm_diskstrings.
    Hope this will help U,
    Tinku

  • How to let database(10.2) auto startup when linux reboot?

    Hi all,
    I installed oracle database 10.2 in linux (x86),and created a database.
    I can startup the database manually. But database can not be started up automatic when linux starts up.
    How to let database startup automatic when OS starts up?
    the details shell scripts for auto startup would be appreciated!
    Thanks

    I don't know LINUX but I know Solaris. In Solaris, you have a startup and shutdown script in $ORACLE_HOME/bin. Setting the field to Y in oratab means you startup/shutdown the instance when executing the scripts. However, it does not mean the startup script will be
    executed upon reboot. In solaris, we place a script in /etc/rc3.d. Then the script will be executed upon reboot. Guess you have similar features in Linux.

  • How to re-order automatically the number of primary key column in MySql that has been set as auto_increment if one of the row deleted?

    Hello,
    Can anyone show me the way how to re-oder automatically the number of primary key that has been set as auto_increment in mysql database when the row deleted?
    example:
    No (primary key=auto increment)|
    Name |
    AGE |
    1
        | JO
    | 21
    |
    2
        | Kyle
    | 25
    |
    3
        | Macy
    | 30
    |
    When delete 1 row:
    No (primary key=auto increment)|
    Name |
    AGE |
    1
        | JO
    | 21
    |
    2
        | Macy
    | 30
    |

    Hello,
    This is not a VB.NET question, best to ask this question in
    MySQL forum.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Oracle database automatically shutdown when i restart computer

    Hi all!
    i have some problems, so i want your help
    i have the database which name is ORCL but i don't understand why when i restart my computer, my database automatically shutdown, so i alway have to execute this command after restarting my computer
    connect / as sysdba
    startup
    could you show me how to fix that error
    help me!

    Hi,
    Refer this thread for a full explaination...
    Oracle service failed to start in a timely manner
    Regards.

  • Online backup of the Oracle Collaboration Suite Database automatically ever

    Hi everybody!
    How to perform an online backup of the Oracle Collaboration Suite Database automatically every half-hour (every 10 minutes)?
    Thanks a lot for your helps.

    Hi,
    Take a look at the Backup and Recovery Basics book in the Administration section of the Database library. This will explain how ArchiveLog works.
    richard

  • How to switch off automatic creation of the business partner?

    Hello!
    Advise please why in erp after creation of the customer automatically form business partner? How to switch off automatic creation of the business partner? It very much disturbs, because business partner are created from crm. Because of automatic creation business partners are duplicated.

    Hi,
    I have made the following customizing settings to activate customer integration with business partner, but the problem is when I create a BP with a role (FI-Customer) the customer is not created automatically.
    1. Set BP Role Category for Direction BP to Customer
    Roles: FLCU00 - Business Partner FI Customer (FS: BP)
    FLCU01 - Business Partner Customer (FS: BP)
    2. Defined the Number assignment for Direction BP to customer
    4. Customer account group and numbering is also defined.
    3. Created a BP with BP Role FLCU00, I can see the Customer - General Data tab, but no customer was automatically generated by the system.
    Kindly let me know if any customizing I have missed.
    Regards
    Ameya

  • In Pages 5, Maverick, How do I stop automatic conversation of URLs to hyperlinks and seeing them underlined

    There used to be a preference setting in Pages.  Now it seems gone in Pages 5.   So how do I stop automatic conversation of URLs to hyperlinks and seeing them underlined in text.  Sometimes I want it, but not always.

    The preference setting to turn off links is gone. When you enter content that triggers link detection, a link character style gets applied. Right-click on the link, choose Edit Link from the menu, and then Remove.
    To prevent Pages from automatically detecting links, visit Edit > Substitutions > and deselect Smart Links.

  • How to set up automatic payment for the purchase order

    Hi, All,
    I have one question how to set up automatically payment for the Rent Office purchase Order?
    There is the requirement from the client. They want to create one kind of purchase order for the Office Rent, then pay the fees in the certain time of every month to the vendor for the rent fees without any invoice. Whatu2019s the normal solution for this kind of purchase order? Is it ERS? Or something else?
    Please give me the details and business flow. Also please tell me how to setup in the SAP and T-code.
    Thanks in advance

    Either you can set up ERS or you can pay directly from the FI side.
    Prerequisites
    Evaluated receipt settlement must be flagged in the purchase order item.
    The vendor must be flagged as being subject to ERS in the vendor master record.
    The goods receipt must refer to a purchase order.
    Goods-receipt-based Invoice Verification must be defined for the purchase order item.
    A tax code must have been maintained in the purchase order item.
    The order price of the materials may not be an estimated price.
    If you flag a vendor as being subject to ERS, the system sets the ERS indicator as a default in each item when you create a purchase order for the vendor. You can prevent this happening for certain vendors by flagging the info record for the material and the vendor as not being subject to ERS.
    In Purchasing, you can delete the default ERS indicator in a purchase order item.
    Choose Logistics Invoice Verification ® Automatic Settlement ® Evaluated Receipt Settlement (ERS).
    The selection screen appears.
    You can use the following criteria to narrow down selection of the transactions to be settled:
    Company code
    Plant
    Goods receipt posting date
    Goods receipt document
    Fiscal year of the goods receipt
    Vendor
    Purchase order and order item
    You can define the selection criteria for the invoice documents by:
    Delivery
    Purchase order
    Purchase order item
    Goods receipt document
    Credit memo
    Invoice
    Currency
    Choose  Execute.
    The system issues a log for Evaluated Receipt Settlement, which displays the following:
    Settled
    In line with your selection criteria, the system displays all the order items that were settled (or if you are working in test mode, which would have been settled).
    Could not be settled
    In line with your selection criteria, the system displays all order items for which ERS is defined but could not be settled. It also lists the reasons.
    If the system reports being unable to invoice a transaction, you should exclude the transaction from ERS to avoid it being included in the log the next time ERS is run.
    Select the item and choose Exclude from ERS.
    The system also generates and possibly sends a message to inform the vendor(s) about the transaction settled, depending on the settings in Customizing.
    You can display the following environment information for the order items selected. To do this, choose Goto ®:
    Display purchase order
    Display invoice
    Display material document
    Display long text

  • How do I stop automatic email notifications?

    How do I stop automatic email notifications?
    I had thought that I was subscribing to just a single thread but it appears that I'm now being notified about every message in every thread.  The last time I logged on I received over 200 messages.
    If it doesn't stop I will have to resort to changing my email address.

    http://forums.adobe.com/message/1876437#1876437
    Post #3,
    Juergen

  • Does anybody no how to switch off automatic updates on the iphone 5.

    Does anybody no how to switch off automatic updates on the iphone 5 many thanks was1521 UK.

    The reason i asked about automatic updates was because my provider 02 told me about it they said turn it off or get something called a Bolt-on which would provide me with so much internet data at a set price so thanks for your reply Kilted Tim.

Maybe you are looking for

  • BC4J send messaging adapter gets JMS exception

    Running a 9i standalone application based on BC4J. The following code is trying to send a single VO to an 8i queue. Note: prior to entering this routine, I have already called the .writeXML() method on the same VO and looked at the text and the XML a

  • Rocketfish web camera problem

    I have iChat 4.0.5 on an older PowerMac G4 (USB 1.1) and just got a Rocketfish web camera model RF-WEB2C. On my PowerMac it indicates that the camera is in use by another application. When I plug it on a newer MacBook Pro it works fine. Is the proble

  • [SOLVED] Cannot build openswan from AUR

    Hello everybody, I have an error when I try to upgrade openswan with yaourt/AUR (2.6.24-2 => 2.6.25-1) on a i686 arch install This is the error : make[3]: Entering directory `/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/OBJ.linux

  • I need to know where bookmarks addresses are saved.

    if i reinstall windows, i presume that i can loose my bookmarks from firefox. so, i'd like to know where this are saved, to copy and save them.

  • Consumption not updated - MVER not update

    Hi experts, Here's my case : - inital stock has been uploaded via mvt 561 - a consumption mvt (201) has been done - a month later another consumption mvt (201) has been done The thing is the first consumption has not been updated in MVER table wherea