Categotry Archives: oracle 12c

rman 在oracle 12c的备份还原

0

Posted on by

  由于12c有CDB和PDB的概念。rman在备份使用上会有点区别。

 

备份:

1.备份全部的数据库(包括CDB)

[oracle@ora12c ~]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu Jan 23 14:42:27 2014

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

connected to target database: ORADBCA (DBID=261209273)


RMAN> BACKUP DATABASE;

 

2.只备份CDB

[oracle@ora12c ~]$ rman target /

Recovery Manager: Release 12.1.0.1.0[......]

查看全文

12c PDB监听设置

1

Posted on by

        在12c database中所有的CDB,PDB都是共用一个监听的,怎么样关闭某一个PDB的监听,而不影响别的数据库的连接。可以用DBMS_SERVICE来关闭相应的SERVICE来阻止客户端的连接。

 

—需要会话切到PDB

alter session set container=pdb1;

 

服务的关闭:

SQL>  exec DBMS_SERVICE.stop_SERVICE('pdb1');

PL/SQL procedure successfully completed.

 

服务的开启:

SQL> exec DBMS_SERVICE.start_SERVICE('pdb1');

PL/SQL procedure successfully completed.

 [……]

查看全文

PDB的增、删、插的管理

0

Posted on by

PDB基本的日常管理

create_pluggable_database

—增加PDB

SQL>CREATE PLUGGABLE DATABASE pdb1
ADMIN USER pdbadmin IDENTIFIED BY oracle
ROLES=(DBA)
STORAGE unlimited
PATH_PREFIX = '/u01/app/oracle/oradata/wh12cdb1/pdb1/'
FILE_NAME_CONVERT = ('/u01/app/oracle/oradata/wh12cdb1/pdbseed/', '/u01/app/oracle/oradata/wh12cdb1/pdb1/');

 

–创建默认表空间

SQL>  create tablespace users datafile '/u01/app/oracle/oradata/wh12cdb1/pdb1/user01.dbf' size 500m[......]

查看全文

DBMS_XDB_CONFIG命令配置

0

Posted on by

 

DBMS_XDB_CONFIG用来配置Enterprise Manager Database Express(EM)通过自定义用HTTPS,HTTP的什么端口来连接,还可以配置FTP来连接数据库。。

DBMS_XDB_CONFIG的配置:

查看端口:

               select dbms_xdb_config.gethttpport() from dual;

              select dbms_xdb_config.gethttpsport () from dual;

             select dbms_xdb_config.getftpport () from dual;

开启并设置[……]

查看全文

oracle 12c pdb启动与关闭

0

Posted on by

在oracle 12c pdb数据库默认是不起来的,下面介绍一下pdb起关的一些常用命令。

默认状态:

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           MOUNTED
         4 PDB2                           MOUNTED

 

全部开启pdb:

SQL>  alter pluggable database all  open;

Pluggable database altered.

[……]

查看全文