摘要: 准备工作: 1、开启归档 SQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination /u01/app/oracle/product/11.2.0/dbho 阅读全文
posted @ 2017-05-01 18:09 九號栈長 阅读(959) 评论(0) 推荐(0) 编辑
摘要: 登录rman,以控制文件为资料库 [oracle@Riven ~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Tue Apr 4 11:21:55 2017 Copyright (c) 1982, 2011 阅读全文
posted @ 2017-04-21 12:02 九號栈長 阅读(1141) 评论(0) 推荐(0) 编辑
摘要: SQL> create or replace directory dir_dt as '/home/oracle'; Directory created.SQL> grant read,write on directory dir_dt to scott; Grant succeeded. SQL* 阅读全文
posted @ 2017-05-29 17:24 九號栈長 阅读(358) 评论(0) 推荐(0) 编辑
摘要: SQL> create tablespace ML01 datafile '/u01/app/oracle/oradata/enmo1/ML.dbf' size 15M autoextend on maxsize 25M; Tablespace created. SQL> alter databas 阅读全文
posted @ 2017-05-28 10:19 九號栈長 阅读(1580) 评论(0) 推荐(0) 编辑
摘要: UNION用的比较多union all是直接连接,取到得是所有值,记录可能有重复 union 是取唯一值,记录没有重复 UNION 的语法如下:SQL 语句1 UNION SQL 语句2UNION ALL 的语法如下:SQL 语句1 UNION ALL SQL 语句2效率:UNION和UNION A 阅读全文
posted @ 2017-05-25 15:50 九號栈長 阅读(305) 评论(0) 推荐(0) 编辑
摘要: [oracle@enmo1 ~]$ mkdir datadump[oracle@enmo1 ~]$ cd datadump/[oracle@enmo1 datadump]$ pwd/home/oracle/datadump SQL> create or replace directory dir_d 阅读全文
posted @ 2017-05-24 22:02 九號栈長 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 使用tnsnames.ora SQL> grant create database link to scott; Grant succeeded. SQL> conn scott/tigerConnected. SQL> create database link lk connect to hr i 阅读全文
posted @ 2017-05-24 20:17 九號栈長 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 查看数据库默认表空间SQL> select property_value from database_properties where property_name = 'DEFAULT_PERMANENT_TABLESPACE'; PROPERTY_VALUE USERS 查看用户所使用的表空间 S 阅读全文
posted @ 2017-05-24 20:01 九號栈長 阅读(277) 评论(0) 推荐(0) 编辑
摘要: SQL> create tablespace ts_users datafile '/u01/app/oracle/oradata/enmo1/ts01.dbf' size 10m autoextend on maxsize 20m, '/u01/app/oracle/oradata/enmo1/t 阅读全文
posted @ 2017-05-24 19:48 九號栈長 阅读(259) 评论(0) 推荐(0) 编辑
摘要: SQL> select instance_name,status,logins,active_state,database_status from v$instance; INSTANCE_NAME STATUS LOGINS ACTIVE_ST DATABASE_STATUS enmo1 OPEN 阅读全文
posted @ 2017-05-23 21:11 九號栈長 阅读(439) 评论(0) 推荐(0) 编辑
摘要: SQL> select instance_name,status, logins from v$instance; INSTANCE_NAME STATUS LOGINS enmo1 OPEN ALLOWED SQL> alter system quiesce restricted; System 阅读全文
posted @ 2017-05-23 20:05 九號栈長 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 修改数据库限制模式: SQL> select instance_name,status,logins from v$instance; INSTANCE_NAME STATUS LOGINS enmo1 OPEN ALLOWED SQL> alter system enable restricted 阅读全文
posted @ 2017-05-23 19:10 九號栈長 阅读(1649) 评论(0) 推荐(0) 编辑