Database Link란? - 동시에 두 개의 다른 DB의 작업을 참조할 수 있게 하는 것이다. 원래는 DB 자체가 다르면 하나만 켤 수 있어서 하나를 켜면 그 전에 사용한 DB는 꺼진다고 한다. 생성 : CREATE DATABASE LINK ~ USING ( 나중에 구글링 할 때 이렇게 검색해보자. 대충 필기한 거라 정확히 안 적은 거 같다.) 접속방법 : CONN hr/hr@~CONN scott/tiger@~ 사용예시 : CONN hr/hr@~SELECT * FROM scott.테이블명@~ (synonym
SYS@orcl>desc dict Name Null? Type ----------------------------------------------------------------- -------- -------------------------------------------- TABLE_NAME VARCHAR2(30) COMMENTS VARCHAR2(4000) SYS@orcl>select * from dict where table_name like '%role%' 2 ; no rows selected SYS@orcl>EDWrote file afiedt.buf 1* select * from dict where table_name like '%ROLE%' 2 / TABLE_NAME---------------..
[oracle@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 12 09:38:25 2018 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, Oracle Label Security, OLAP, Data Mining,Oracle Database Vault and Real Application Testing options SYS@orcl>desc dba_tab_roles..
[oracle@localhost admin]$ exit exitSYS@orcl> grant read,write on directory reports_dir to sh;Grant succeeded.SYS@orcl> ! [oracle@localhost admin]$ expdp sh/sh directory=REPORTS_DIR dumpfile=sh.dmpExport: Release 11.2.0.1.0 - Production on Thu Apr 12 16:21:48 2018Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Releas..
Flashback 실습을 하기 위해 망가뜨릴 계획 SYS@orcl>create user tflash identified by tflash; // 새로 유저를 만들고 User created. SYS@orcl>grant connect, resource to tflash; //권한도 주고 Grant succeeded. SYS@orcl>conn tflash/tflash Connected. TFLASH@orcl>create table ftest //로그인해서 테이블도 만들어 보고 2 (a number); Table created. TFLASH@orcl>insert into ftest values(10); // 테이블에 값도 넣어보고 1 row created. TFLASH@orcl>commit; //커밋! Comm..
[oracle@localhost ORCL]$ cd flashback[oracle@localhost flashback]$ lso1_mf_fcrysm57_.flb[oracle@localhost flashback]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 29 14:39:24 2018 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, Oracle Label Security, OLAP, Da..
SYS@orcl>alter database add supplemental log data; Database altered. SYS@orcl>edWrote file afiedt.buf 1 alter database add supplemental log data 2* (primary key) columnsSYS@orcl>/ Database altered. SYS@orcl>grant execute on dbms_flashback to hr; Grant succeeded. SYS@orcl>grant select any transaction to hr; Grant succeeded. SYS@orcl>conn hr/hr Connected.HR@orcl>select salary from employees 2 wher..
[oracle@localhost ~]$ export NLS_LANG=american_america.WE8ISO8859P15 // 해당하는 국가의 언어설정, 지역설정[oracle@localhost ~]$ export NLS_DATE_FORMAT='yyyy-mm-dd:hh24:mi:ss' // 날짜 환경변수 설정[oracle@localhost ~]$ sqlplus hr/hr HR@orcl>select sysdate from dual; SYSDATE-------------------2018-03-26:14:36:16 hr에서 로그 좀 쌓고..... SYS@orcl>alter system switch logfile...archive log list; rman target /shutdown abortstartup..
SYS@catdb>create user rc identified by rc 2 default tablespace rman_ts 3 temporary tablespace temp; User created.----------------------------------------------------- 1. [oracle@localhost ~]$ rman catalog rc/rc@catdb 2. [oracle@localhost ~]$ rman 2-1 RMAN> connect catalog rc/rc@catdb;------------------------------------------------------ ------------------------------------------------------@c:\..