When to Use Startup / Shutdown DB and Alter Database Command in 12c_1582453.1
When to Use Startup / Shutdown Database and Alter Database Command in 12c (文件 ID 1582453.1)
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.1 [Release 12.1]Information in this document applies to any platform. GoalThis document provides information about how to startup / shutdown pdf SolutionBefore 12c there are only few commands available for startup and shutdown but if we follow that we end up starting and stopping only cdb and you will come to know from below list of command. shutdown normal shutdown immediate shutdown abort startup startup nomount startup mount If we use one of these traditional shutdown methods at the container database (CDB) layer, we will bring down the CDB and the associated PDBs under it. This is something to be aware of when looking to reboot a container databases. Lets take a look at bringing down a CDB. SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- ora12c SQL> show con_name; CON_NAME ------------------------------ CDB$ROOT SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> alter session set container=PDB1; alter session set container=PDB1 * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 Now, that we established that SHUTDOWN IMMEDIATE at the CDB level will close the CDB and all other PDBs How can we shutdown just a single PDB if needed? There are two different ways to shutdown a PDB. 1. The first of which is from the CDB layer. We use this method for maintenance purpose without affecting other pdb. We can shutdown a PDB from the CDB level using the ALTER PLUGGABLE DATABASE command. alter pluggable database open read write alter pluggable database open read only alter pluggable database open upgrade alter pluggable database close e.g. First find out current state of pdb’s SQL> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 2 PDB$SEED READ ONLY 3 PDB1 MOUNTED 4 PDBTEST MOUNTED 5 PDB2 MOUNTED How to open these pdb’s
SQL> alter pluggable database PDB1 open;
Pluggable database altered. SQL> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 2 PDB$SEED READ ONLY 3 PDB1 READ WRITE 4 PDBTEST MOUNTED 5 PDB2 MOUNTED Open command in pdb is alter pluggable database but not startup 2. The second of which of from the PDB layer We can use the normal SHUTDOWN commands as we would with a traditional database. In order to do this, we have to be in that PDB container first. Here is an example of closing PDB1 with the SHUTDOWN command. e.g. SQL> alter session set container=PDB1; Session altered. SQL> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 3 PDB1 READ WRITE SQL> shutdown immediate; Pluggable Database closed. SQL> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 3 PDB1 MOUNTED |
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1406992/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle shutdown and startupOracle
- Which SPFILE is Impacted when Issuing an ALTER SYSTEM Command? [ID 138119.1]UI
- use database 切換提示You can turn off this feature to get a quicker startupDatabaseUI
- Agent Startup Fails When the Repository DB Does Not Support TZ of Agent-332131.1AI
- To use Rman to duplicate database be careful of db_file_name_convertDatabase
- alter database in OracleDatabaseOracle
- Oracle Automatic Startup and Shutdown in Linux platformOracleLinuxPlatform
- alter database datafile offline and alter database tablespace ...offlineDatabase
- FastAPI 學習之路(五十四)startup 和 shutdownASTAPI
- alter database create datafileDatabase
- alter database create datafile '' as ''Database
- Restricting Access to a Database at StartupRESTDatabase
- alter database和alter system和alter session的區別DatabaseSession
- How to use "for/" batch command in Dos extentionBAT
- Overview of Instance and Database Startup (289)ViewDatabase
- alter database open resetlogs;Database
- alter database offline 與 alter database offline drop效果比對Database
- db2_commandDB2
- alter database disable thread 2Databasethread
- ALTER DATABASE RESETLOGS 的作用Database
- DATA GUARD 中alter database 命令Database
- ALTER DATABASE DATAFILE OFFLINEDatabase
- ALTER DATABASE 與 ALTER TABLESPACE OFFLINE的區別Database
- When to use var vs let vs const in JavaScriptJavaScript
- db支援共享模式連線的話shutdown通常會很慢(dispatcher shutdown)模式
- Overview of Database and Instance Shutdown (302)ViewDatabase
- Failed to shutdown database console gracefullyAIDatabase
- 忍不住問下alter system 和alter database的區別Database
- DEPRECATED: Use of this script to execute hdfs command is deprecated.
- Troubleshooting Database Control Startup IssuesDatabase
- Oracle DBA命令參考——alter databaseOracleDatabase
- How to use rman backup a noarchivelog databaseHiveDatabase
- Exclusive access could not be obtained because the database is in useAIDatabase
- What is the Impact on the Database When Modifying the OS DateDatabase
- What Happens When You Open a Database (297)APPDatabase
- ALTER DATABASE CLEAR UNARCHIVED LOGFILE的使用DatabaseHive
- alter database ... create datafile的原理及用途Database
- alter database datafile 4 offline drop;Database