What is the use of 'ALTER DATABASE CLOSE'?

Hello Everybody,
SQL*Plus: Release 10.1.0.2.0 - Production on Ma Aug 15 21:28:30 2005
Copyright © 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn / as sysdba
Connected.
SQL> startup force
ORACLE instance started.
Total System Global Area 171966464 bytes
Fixed Size 787988 bytes
Variable Size 145750508 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL> select status from v$instance;
STATUS
OPEN
SQL> alter database close;
Database altered.
SQL> select status from v$instance;
STATUS
MOUNTED
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-16196: database has been previously opened and closed
If i have to shutdown the instance and database then
WHAT IS THE USE OF 'ALTER DATABASE CLOSE' ?
I need explanation. Why should i shutdown?
Dont give me this answer.
ORA-16196: database has been previously opened and closed
Cause: The instance has already opened and closed the database, which is allowed only once in its lifetime.
Action: Shut down the instance.

If you read the documentation you will see that there is no ALTER DATABASE CLOSE command.
This is an undocumented Oracle command, which we are not supposed to use. Consequently we are not allowed to complain about the way that it works. Instead we're supposed to use SHUTDOWN IMMEDIATE.
Cheers, APC

Similar Messages

  • What is the Use of  "Alter database activate standby database"

    Hi ,
    I appreciate your time.
    I just wanted to know what is the use of "Alter database activate standby database" command when doing the failover. How different it will act in failover process. Can we use this command in SwitchOver.
    Thanks in advance.

    Hi Uwe Hesse,
    Wonderfull... good info....
    So my understanding is that the use of "ACTIVATE PHYSICAL STANDBY DATABASE" is conditional and depends on the redo log gap and the Database status(Able to mount or not).
    Condition 1: If the Db is in Mount state and Redo log gap is successfully filled.
    1) Flush any unsent redo from the primary database to the target standby database.
    SQL> ALTER SYSTEM FLUSH REDO TO target_db_name;
    Note: If the above Statement Completes successfully without any errors.
    2) Stop Redo Apply.
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    3) Finish applying all received redo data.
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
    4) Verify that the target standby database is ready to become a primary database.
    SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
    5) Switch the physical standby database to the primary role.
    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
    Condition 2: If the DB is not able Mount and Redo Gap can't be filled.
    Important Note: If the the above command in STEP3 gives error, some received redo data was not applied. Try to resolve the cause of the error and re-issue the statement before proceeding.
    If the error condition cannot be resolved, a failover can still be performed (with some data loss) by issuing the following SQL statement on the target standby database:
    SQL> ALTER DATABASE ACTIVATE PHYSICAL STANDBY DATABASE;
    Thanks in advance.

  • What is the difference between alter database and alter tablespace?

    Hi
    I was searching for the difference between these 2 commands and have gotten not much conclusive result. Can anyone enlighten me on what is the difference if I were to use ALTER DATABASE OPEN READ ONLY compared to ALTER TABLESPACE x READ ONLY?
    My objective to is control, such that sometimes users can edit the database, and other times, not possible to do so.
    Thanks in advance.
    wy

    Hi,
    A database can be made with more than one tablespace.
    You can have a table called A into a tablespace TSA and a table called B into a tablespace TSB, then if you use ALTER DATABASE OPEN READ ONLY any tablespace can be writen, but if you use ALTER TABLESPACE A READ ONLY, you can't write, insert into table A because it is read only, but you can write, insert rows into the table called B because the tablespace B isn't read only.
    You need to do ALTER TABLESPACE B READ ONLY to deny the inserts into table B.
    You should do this for all tablespace that make the database.
    Regards,
    Jordi

  • What is the use of Offline Database Object in SOA

    Hi All,
    Can anyone let me know the purpose of Offline Database Object in SOA.
    1) When we will create the Offline Database Object in soa ?
    2) How do we connect this object to any data base schema ?
    Note:- Please provide me the example on this
    Thanks,

    Hi Dominik,
            Thanks for the repy !!!!
    Now, as you said we can access a (deep) node of the whole model using an access object.
    Let us consider the component set ONEORDER. As seen we can use the following path to reach BTDocFlowAll using search object :-
    BTQuery1O -> BTOrder  -> BTOrderHeader  -> BTHeaderDocFlowSet -> BTDocFlowSet -> BTDocFlowAll ....
    Also, to reach BTDocFlowAll we can even use the access object as follows :-
    BTAdminI -> BTItemDocFlowSet  -> BTDocFlowAll....
    Now my question is :-
    Normally we use the class cl_crm_bol_query_service to fire a search based on a search object. Can we use the same class to fire a search based on access object ?
    (actually I currently dont have a CRM system so I could not try it out myself).
    If not, then how do we fire a query using an access object ?
    Regards,
    Ashish

  • What is the use of initial value in a database table?

    Hi can anyone help me in knowing what is the use of initial value which is present besides primary key while creating a table?

    Initial Value:
    Indicator that NOT NULL is forced for this field
    Use
    Select this flag if a field to be inserted in the database is to be filled with initial values. The initial value used depends on the data type of the field.
    Please note that fields in the database for which the this flag is not set can also be filled with initial values.
    When you create a table, all fields of the table can be defined as NOT NULL and filled with an initial value. The same applies when converting the table. Only when new fields are added or inserted, are these filled with initial values. An exception is key fields. These are always filled automatically with initial values.
    Restrictions and notes:
    The initial value cannot be set for fields of data types LCHR, LRAW, and RAW. If the field length is greater than 32, the initial flag cannot be set for fields of data type NUMC.
    If a new field is inserted in the table and the initial flag is set, the complete table is scanned on activation and an UPDATE is made to the new field. This can be very time-consuming.
    If the initial flag is set for an included structure, this means that the attributes from the structure are transferred. That is, exactly those fields which are marked as initial in the definition have this attribute in the table as well.
    hope it helps,
    Saipriya

  • ORA-1109 signalled during: alter database close

    Hi
    i have found the following error in alert log after i shut down my database for cold backup
    alter database close
    ORA-1109 signalled during: alter database close...
    Please advice is there any threat because of this error and whats the reason for the occurence of this error.
    Version of DB: 10.2.0.4.0
    I have DR configured for this db also..
    Regards,
    Arun Kumar

    Thats not the command i am using..
    I just use shutdown immediate.. when i use that command i get the sequnce of steps logged in alert log..
    there i find the error.. see below..(a part of alert log content)
    Shutting down instance: further logons disabled
    Sun Aug  9 19:12:39 2009
    Stopping background process CJQ0
    Sun Aug  9 19:12:39 2009
    Stopping background process MMNL
    Sun Aug  9 19:12:40 2009
    Stopping background process MMON
    Sun Aug  9 19:12:41 2009
    Shutting down instance (immediate)
    License high water mark = 5
    Sun Aug  9 19:12:41 2009
    Stopping Job queue slave processes, flags = 7
    Sun Aug  9 19:12:41 2009
    Job queue slave processes stopped
    Sun Aug  9 19:12:41 2009
    alter database close
    ORA-1109 signalled during: alter database close...*
    Sun Aug  9 19:12:41 2009
    alter database dismount
    Completed: alter database dismount
    ARCH: Archival disabled due to shutdown: 1089
    Shutting down archive processes
    Archiving is disabled
    Archive process shutdown avoided: 0 active
    ARCH: Archival disabled due to shutdown: 1089
    Shutting down archive processes

  • What is the use of SYSAUX Tablespace in Oracle 10G

    Dear Experts,
    Please Tell me What is the use of SYSAUX Tablespace in Oracle 10G Because
    during Web Load Testing It is going to increase countinuosly.Although i am not using this with any tables.
    How Can I find out the what is gong on in this.
    Can I Remove this tablesspace and other non using Schemas like FLOWS_020100,MDSYS,OUTLN,DIP and TSMSYS etc.

    What is SYSAUX?
    The SYSAUX tablespace provides storage of non-sys-related tables and indexes that traditionally were placed in the SYSTEM tablespace. For example, the tables and indexes that were previously owned by the system user can now be specified for a SYSAUX tablespace. Unfortunately, Oracle still places the SCOTT schema and the other demonstration schemas in the SYSTEM tablespace. Go figure.
    The SYSAUX tablespace is specified with the CREATE DATABASE command. This is demonstrated in the example database creation script in Figure 1.1.
    CREATE DATABASE test
    MAXINSTANCES 1
    MAXLOGHISTORY 1
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/system01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    SYSAUX DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
    UNDO TABLESPACE "UNDOTBS1" DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    CHARACTER SET WE8ISO8859P1
    NATIONAL CHARACTER SET AL16UTF16
    LOGFILE GROUP 1 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo01.log') SIZE 10240K,
    GROUP 2 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo02.log') SIZE 10240K,
    GROUP 3 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo03.log') SIZE 10240K
    USER SYS IDENTIFIED BY "password" USER SYSTEM IDENTIFIED BY "password";
    Oracle10g sysaux
    With the new SYSAUX tablespace, Oracle comes closer to providing all the needed tablespaces for a truly OFA-compliant database right out of the box. With just one CREATE DATABASE command we can specify the SYSTEM tablespace, the TEMPORARY tablespace, the AUXSYS tablespace, the default UNDO tablespace, and the redo logs.
    Of course, with the Oracle Managed Files option you can create an entire database with a single command, but the database created is not suitable for production use and is not OFA-compliant.
    The SYSAUX tablespace is required in all new 10g databases. Only the SYSAUX tablespace datafile location is specified. Oracle specifies the remainder of the tablespace properties including:
    online
    permanent
    read write
    extent managment local
    segment space management auto
    If a datafile is specified for the SYSTEM tablespace, then one must be specified for the SYSAUX tablespace as well. If one is not specified, then the CREATE DATABASE command will fail. The only exception is for an Oracle Managed File system.
    During any update of a database to Oracle Database 10g, a SYSAUX tablespace must be created or the upgrade will fail. The SYSAUX tablespace has the same security profile as the SYSTEM tablespace. However, loss of the SYSAUX tablespace will not result in a database crash, only the functional loss of the schemas it contains.
    Can I drop SysAux?
    DROP DATAFILE
    Read this...

  • What is the use of additon in up to 1 rows in SELECT statement

    Hi All,
             What is the use of up to 1 rows in select statement.
    for example
    SELECT kostl
          FROM pa0001
          INTO y_lv_kostl UP TO 1 ROWS
          WHERE pernr EQ pernr
          AND endda GE sy-datum.
        ENDSELECT.
    I'm unable to get in wat situations we hav to add up to 1 rows
    please help me out...
    Thanks,
    santosh.

    Hi,
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Regards,
    Bhaskar

  • What is the use of Withholding tax identification number field?

    Hello SAP Experts,
    I posted this question earlier but had to close because of no replies from anybody. Posting it again to see if I am lucky to get some answer this time.
    Can someone tell what is the use of field Withholding Tax Identification Number? Does it help with the reporting? Where does it get populated on the report if given at vendor or master record or within the withholding tax customization for company code? What is the difference between creating it in the customization for withholding tax information for company code and vendor/customer master record?
    As per SAP:  Withholding tax identification number
    This is a number issued by the tax authorities per withholding tax type.
    This number must be specified in Customizing either:
    (a) As part of the withholding tax information defined for the company code, or
    (b) As part of the withholding tax information defined in the customer or vendor master record.

    Hi Pete,
    The only thing that I could check is the content used in US:
    See content of this field for US:
    LFA1-STCD1      Social security number
    LFA1-STCD2      Employer identification number
    LFBW-WT_WTSTCD  Withholding tax identification number for WT Type
    In order to populate it, please kindly check the following:
    The reason why you cannot fill in the field WT_WTSTCD in transaction
    Fk02 however you can do it in XK02 (Change vendor centrally) can be due
    to wrong customizing of the field status group.
    Kindly check the following:
    SPRO->
    Finantial accounting -> Accounts receivable and accounts payable ->
    Define screen layout per activity (vendors) -> Change Vendor(Accounting)
    Company code data -> W/holding tax data, w/h tax 2 ->
    FIELD Withholding tax code,w/h tax 2 will be probably just available to
    display. Please, change it to optional entry.
    I hope I could be of assistance.
    Kind Regards,
    Fernando Evangelista

  • What is the use of commit work and rollback work

    hao friends,
    what is the use of commitwork and rollback work where we can use these open sql statements .
    thanks,
    anji

    hi all
    i have written the following code in my development system to change the records of my database.
    SELECT * FROM zyikostl INTO TABLE itab.
      LOOP AT itab INTO wtab.
        tabix = sy-tabix.
        DO.
          READ TABLE itab INTO ktab WITH KEY kostl_alt = wtab-kostl_neu.
          IF sy-subrc = 0.
            wtab-kostl_neu = ktab-kostl_neu.
            MODIFY itab FROM wtab INDEX tabix.
            CONTINUE.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
      ENDLOOP.
    MODIFY zyikostl FROM TABLE itab.
    In the development system i have only few records its working fine,but when it is been moved to test system there are 2500 records in the database so the report is taking much time(more than 5 hours )
    i sthere any solution for this ....
    thanks,
    vaasu.

  • What are the uses of portal

    Hi,
    Iam new to Enterprise portal.
    Can anybody tel me what are the uses of portal
    correct me if iam wrong " EP can be used from anywhere where the internet conncetion is available and anybody who is authorised to view the content"
    Thanks in advance
    SAI

    Hi,
    Your statement is correct. To be crisp, the portal offers a single point of access to SAP and non-SAP information sources, enterprise applications, information repositories, databases and services in and outside your organization—all integrated into a single user experience. It provides you the tools to manage this knowledge, to analyze and interrelate it, and to share and collaborate on the basis of it.
    With its role-based content, and personalization features, the portal enables users—from employees and customers to partners and suppliers—to focus exclusively on data relevant to daily decision-making processes
    To read more visit,
    http://help.sap.com/saphelp_nw04/helpdata/en/a9/76bd3b57743b09e10000000a11402f/frameset.htm
    Regards
    Srinivasan T

  • What are the uses of diffrent concepts in data warehousing

    What are the uses of diffrent concepts in data warehousing? Why?
    naveen

    Hi,
    Your statement is correct. To be crisp, the portal offers a single point of access to SAP and non-SAP information sources, enterprise applications, information repositories, databases and services in and outside your organization—all integrated into a single user experience. It provides you the tools to manage this knowledge, to analyze and interrelate it, and to share and collaborate on the basis of it.
    With its role-based content, and personalization features, the portal enables users—from employees and customers to partners and suppliers—to focus exclusively on data relevant to daily decision-making processes
    To read more visit,
    http://help.sap.com/saphelp_nw04/helpdata/en/a9/76bd3b57743b09e10000000a11402f/frameset.htm
    Regards
    Srinivasan T

  • Why do we create indexes for DSOs and Cubes.What is the use of it?

    Hi All,
    Can you please tell me why are indexes created for DSOs and Cubes.
    What is the use with the creation of indexes.
    Thanks,
    Sravani

    HI ,
    An index is a copy of a database table that is reduced to certain fields. This copy is always in sorted form. Sorting provides faster access to the data records of the table, for example, when using a binary search. A table has a primary index and a secondary index. The primary index consists of the key fields of the table and is automatically created in the database along with the table. You can also create further indexes on a table in the Java Dictionary. These are called secondary indexes. This is necessary if the table is frequently accessed in a way that does not take advantage of the primary index. Different indexes for the same table are distinguished from one another by a separate index name. The index name must be unique. Whether or not an index is used to access a particular table, is decided by the database system optimizer. This means that an index might improve performance only with certain database systems. You specify if the index should be used on certain database systems in the index definition. Indexes for a table are created when the table is created (provided that the table is not excluded for the database system in the index definition). If the index fields represent the primary keys of the table, that is, if they already uniquely identify each record of the table, the index is referred to as an unique index.
    they are created on DSO and cube for the performance purpose ..and reports created on them wil be also more efficent ..
    Regards,
    shikha

  • What is the use of XML file in EJB

    Hi,
    Generally EJB contains
    1) Home Interface
    2) Remote Interface
    3) Bean class
    4) XMl file
    In xml file we will mention something like
    <home>name of home interface </home>
    <remote?name of remote interface</remote>
    what is the use of this xml file and how it works.
    Thanks.

    It's called the deployment descriptor and it's used by the container to support your bean's configuration. For instance, if you want container managed persistence for an entity bean then you need to tell the container which table to use in which database with the column mappings, etc.

  • What's the use of this file?

    I found a file with the name [email protected] in $oracle_home/dbs.
    I deleted it and my oracle works as usual.
    What's the use of this file?
    Thanks

    I hope you took a backup of that file before zapping it. As a rule, it's a very bad idea to just delete a file in the Oracle directory to see whether anything breaks.
    If you had read the documentation you would have discovered that [email protected] is part of the RMAN configuration. So your database will continue to work up until the point you try to use RMAN to recover it. If you don't use RMAN then you probably won't miss that file.
    Cheers, APC

Maybe you are looking for

  • IOS 8.1 Music app not allowing search by artist

    On my iPhone 4S, I usually search music by artist. Since the update to 8.1, my phone no longer responds to searching through the alphabet down the RHS for Artist. It does for the Category Songs , but not for Artists. Have others experienced this?  Is

  • Windows Phone 8 and Windows InTune

    I just signed up for a 30-day Windows InTune trial account and I'm in the process of setting up mobile device management for Windows Phone 8 devices.  After looking through the documentation, I just want to verify that before I can even enroll any Wi

  • Master detail samples not displaying in IE

    I have copied the spry framework to our web server. All samples seem to work in IE except for the master detail samples. Any idea why it wouldn't be working in IE?

  • Could not load application module error in EBS 12.0.6 / JDev 10.1.3.3

    Hi, JDeveloper 10.1.3.3.0.3 Oracle EBS 12.0.6 I have extended a seeded VO (added only 1 new column). I am able to run the application successfully from JDev. I can see that the seeded VO is substituted by new VO when I click on "About this Page" - "B

  • Dynamic Parameter Requiring Database Login

    <p><span style="font-size: 7.5pt; font-family: Verdana">Hey All, </span><span style="font-size: 7.5pt; font-family: Verdana">Thanks in advance for any assistance.</span></p><p><span style="font-size: 7.5pt; font-family: Verdana">I created a report in