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

投稿

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

ORACLE Linux(centos)用 Instant Client 19.3(DBMS 11.2以後バージョン利用可)インストール

  ORACLE INSTANT CLIENT Instant client 19.3バージョンは11.2以後のバージョンのORACLEに接続できます。 その以前のバージョンなら専用のクライアントをダウンロードする必要があります。 https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html ORACLE instant client inatall on CentOS using yum Update yum repository cd /etc/yum.repos.d wget http://yum.oracle.com/public-yum-ol7.repo import GPG key wget http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 rpm --import RPM-GPG-KEY-oracle-ol7 Enable oracle instantclient repository yum install -y yum-utils yum-config-manager --enable ol7_oracle_instantclient yum install yum -y install oracle-instantclient19.3-basic oracle-instantclient19.3-devel oracle-instantclient19.3-jdbc oracle-instantclient19.3-sqlplus check installed packages yum list oracle-instantclient * set environment echo " export ORACLE_HOME=/usr/lib/oracle/19.3/client64/lib/ " > ~/profile_oracle.sh echo " export LD_LIBRARY_PATH=/usr/lib/oracle/19.3/client64/lib/ " >> ~/profile_oracle.sh sh ~...

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 >...

ORACLE Management Knowledge

Product detail Product by edition and additional products(jp) https://docs.oracle.com/cd/E16338_01/license.112/b56284/editions.htm#CJACGHEB Management Start and stop Starting Oracle service Switching Oracle Account root@localhost#>su - oracle execute sqlplus oracle@localhost$>sqlplus / as sysdba start oracle instance SQL>startup exit from sqlplus SQL>quit startup listener oracle@localhost$>lsnrctl start referral docs kr :  https://mkil.tistory.com/336 Stop oracle service su - oracle change oracle account emctl stop dbconsole Stop oracle enterprise manager lsnrctl stop Stop listener sqlplus / as sysdba Login sqlplus shutdown immediate shutdown oracle process when waiting exist connection shutdown abort shutdown oracle process aborting all connection use when take too long time on  shutdown immediate  command Delete log files Listner log delete $ adrci adrci > show homepath adrci > show control adrci > purge -age 50000 -type alert -aget 50000 : 50...