1、查看scn号

SQL> select checkpoint_change#,current_scn from v$database;

CHECKPOINT_CHANGE# CURRENT_SCN
------------------ -----------
           1369236     1369704
SQL> 

、确认数据库一致性

SQL> select file#,checkpoint_change# from v$datafile_header;

     FILE# CHECKPOINT_CHANGE#
---------- ------------------
         1            1369236
         2            1369236
         3            1369236
         4            1369236
SQL> 
SQL> select file#,last_change# from v$datafile;

     FILE# LAST_CHANGE#
---------- ------------
         1
         2
         3
         4

3、数据库启动

#1、启动到mount
SQL> startup mount;
ORACLE instance started.

Total System Global Area  417546240 bytes
Fixed Size                  2253824 bytes
Variable Size             310381568 bytes
Database Buffers           96468992 bytes
Redo Buffers                8441856 bytes
Database mounted.
SQL> 
#2、开启数据库
SQL> alter database open;

Database altered.

SQL> 
#3、查看数据库状态
SQL> select status from v$instance;

STATUS
------------
OPEN

4、查dump文件

[root@localhost ~]# su - oracle
上一次登录:六 5月 28 23:52:33 CST 2022pts/1 上
[oracle@localhost ~]$ 
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun May 29 00:21:59 2022

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter user

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
license_max_users                    integer     0
parallel_adaptive_multi_user         boolean     TRUE
redo_transport_user                  string
user_dump_dest                       string      /oracle/base/diag/rdbms/snorcl
                                                 11g/snorcl11g/trace
SQL> 

5、查看归档状态

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     31
Next log sequence to archive   33
Current log sequence           33
SQL> 
1、新建表空间
create tablespace dingjiadb datafile '/u01/oradata/OSTOM096/datafile/dingjaidb.dbf' size 1024M;

2、查看表空间
select * from v$tablespace;

3、查看表空间和对应数据文件
SELECT tablespace_name "KCAOM", file_name "数据文件名称",bytes/1024/1024 "文件大小(M)" FROM dba_data_files;

4、新建表
create table sys.dj_tb (column_1 varchar2(20));

5、插入表
insert into dj_tb(column_1) values('1');

6、查询表
select * from dj_tb;

7、创建用户
CREATE USER backupd IDENTIFIED BY 123456;

8、查看用户
SELECT username FROM dba_users;