oracle (12) 썸네일형 리스트형 058 - [Oracle PL/SQL] Oracle package - UTL_FILE 사전에 필요한 작업들, 서버 환경에 따라서 폴더 옵션은 다름 to read/write file , we need to create directory create directory only for sys and system user 1- open sqlplus 2- conn as sysdba 3- alter session set container=orclpdb ( the plug db name ) 4- create directory mydir as '/home/oracle' 5- grant READ, WRITE on DIRECTORY MYDIR to public; 6- CREATE THE DIRECTORY ON your computer ( the server ) 7- put empty file sample.. 026 - [Oracle PL/SQL] Exceptions PL/SQL Basic structure Handling Exceptions with PL/SQL # no exception case. declare v_first_name employees.first_name%type; begin select first_name into v_first_name from employees where employee_id=1; -- there is no emp_id=1 end; ------------------------------------------------- Error report - ORA-01403: no data found ORA-06512: at line 5 01403. 00000 - "no data found" *Cause: No data was found.. 021 - [Oracle PL/SQL] Cursor - Explicit Cursor Every SQL statement executed by the Oracle server has an associated individual cursor: * Implicit cursors: Declared and managed by PL/SQL for all DML and PL/SQL SELECT statements * Explicit cursors: Declared and managed by the programmer Explicit Cursor Operations You declare explicit cursors in PL/SQL when you have a SELECT statement that returns multiple rows. You can process each row returned.. 118 - [Oracle 19C] Full backup for CDB and restoring Full backup for CDB and restoring # RMAN 을 위해서는 ARCHIVELOG mode = on, configure 'fast recovery area' 할 것. 2023.12.28 - [Database/Oracle] - 116 - [Oracle 19C] Enableing ARCHIVELOG mode. 116 - [Oracle 19C] Enableing ARCHIVELOG mode. Enableing ARCHIVELOG mode. show user; show con_name; /* USER is "SYS" CON_NAME ------------------------------ CDB$ROOT */ select * from v$logfile; /* GROUP# STATUS TYP.. 117 - [Oracle 19C] Configuring fast recovery area Configuring fast recovery area show user; show con_name; /* USER is "SYS" CON_NAME ------------------------------ CDB$ROOT */ The fast recovery area is an Oracle managed directory file system, or Oracle automatic storage management disk group that provides centralized storage for backup and recovery files. The fast recovery area is usually used to store the Oracle archived redo logs, the databas.. 112 - [Oracle 19C] SQL*Loader Loading Methods - Conventional Load Conventional Load Uses COMMIT Always generates redo entries Enforces all constraints Fires INSERT triggers Can load into clustered tables Allows other users to modify tables during load operation The insertion of an array ofrecords is followed by a COMMIT operation. Each data load may involve several transactions. SQL> show user; USER is "HR" SQL> show con_name CON_NAME -------------------------.. 110 - [Oracle 19C] Moving data from PDB to PDB 이전에 이미 만들었던 디비를 이용해서 데이터 이관에 대해서 테스트 합니다. 디비가 없어서 새로만들어야 한다면 아래 링크를 참고하세요 2023.12.01 - [Database/Oracle] - 62 - [Oracle 19C] DB Link 62 - [Oracle 19C] DB Link DATABASE LINK • A database link is a schema object in one database that enables you to access objects on another database. • The other database need not be an Oracle Database system. However, to access non-Oracle systems you must use Oracl.. 62 - [Oracle 19C] DB Link DATABASE LINK • A database link is a schema object in one database that enables you to access objects on another database. • The other database need not be an Oracle Database system. However, to access non-Oracle systems you must use Oracle Heterogeneous Services. • After you have created a database link, you can use it in SQL statements to refer to tables, views, and PL/SQL objects in the other.. 이전 1 2 다음