Oracle Database and Linux Commands Summary
Oracle Database Commands:
- Change
SYSTEM
user password:
ALTER USER system IDENTIFIED BY new_password;
- Unlock
SYSBACKUP
user:
ALTER USER SYSBACKUP ACCOUNT UNLOCK;
- Set Fast Recovery Area size to 10GB:
ALTER SYSTEM SET db_recovery_file_dest_size = 10G;
- Set Fast Recovery Area destination path:
ALTER SYSTEM SET db_recovery_file_dest = 'C:\app\yourname\fast_recovery_area\orcl';
- Check if the database is in archive log mode:
ARCHIVE LOG LIST;
- Shutdown the database:
SHUTDOWN IMMEDIATE;
- Startup and mount the database:
STARTUP MOUNT;
- Backup the database:
BACKUP DATABASE;
- List all backups:
LIST BACKUP;
- Delete backups:
DELETE BACKUP;
- Enable ARCHIVELOG mode:
ALTER DATABASE ARCHIVELOG;
- Open the database:
ALTER DATABASE OPEN;
- Backup database including archive logs:
BACKUP DATABASE PLUS ARCHIVELOG;
- View RMAN configuration settings:
SHOW ALL;
- Set default device type to disk:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
- Verify default device type:
SHOW DEFAULT DEVICE TYPE;
- List backup summary:
LIST BACKUP SUMMARY;
- View backup information for a specific datafile:
LIST BACKUP OF DATAFILE specific_datafile_ID;
- Validate backup for a specific datafile:
VALIDATE DATAFILE specific_datafile_ID;
- Validate if tablespace's datafiles can be restored:
RESTORE TABLESPACE tableSpaceName VALIDATE;
Linux Commands:
- Copy a directory to another location:
cp -r /path/to/source_folder /path/to/target_folder