Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:oracle [2024/02/26 06:02] – [Oracle PDB] darron | tools:oracle [2024/07/28 19:32] (current) – [PHP] darron | ||
---|---|---|---|
Line 440: | Line 440: | ||
To enable backups with RMAN turn on archivelog mode. | To enable backups with RMAN turn on archivelog mode. | ||
+ | |||
+ | |||
+ | ==Enable== | ||
< | < | ||
- | [oracle@vm3 ~]$ sqlplus sys as sysdba | + | SQL> shutdown immediate; |
+ | Database closed. | ||
+ | Database dismounted. | ||
+ | ORACLE instance shut down. | ||
+ | SQL> startup mount; | ||
+ | ORACLE instance started. | ||
- | SQL*Plus: Release 23.0.0.0.0 - Production on Fri Feb 23 14:57:06 2024 | + | Total System Global Area 1603679416 bytes |
- | Version 23.3.0.23.09 | + | Fixed Size 5313720 bytes |
+ | Variable Size | ||
+ | Database Buffers | ||
+ | Redo Buffers | ||
+ | Database mounted. | ||
+ | SQL> alter database archivelog; | ||
- | Copyright (c) 1982, 2023, Oracle. | + | Database altered. |
- | Enter password: | + | SQL> alter database open; |
- | Connected to: | + | Database |
- | Oracle | + | </ |
- | Version 23.3.0.23.09 | + | |
+ | ==Status== | ||
+ | < | ||
+ | SQL> select name, | ||
+ | |||
+ | NAME LOG_MODE | ||
+ | --------- ------------ | ||
+ | FREE ARCHIVELOG | ||
+ | |||
+ | SQL> archive log list | ||
+ | Database log mode Archive Mode | ||
+ | Automatic archival | ||
+ | Archive destination | ||
+ | Oldest online log sequence | ||
+ | Next log sequence to archive | ||
+ | Current log sequence | ||
+ | </ | ||
+ | |||
+ | ==List== | ||
+ | |||
+ | < | ||
+ | RMAN> list archivelog all; | ||
+ | list archivelog all; | ||
+ | List of Archived Log Copies for database with db_unique_name FREE | ||
+ | ===================================================================== | ||
+ | |||
+ | Key Thrd Seq S Low Time | ||
+ | ------- ---- ------- - --------- | ||
+ | 1 | ||
+ | Name: / | ||
+ | |||
+ | 2 | ||
+ | Name: / | ||
+ | |||
+ | 3 | ||
+ | Name: / | ||
+ | |||
+ | 4 | ||
+ | Name: / | ||
+ | |||
+ | 5 | ||
+ | Name: / | ||
+ | |||
+ | 6 | ||
+ | Name: / | ||
+ | |||
+ | 7 | ||
+ | Name: / | ||
+ | |||
+ | 8 | ||
+ | Name: / | ||
+ | |||
+ | |||
+ | |||
+ | RMAN> | ||
+ | </ | ||
+ | |||
+ | ==Disable== | ||
+ | |||
+ | < | ||
SQL> shutdown immediate; | SQL> shutdown immediate; | ||
Database closed. | Database closed. | ||
Database dismounted. | Database dismounted. | ||
ORACLE instance shut down. | ORACLE instance shut down. | ||
- | SQL> startup mount; | + | SQL> startup mount |
ORACLE instance started. | ORACLE instance started. | ||
Line 468: | Line 539: | ||
Redo Buffers | Redo Buffers | ||
Database mounted. | Database mounted. | ||
- | SQL> alter database | + | SQL> alter database |
Database altered. | Database altered. | ||
Line 476: | Line 547: | ||
Database altered. | Database altered. | ||
- | SQL> | + | SQL> archive log list; |
+ | Database log mode No Archive Mode | ||
+ | Automatic archival | ||
+ | Archive destination | ||
+ | Oldest online log sequence | ||
+ | Current log sequence | ||
+ | </ | ||
+ | |||
+ | ==Delete== | ||
+ | |||
+ | < | ||
+ | RMAN> delete archivelog all; | ||
+ | delete archivelog all; | ||
+ | released channel: ORA_DISK_1 | ||
+ | allocated channel: ORA_DISK_1 | ||
+ | channel ORA_DISK_1: SID=50 device type=DISK | ||
+ | List of Archived Log Copies for database with db_unique_name FREE | ||
+ | ===================================================================== | ||
+ | |||
+ | Key Thrd Seq S Low Time | ||
+ | ------- ---- ------- - --------- | ||
+ | 1 | ||
+ | Name: / | ||
+ | |||
+ | 2 | ||
+ | Name: / | ||
+ | |||
+ | 3 | ||
+ | Name: / | ||
+ | |||
+ | 4 | ||
+ | Name: / | ||
+ | |||
+ | 5 | ||
+ | Name: / | ||
+ | |||
+ | 6 | ||
+ | Name: / | ||
+ | |||
+ | 7 | ||
+ | Name: / | ||
+ | |||
+ | 8 | ||
+ | Name: / | ||
+ | |||
+ | |||
+ | Do you really want to delete the above objects (enter YES or NO)? yes | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | deleted archived log | ||
+ | archived log file name=/ | ||
+ | Deleted 8 objects | ||
+ | |||
+ | |||
+ | |||
+ | RMAN> | ||
</ | </ | ||
===Oracle PDB=== | ===Oracle PDB=== | ||
Line 542: | Line 680: | ||
==User== | ==User== | ||
- | Create a user which can connect to the server and operated | + | Create a user which can connect to the server and operate |
< | < | ||
Line 563: | Line 701: | ||
===Miscellaneous=== | ===Miscellaneous=== | ||
- | ==Tablespaces== | + | ==Path== |
- | Not specifying a file path will create a tablespace file in this directory for 23c. | + | Not specifying a file path will create a tablespace file and archive logs in this directory for 23c. |
< | < | ||
Line 571: | Line 709: | ||
</ | </ | ||
- | To remove | + | ==Tablespace== |
+ | |||
+ | __Drop__ | ||
+ | |||
+ | To remove | ||
< | < | ||
Line 612: | Line 754: | ||
You should add " | You should add " | ||
</ | </ | ||
+ | ==Config== | ||
+ | Add extension=oci8.so to "/ | ||
+ | |||
+ | Add instant client to library path | ||
+ | |||
+ | < | ||
+ | echo "/ | ||
+ | ldconfig | ||
+ | </ | ||
==TEST== | ==TEST== | ||
Line 700: | Line 851: | ||
</ | </ | ||
- | ==Config== | ||
- | Add extension=oci8.so to "/ | ||
- | |||
- | Add instant client to library path | ||
- | |||
- | < | ||
- | echo "/ | ||
- | ldconfig | ||
- | </ | ||
===Resources=== | ===Resources=== | ||