スキップしてメイン コンテンツに移動

投稿

ラベル(tablespace)が付いた投稿を表示しています

ORACLE Backup and Restore - Lowy Knowledgebase

RMAN Backup Shell rman target / RMAN backup database; バックアップはdb_recovery_file_destの設定に影響があるので必ず下記を注意すること db_recovery_file_dest_size = 10TB サイズがDBデータサイズを超えるとエラーになってバックアップが止まる db_recovery_file_dest_size バックアップしたディスクの容量及びディスクのIOが余裕があることを確認すること alter system set db_recovery_file_dest_size = 12800G scope=both; alter system set db_recovery_file_dest = '/data3/fast_recovery_area/' scope=both; RMAN Restore Shell rman target / RMAN startup mount restore database; recover database; Using Data PUMP (expdp/impdp) It must execute config backup dir SQL before execute data pump https://qiita.com/toshihirock/items/86931e3c52dc47287dd2 Set export directory on sqlplus create or replace directory BAK_DIR as ' /data/bak ' ; export schema expdp admin/pass@orcl schemas=servie01 directory=BAK_DIR dumpfile=service01_20210301.dmp logfile=exp.log Delete job table if you see error message when execute expdp or impdp With the Partitioning, OLAP and Data Mining options ORA-31634: job already exist

Oracle DDL - Lowy knowledgebase

  Database Link Create database link using tnsnames.ora file create [public] database link GIIPDB connect to GIIPADMIN identified by " GIIPPWD " using ' GIIPDBTNS ' ; tnsnames.ora GIIPDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = giipdb.littleworld.net)(PORT = 1984)) (CONNECT_DATA = (SERVICE_NAME = GIIPDB) ) ) Table Create Table create table < tablename > ( Field1 varchar ( 100 ) , Field2 number ( 10 ) ) tablespace USR_D01 ; Copy table create table < tablename > tablespace USR_D01 as select * from < tablenameorg > ; Change table name ALTER TABLE TAB_A RENAME TO TAB_B; Add Constraint(PK, Primary Key) Find primary key from original table select OWNER, CONSTRAINT_NAME, TABLE_NAME from all_constraints where CONSTRAINT_TYPE = ' P ' and TABLE_NAME = ' <tablename> ' ; Add primary key alter table < tablename > add constraint < tablename > _PK primary key ( < Field1 >