Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to start and shut down Oracle database

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to start and close the Oracle database, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The volume in C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin > dir oracle.exe drive C has no label.

The serial number of the volume is 7E62-AB2D

C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin directory

2017-03-08 13:41 291897344 oracle.exe

1 file 291897344 bytes

0 directories 59988402176 available bytes

C:\ > sqlplus / nolog

SQL*Plus: Release 12.2.0.1.0 Production on Thursday January 4 09:51:46 2018

Copyright (c) 1982, 2016, Oracle. All rights reserved.

SQL > conn / as sysdba

Connected to an idle routine.

SQL > startup nomount

The ORACLE routine has been started.

Total System Global Area 2768240640 bytes

Fixed Size 8922760 bytes

Variable Size 704645496 bytes

Database Buffers 2046820352 bytes Redo Buffers 7852032 bytes

2018-01-04T09:52:29.405663+08:00

Starting ORACLE instance (normal) (OS id: 23276)

2018-01-04T09:52:29.405663+08:00

CLI notifier numLatches:3 maxDescs:519

2018-01-04T09:52:29.419240+08:00

All SGA segments were allocated at startup

LICENSE_MAX_SESSION = 0

LICENSE_SESSIONS_WARNING = 0

2018-01-04T09:52:30.403967+08:00

Initial number of CPU is 1

Number of processor cores in the system is 1

Number of processor sockets in the system is 1

Using LOG_ARCHIVE_DEST_1 parameter default value as C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ RDBMS

Autotune of undo retention is turned on.

IMODE=BR

ILAT = 51

LICENSE_MAX_USERS = 0

SYS auditing is enabled

2018-01-04T09:52:30.674253+08:00

NOTE: remote asm mode is local (mode 0x1; from cluster type)

2018-01-04T09:52:34.865321+08:00

NOTE: Using default ASM root directory ASM

NOTE: Cluster configuration type = NONE [2]

NUMA system with 2 nodes detected

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production.

Windows NT Version V6.2

ORACLE_HOME = C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2

Node name: WIN-6NLPRCEFFBK

CPU: 1-type 8664, 1 Physical Cores

Process Affinity: 0x0x0000000000000000

Memory (Avail/Total): Ph:

VM name: VMWare Version (6)

Using parameter settings in server-side spfile C:\ APP\ ADMINISTRATOR\ VIRTUAL\ PRODUCT\ 12.2.0\ DBHOME_2\ DATABASE\ SPFILENEWTEST.ORA

System parameters with non-default values:

Processes = 300

Nls_language = "SIMPLIFIED CHINESE"

Nls_territory = "CHINA"

Sga_target = 2640m

Control_files = "C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CONTROL01.CTL"

Control_files = "C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CONTROL02.CTL"

Db_block_size = 8192

Compatible = "12.2.0"

Db_create_file_dest = "C:\ app\ Administrator\ virtual\ oradata"

Undo_tablespace = "UNDOTBS1"

Remote_login_passwordfile= "EXCLUSIVE"

Dispatchers = "(PROTOCOL=TCP) (SERVICE=newtestXDB)"

Local_listener = "LISTENER_NEWTEST"

Audit_file_dest = "C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ADMIN\ NEWTEST\ ADUMP"

Audit_trail = "DB"

Db_name = "newtest"

Open_cursors = 300

Pga_aggregate_target = 878m

Diagnostic_dest = "C:\ APP\ ADMINISTRATOR\ VIRTUAL"

Enable_pluggable_database= TRUE

NOTE: remote asm mode is local (mode 0x1; from cluster type)

2018-01-04T09:52:34.906339+08:00NOTE: PatchLevel of this instance 0

2018-01-04T09:52:36.278960+08:00

Starting background process PMON

2018-01-04T09:52:36.278960+08:00

PMON started with pid=2, OS id=23656

Starting background process CLMN

2018-01-04T09:52:36.311667+08:00

CLMN started with pid=3, OS id=23788

Starting background process PSP0

Starting background process VKTM

2018-01-04T09:52:36.325501+08:00

PSP0 started with pid=4, OS id=24392

2018-01-04T09:52:37.345560+08:00

VKTM started with pid=5, OS id=23596 at elevated (Time Critical) priority

2018-01-04T09:52:37.345560+08:00

VKTM running at (5) millisec precision with DBRM quantum (100) ms

2018-01-04T09:52:37.345560+08:00

Starting background process GEN0

2018-01-04T09:52:37.434916+08:00

GEN0 started with pid=6, OS id=24180

Starting background process MMAN

2018-01-04T09:52:37.497468+08:00

MMAN started with pid=8, OS id=23800

Starting background process GEN1

2018-01-04T09:52:37.528700+08:00

GEN1 started with pid=9, OS id=24540

Starting background process DIAG

2018-01-04T09:52:37.575494+08:00

DIAG started with pid=10, OS id=18772

Starting background process OFSD

Starting background process DBRM

2018-01-04T09:52:37.593249+08:00

OFSD started with pid=11, OS id=18340

2018-01-04T09:52:37.606837+08:00

Oracle running with ofslib:'?' Version=2

Starting background process VKRM

2018-01-04T09:52:37.622450+08:00

DBRM started with pid=12, OS id=24436

2018-01-04T09:52:37.638003+08:00

VKRM started with pid=11, OS id=23268

Starting background process SVCB

Starting background process PMAN

2018-01-04T09:52:37.669385+08:00

SVCB started with pid=13, OS id=19252

2018-01-04T09:52:37.700555+08:00

PMAN started with pid=14, OS id=18576

Starting background process DIA0

Starting background process DBW0

2018-01-04T09:52:37.719259+08:00

DIA0 started with pid=15, OS id=23156

Starting background process LGWR

2018-01-04T09:52:37.779935+08:00

DBW0 started with pid=16, OS id=24520

2018-01-04T09:52:37.794271+08:00

LGWR started with pid=17, OS id=24464

Starting background process CKPT

Starting background process SMON

2018-01-04T09:52:37.825503+08:00

CKPT started with pid=18, OS id=15632

2018-01-04T09:52:37.841120+08:00

SMON started with pid=19, OS id=19436

Starting background process SMCO

Starting background process RECO

2018-01-04T09:52:37.872548+08:00

SMCO started with pid=20, OS id=23940

2018-01-04T09:52:37.888087+08:00

RECO started with pid=21, OS id=22084

Starting background process LREG

2018-01-04T09:52:37.934875+08:00

LREG started with pid=7, OS id=23696

Starting background process PXMN

2018-01-04T09:52:37.966140+08:00

PXMN started with pid=24, OS id=23760

Starting background process FENC

2018-01-04T09:52:37.981756+08:00

FENC started with pid=25, OS id=24060

Starting background process MMON

2018-01-04T09:52:37.997371+08:00

MMON started with pid=26, OS id=23084

Starting background process MMNL

2018-01-04T09:52:38.013067+08:00

MMNL started with pid=27, OS id=24460

2018-01-04T09:52:38.013067+08:00

Starting up 1 dispatcher (s) for network address'(ADDRESS= (PARTIAL=YES) (PROTOCOL=TCP)) '...

Starting up 1 shared server (s)...

Starting background process TMON

2018-01-04T09:52:38.059907+08:00

TMON started with pid=30, OS id=23636

ORACLE_BASE from environment = C:\ app\ Administrator\ virtual

2018-01-04T09:52:40.622915+08:00

Using default pga_aggregate_limit of 2048 MB

Oracle12C architecture

Five important components

Services for connecting database instances: ways to work together in the architecture of the Oracle system

Server process

File system management

Memory area Management: especially the characteristics and functions of system Global area (SGA,SystemGlobal Area)

Background process

3 key architectures

Memory structure, process structure, storage structure

From the figure above, we can see that each Oracle server contains two main components, namely, Oracle instance and Oracle database (physical system).

Relationship between Oracle server, Oracle instance (instance), Oracle database (database)

The relationship between an instance and a database is that the database can be loaded and opened by multiple instances, while the instance can be loaded at any point in time to open a database

If Oracle is compared to a car, then the example is like the engine (core) of the car. Before starting Oracle, you must ensure that the instance starts first, and the goods pulled on the car are the database.

Oracle case system

When the database is started, the SGA (system global area) memory is automatically allocated to form the memory structure of Oracle, and then several memory-resident operating system processes are started, which has formed the process structure of Oracel. The memory area and background processes constitute an Oracle instance.

Each running Oracle database corresponds to an Oracle instance (or routine). When each instance starts, it allocates its own memory structure and process structure

Oracle instance tag: if there are multiple Oracle instances in the operating system (the instance name cannot be the same), you can use the environment attribute ORACLE_SID (or use INSTANCE_NAME) to annotate the default usage instance.

Memory structure

Memory stores data dictionary information, metadata about objects, logical structures, permissions, buffered application data, SQL statements, PL/SQL and Java program data, and transactions. In addition to these, it also includes the software code area and the program code area (PGA)

Shared area

(1)。 Include a high-speed buffer, a data dictionary buffer, a database high-speed buffer including a shared sql area, a private sql area, a shared PL/SQL area, and a control structure area

1)。 Private sql area: used to store private data for each session associated with the execution of a sql statement. In the dedicated server, the private sql zone exists in the PGA, and in the shared server, the private SQL zone exists in the shared area

2)。 Shared sql area: when a user executes sql, SQL stores the text of the most recently executed SQL statement, the compiled parse tree, and the execution plan in the shared area. Instead, the variable values in the sql statement are stored in the private Sql area. When the server executes the same sql statement again, the server process will no longer perform statement analysis, but will directly execute the content that already exists in the shared sql zone.

3)。 Shared PL/ SQL area: before Oracel executes a PL/SQL statement, the program unit will be placed in the shared PL/ SQL area, and the SQL statements within the program unit will be placed in the SQL area. When the same program unit needs to be executed again, it will be called directly from memory without having to access the disk again.

4)。 Structural control area: a section of memory area for internal use of an instance, which stores lock information

Database buffer

(1)。 This area is a cache area in SGA that stores data blocks, tables, and index databases that have recently been read from data files. When the user processes the query, the server process first looks for the required database from the database buffer, and accesses the disk data only when it is not in the buffer

Redo log buffer

(1)。 When the user changes the data through the sql statement, the server process records the changes in the redo log buffer. After an accident in the database, you can recover the data through this record

Daichi

(1)。 Optional memory area. Large pools provide additional memory for operations that consume a lot of memory

Java Pool

(1)。 Java text, syntax analysis and other information are stored there. If you want to install Java VM, you must enable Java pools

Streams Pool

(1)。 This area is newly added to 10g. It is used to store information. The content it stores is shared. It is easier to use the pool management information than to capture and manage messages.

Data dictionary buffer

(1)。 It contains the structure of the database, user information and database tables, views and other information, as well as all table and view nouns, permissions and other information.

Program global area (PGA)

(1)。 Program global area: including session information, stack space, sort area, and cursor status

1)。 Session information stores session permissions, roles, session performance statistics and other information.

2)。 Variables, arrays, and other information belonging to the session are stored in the stack space

3)。 The sorting area is a special space for sorting.

4)。 The cursor state is stored in the processing phase of various cursors currently in use.

(2)。 When the user process connects to the Oracle, the server creates a session and allocates a PGA zone that is used by a user process and cannot be shared

1)。 For dedicated servers (a database connection corresponds to a dedicated server process), PGA stores stack space information, session information, cursor state, and sort area.

2)。 For shared servers, PGA saves only stack space information, while session information, cursor state, and sort area are stored in SGA.

3)。 The structure of PGA is shown in the figure:

a.

Three types of processes

User process, server process and background process, and the relationship between user process and server process, as shown in figure

(1)。

(2)。 When the user needs to operate in Oracle, the first step is to establish a connection so as to establish a communication channel between the user process and the server process. When the user has established a connection with the server, it will be expressed through a session that the operations between different sessions are independent of each other.

(3)。 The background process of Oracle starts at the same time as the instance, and its main function is to maintain the physical structure and memory structure of the database. The structure of the background process is as follows

The main functions of the background process in the above figure are as follows:

(1)。 System Monitoring process (SMON): when the database starts, SMON uses online redo log files to recover crashed instances

(2)。 Process monitoring process (PMON): mainly monitors the operation of the user process; when the user process fails, clear the resources occupied by the user process and the process

(3)。 Checkpoint process (CKPT): used to control data files, control files, and coordinate synchronization between redo log files

(4)。 Database write process (DBWO): this process is responsible for managing database buffers and data dictionary buffers

(5)。 Log writing process (LOWR): responsible for writing the contents of the redo log buffer to the online redo log file

(6)。 Archiving process (ARCO): restores full redo log files to a specified device to ensure that previous redo log files are not overwritten

(7)。 Recovery process (RECO): used to recover failed transactions in a distributed database environment

(8)。 Job queue process (SNPn): can perform periodic execution of some applications.

(9)。 Lock process (LCKn): used to lock database objects without being changed by other processes in the database.

Oracle physical system

The system is the physical system of the database, that is, the structure files stored on disk; all the data in the database is stored in these physical files.

Control files (Control file): control files are used to control the physical structure of the database. It records the control information of all files in the database.

Data files (Data File): each Oracle database has one or more physical data files. The data file of a database contains all the database data.

Redo log files (Log File): Oracle uses redo log files to keep logs of all database transactions

Parameter file (Parameter File): saves information about Oracle configuration. Generally, there are three types of parameter files:

(1)。 Initialization parameter file: used to configure the database when the database starts the instance. This file mainly sets the database instance name, the location of the file, the size of the memory area required by the instance, and so on.

(2)。 Configuration parameter file: it only exists when the data corresponds to multiple instances. If a database corresponds to only one instance, this file will not be generated. This file is generally named config.org and is usually called by the initialization parameter file.

(3)。 Binary parameter file: there will be two parameter files, one is pfile, which is a text-based parameter file that contains the configuration parameters of the database. Another Server Parameter File, the server parameter file, is a parameter file based on binary format and contains the parameters and values of databases and routines

SQL > col addr format A20

SQL > col pid format 999

SQL > col spid format 999999

SQL > col username format A25

SQL > col program format A105

SQL > set line

SQL > select addr,pid,spid,username,program from v$process

ADDR PID SPID USERN

AME PROGRAM

00007FF9D0C06870 1

PSEUDO

00007FF9D0C07948 2 23656 Oracl

EServiceNE ORACLE.EXE (PMON)

00007FF9D0C08A20 3 23788 Oracl

EServiceNE ORACLE.EXE (CLMN)

00007FF9D0C09AF8 4 24392 Oracl

EServiceNE ORACLE.EXE (PSP0)

00007FF9D0C0ABD0 5 23596 Oracl

EServiceNE ORACLE.EXE (VKTM)

00007FF9D0C0BCA8 6 24180 Oracl

EServiceNE ORACLE.EXE (GEN0)

00007FF9D0C0CD80 7 23696 Oracl

EServiceNE ORACLE.EXE (LREG)

00007FF9D0C0DE58 8 23800 Oracl

EServiceNE ORACLE.EXE (MMAN)

00007FF9D0C0EF30 9 24540 Oracl

EServiceNE ORACLE.EXE (GEN1)

00007FF9D0C10008 10 18772 Oracl

EServiceNE ORACLE.EXE (DIAG)

00007FF9D0C110E0 11 23268 Oracl

EServiceNE ORACLE.EXE (VKRM)

ADDR PID SPID USERN

AME PROGRAM

00007FF9D0C121B8 12 24436 Oracl

EServiceNE ORACLE.EXE (DBRM)

00007FF9D0C13290 13 19252 Oracl

EServiceNE ORACLE.EXE (SVCB)

00007FF9D0C14368 14 18576 Oracl

EServiceNE ORACLE.EXE (PMAN)

00007FF9D0C15440 15 23156 Oracl

EServiceNE ORACLE.EXE (DIA0)

00007FF9D0C16518 16 24520 Oracl

EServiceNE ORACLE.EXE (DBW0)

00007FF9D0C175F0 17 24464 Oracl

EServiceNE ORACLE.EXE (LGWR)

00007FF9D0C186C8 18 15632 Oracl

EServiceNE ORACLE.EXE (CKPT)

00007FF9D0C197A0 19 19436 Oracl

EServiceNE ORACLE.EXE (SMON)

00007FF9D0C1A878 20 25312 Oracl

EServiceNE ORACLE.EXE (SHAD)

00007FF9D0C1B950 21 22084 Oracl

EServiceNE ORACLE.EXE (RECO)

00007FF9D0C1CA28 22 24356 Oracl

EServiceNE ORACLE.EXE (SHAD)

ADDR PID SPID USERN

AME PROGRAM

00007FF9D0C1EBD8 24 23760 Oracl

EServiceNE ORACLE.EXE (PXMN)

00007FF9D0C20D88 26 23084 Oracl

EServiceNE ORACLE.EXE (MMON)

00007FF9D0C21E60 27 24460 Oracl

EServiceNE ORACLE.EXE (MMNL)

00007FF9D0C22F38 28 19328 Oracl

EServiceNE ORACLE.EXE (D000)

00007FF9D0C24010 29 24404 Oracl

EServiceNE ORACLE.EXE (S000)

00007FF9D0C250E8 30 23636 Oracl

EServiceNE ORACLE.EXE (TMON)

28 rows have been selected.

SQL > show parameter spfile

NAME TYPE VALUE

Spfile string C:\ APP\ ADMINISTRATOR\ VIRTUAL\ P

RODUCT\ 12.2.0\ DBHOME_2\ DATABAS

E\ SPFILENEWTEST.ORA

Close the database and delete the spfile file

SQL > startup nomount ORA-01078: failure in processing system parameters

LRM-00109:? 'C:\ APP\ ADMINISTRATOR\ VIRTUAL\ PRODUCT\ 12.2.0\ DBHOME_2\ DATABASE\ INITNEWTEST.ORA'

Restore a file

C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin > rman target /

Recovery Manager: Release 12.2.0.1.0-Production on Friday January 5 10:08:17 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.

Connected to the target database (not started)

RMAN > startup nomount

Oracle instance has been started

The total system global area is 2768240640 bytes

Fixed Size 8922760 byt

Variable Size 704645496 byt

Database Buffers 2046820352 byt

Redo Buffers 7852032 byt

RMAN > host

Microsoft Windows [version 6.3.9600]

(C) 2013 Microsoft Corporation. All rights reserved.

C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ bin > sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Friday January 5 10:10:01 2018

Copyright (c) 1982, 2016, Oracle. All rights reserved.

Connect to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production

SQL > show parameter db_name

NAME TYPE VALUE

Db_name string newtest

SQL > show parameter control_files

NAME TYPE VALUE

Control_files string C:\ APP\ ADMINISTRATOR\ VIRTUAL\ O

RADATA\ NEWTEST\ CONTROL01.CTL

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ O

RADATA\ NEWTEST\ CONTROL02.CTL

SQL > select status from v$instance

STATUS

STARTED

SQL > select open_mode from v$database

Select open_mode from v$database

An error occurred on line 1:

ORA-01507: no database mounted

SQL > select from v$controlfile

No rows selected

SQL > alter database mount

The database has changed.

SQL > set line 200

SQL > col name format A60

SQL > select * from v$controlfile

STATUS NAME IS_

EC BLOCK_SIZE FILE_SIZE_BLKS CON_ID

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CONTROL01.CTL NO 16384 1142 0 C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CONTROL02.CTL NO 16384 1142 0

SQL > shutdown immediate

ORA-01109: the database is not open

The database has been uninstalled.

The ORACLE routine has been closed.

SQL > startup mount

The ORACLE routine has been started.

Total System Global Area 2768240640 bytes

Fixed Size 8922760 bytes

Variable Size 704645496 bytes

Database Buffers 2046820352 bytes

Redo Buffers 7852032 bytes

ORA-00205:?,?,?

SQL > shutdown immediate

ORA-01507:?

The ORACLE routine has been closed.

SQL > startup mount

The ORACLE routine has been started.

Total System Global Area 2768240640 bytes

Fixed Size 8922760 bytes

Variable Size 704645496 bytes

Database Buffers 2046820352 bytes

Redo Buffers 7852032 bytes

The database is loaded.

SQL > set line 100

SQL > col name format A100

SQL > select name from v$datafile

NAME

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ SYSTEM01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBSEED\ SYSTEM01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ SYSAUX01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBSEED\ SYSAUX01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ UNDOTBS01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBSEED\ UNDOTBS01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ USERS01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBTEST\ SYSTEM01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBTEST\ SYSAUX01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBTEST\ UNDOTBS01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ PDBTEST\ USERS01.DBF

NAME

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CLONEPDB_PLUG\ SYSTEM01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CLONEPDB_PLUG\ SYSAUX01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CLONEPDB_PLUG\ UNDOTBS01.DBF

C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CLONEPDB_PLUG\ USERS01.DBF

15 rows have been selected.

SQL > col name format A20

SQL > select con_id, dbid, name, open_mode from v$pdbs

CON_ID DBID NAME OPEN_MODE 2 603865257 PDB$SEED MOUNTED 3 3394996704 PDBTEST MOUNTED 4 50957894 CLONEPDB_PLUG MOUNTED SQL > shutdown immediate

ORA-01109: the database is not open

The database has been uninstalled.

The ORACLE routine has been closed.

SQL >

SQL > startup nomount

The ORACLE routine has been started.

Total System Global Area 2768240640 bytes

Fixed Size 8922760 bytes

Variable Size 704645496 bytes

Database Buffers 2046820352 bytes

Redo Buffers 7852032 bytes

SQL > select con_id, dbid, name, open_mode from v$pdbs

No rows selected

SQL > alter database mount

The database has changed.

SQL > shutdown immediate

ORA-01109:?

The database has been uninstalled.

The ORACLE routine has been closed.

SQL > startup mount

The ORACLE routine has been started.

Total System Global Area 2768240640 bytes

Fixed Size 8922760 bytes

Variable Size 704645496 bytes

Database Buffers 2046820352 bytes

Redo Buffers 7852032 bytes

The database is loaded.

There is no error report in the actual situation.

There are no errors reported in the log.

It seems that 12c is still different.

Book original text

SQL > select file# from v$recover_file

FILE# 7

SQL > select name from v$datafile where FILE#=7

NAME

C:\ APP\ ADMINISTRATOR

\ VIRTUAL\ ORADATA\ NEW

TEST\ USERS01.DBF

It seems that this table query will be the main query in the future.

Log appears after query

Successful mount of redo thread 1, with mount id 1781505083

2018-01-05T11:04:31.454611+08:00

Database mounted in Exclusive Mode

Lost write protection disabled

Using STANDBY_ARCHIVE_DEST parameter default value as C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ RDBMS

Completed: ALTER DATABASE MOUNT

The error just now also returned.

12c No error reported

SQL > alter database open

The database has changed.

SQL > show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED 2 PDB$SEED READ ONLY NO 3 PDBTEST MOUNTED 4 CLONEPDB_PLUG MOUNTEDalter system checkpoint performs checkpoints, searches for dirst listy in buffer cache, writes dirty data to data file, writes redo buffers log to online log, and updates information such as control files and data file headers scn.

Alter system flush buffer_cache is equivalent to refreshing buffer cache so that you can compare buffer cache to a box. There is a mess, but you can install something new with this refresh. However, the scn information is not updated.

SQL > show parameter background_

NAME TYPE VALUE

Background_core_dump string partial

Background_dump_dest string C:\ APP\ ADMINISTRATOR

\ VIRTUAL\ P

RODUCT\ 12.2.0\ DBHOME

_ 2\ RDBMS\ T

RACE

SQL > select * from v$version where rownum show parameter diag

NAME TYPE VALUE

Diagnostic_dest string C:\ APP\ ADMINISTRATOR

\ VIRTUAL

SQL > SELECT * FROM V$DIAG_INFO

INST_ID NAME VALUE CON_ID

1 Diag Enabled TRUE 0 1 ADR Base C:\ APP\ ADMINISTRATOR\ VIRTUAL 0 1 ADR Home C:\ APP\ ADMINISTRATOR\ VIRTUAL\ diag\ rdbms\ newtest\ newtest 0 1 Diag Trace C:\ APP\ ADMINISTRATOR\ VIRTUAL\ diag\ rdbms\ newtest\ newtest\ trace 0 1 Diag Alert C:\ APP\ ADMINISTRATOR\ VIRTUAL\ diag\ rdbms\ newtest\ newtest\ alert 0 1 Diag Incident C:\ APP\ ADMINISTRATOR\ VIRTUAL\ diag\ rdbms\ newtest\ newtest\ incident 0 1 Diag Cdump C:\ app\ Administrator\ virtual\ diag\ rdbms\ newtest\ newtest\ cdump 0 1 Health Monitor C:\ APP\ ADMINISTRATOR\ VIRTUAL\ diag\ rdbms\ newtest\ newtest\ hm 0 1 Default Trace File C:\ APP\ ADMINISTRATOR\ VIRTUAL\ diag\ rdbms\ newtest\ newtest\ trace\ newtest_ora_26280. 0 1 Active Problem Count 1 0 1 Active Incident Count 1 011 rows selected

Adrci > set homepath diag\ rdbms\ newtest\ newtest

Adrci > show alert-tail 20

2018-01-05 14 purl 13 purl 32.216000 + 08:00

Endian type of dictionary set to little

Undo initialization finished serial:0 start:2003502593 end:2003502593 diff:0 ms

(0.0 seconds)

Database Characterset for PDB$SEED is UTF8

2018-01-05 14 13 purl 34.682000 + 08:00

Opatch validation is skipped for PDB PDB$SEED (con_id=0)

2018-01-05 14 1336.604000 + 08:00

Opening pdb with no Resource Manager plan active

2018-01-05 14 13 purl 38.653000 + 08:00

Starting background process CJQ0

CJQ0 started with pid=44, OS id=25888

Completed: alter database open

2018-01-05 14 1715 41.903000 + 08:00

Shared IO Pool defaulting to 144MB. Trying to get it from Buffer Cache for proce

Ss 19412.Dumping current patch informationNo patches have been applied

2018-01-05 14 1815 02.081000 + 08:00

TABLE SYS.WRP$_REPORTS: ADDED INTERVAL PARTITION SYS_P636 (2927) VALUES LESS THA

N (TO_DATE ('2018-01-06 01 / 06 01 / 01 / 01 / 06 / 01 / 01 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06),' SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGO

RIAN'))

TABLE SYS.WRP$_REPORTS_DETAILS: ADDED INTERVAL PARTITION SYS_P637 (2927) VALUES

LESS THAN (TO_DATE ('2018-01-06 01 / 06 01 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01 / 01 / 01 / 06 / 01),' SYYYY-MM-DD HH24:MI:SS', 'NLS_CALEND

AR=GREGORIAN'))

TABLE SYS.WRP$_REPORTS_TIME_BANDS: ADDED INTERVAL PARTITION SYS_P640 (2926) VALU

ES LESS THAN (TO_DATE ('2018-01-05 01 / 05 01 / 01 / 01 / 01 / 05 / 01 / 01 / 01 / 01 / 05 / 01 / 01 / 01 / 05 / 01 / 01 / 05 / 01 / 01 / 01 / 05 / 01 / 01 / 01 / 05 / 01 / 01 / 05 / 01 / 01 / 01 / 05 / 01 / 01 / 01 / 05 / 01 / 01 / 05),' SYYYY-MM-DD HH24:MI:SS', 'NLS_CAL

ENDAR=GREGORIAN'))

2018-01-05 14 purse 48 purl 48.251000 + 08:00

Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.

Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.

2018-01-05 14 purl 48 purl 52.501000 + 08:00

Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.

C:\ app\ Administrator\ virtual > adrci

ADRCI: Release 12.2.0.1.0-Production on Friday January 5 15:01:33 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.

ADR base = "C:\ app\ Administrator\ virtual"

Adrci > show incident

ADR Home = C:\ app\ Administrator\ virtual\ diag\ clients\ user_Administrator\ host_194

152873_107:

0 rows fetched

ADR Home = C:\ app\ Administrator\ virtual\ diag\ clients\ user_OracleServiceORCL\ host

_ 194152873_107:

INCIDENT_ID PROBLEM_KEY

CREATE_TIME

1 oci 24550 [3221225477]

2017-12-12 14 54.769000 + 08:00

ADR Home = C:\ app\ Administrator\ virtual\ diag\ rdbms\ newtest\ newtest:

INCIDENT_ID PROBLEM_KEY

CREATE_TIME

16969 ORA 6544 [pevm_peruws_callback-1]

2017-12-20 10 50 purl 07.983000 + 08:00

ADR Home = C:\ app\ Administrator\ virtual\ diag\ rdbms\ orcl\ orcl:

0 rows fetched

ADR Home = C:\ app\ Administrator\ virtual\ diag\ tnslsnr\ WIN-6NLPRCEFFBK\ listener:

0 rows fetched

ADR Home = C:\ app\ Administrator\ virtual\ diag\ tnslsnr\ WIN-6NLPRCEFFBK\ orcl:

0 rows fetched

Newtest=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 10.8.5.204) (PORT = 9200))

)

(CONNECT_DATA =

(SERVICE_NAME = newtest)

)

)

C:\ Users\ Administrator > tnsping newtest

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0-Production on 05-JAN-2018 15:17:56

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.8.5.204) (PORT = 9200)) (CONNECT_DATA = (SERVICE_NAME = newtest)

OK (20 msec)

C:\ Users\ Administrator > sqlplus sys/xxxxxxx@10.8.5.204:9200/newtest as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 5 15:21:48 2018

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production

SQL > show parameter service_name

NAME TYPE

VALUE

Service_names string

Newtest

C:\ app\ Administrator\ virtual > lsnrctl status

LSNRCTL for 64-bit Windows: Version 12.2.0.1.0-Production on 05-January-2018 15:2

3:22

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521))

STATUS of LISTENER

Alias ORCL

Version TNSLSNR for 64-bit Windows: Version 12.2.0.1.0-Produ

Ction

Launch date 14-December-2017 12:24:38

Uptime 22 days, 2 hours, 58 minutes, 44 seconds.

Trace level off

Security ON: Local OS Authentication

SNMP OFF

Listener parameter file C:\ app\ Administrator\ virtual\ product\ 12.2.0\ dbhome_2\ n

Etwork\ admin\ listener.ora

Listener log file C:\ app\ Administrator\ virtual\ diag\ tnslsnr\ WIN-6NLPRCEF

FBK\ orcl\ alert\ log.xml

Listening Endpoint Summary.

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=WIN-6NLPRCEFFBK) (PORT=1521))

(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (PIPENAME=\.\ pipe\ EXTPROC1521ipc)

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=10.8.5.206) (PORT=1521))

Service summary..

The service "24549d14bbeb417bab312bf19bc5259e" contains 1 instance.

Instance "newtest", status READY, contains 1 handler for this service.

The service "CLRExtProc" contains 1 instance.

Instance "CLRExtProc", status UNKNOWN, contains 1 handler for this service.

The service "clonepdb_plug" contains 1 instance.

Instance "newtest", status READY, contains 1 handler for this service.

The service "d4b2fcaac2b944cc8af5864ec7cb853c" contains 1 instance.

Instance "newtest", status READY, contains 1 handler for this service.

The service "newtest" contains 1 instance.

Instance "newtest", status READY, contains 1 handler for this service.

The service "newtestXDB" contains 1 instance.

Instance "newtest", status READY, contains 1 handler for this service.

The service "pdbtest" contains 1 instance.

Instance "newtest", status READY, contains 1 handler for this service.

Command executed successfully

SQL > alter database close

Alter database close

*

An error occurred on line 1:

ORA-01093: ALTER DATABASE CLOSE is only allowed when there is no connection session

SQL > alter database close

The database has changed.

SQL > alter database dismount

The database has changed.

SQL > shutdown

ORA-01507: no database mounted

The ORACLE routine has been closed.

The above is all the contents of the article "how to start and shut down the Oracle database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report