This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vim /home/opc/Load_ADB.sh | |
| #!/bin/bash | |
| username='admin' | |
| password='S0meP@ssw0rdHere' | |
| sqlquery='PL/SQL Code Here' | |
| /home/opc/sqlcl/bin/sql /nolog <<-EOF | |
| set cloudconfig /home/opc/Wallet_paygdev.zip | |
| show tns | |
| connect $username/$password@paygdev_high |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| $ZDM_HOME/bin/zdmcli migrate database -sourcedb orcl -sourcenode shadab-db-rac-1221 -srcauth zdmauth -srcarg1 user:opc -srcarg2 identity_file:/home/opc/.ssh/id_rsa -srcarg3 sudo_location:/usr/bin/sudo -targetnode ractarget1 -targethome /u01/app/oracle/product/12.2.0.1/dbhome_1 -backupuser oracleidentitycloudservice/shadab.mohammad@oracle.com -rsp /home/opc/ZDM_Migration_Scripts/zdm21c_template/zdm_physical_template.rsp -tgtauth zdmauth -tgtarg1 user:opc -tgtarg2 identity_file:/home/opc/.ssh/id_rsa -tgtarg3 sudo_location:/usr/bin/sudo -eval | |
| #-sourcedb : This is the DB_NAME of Source Database. If your Source was Single instance and Non-ASM instance then you would user 'sourcesid' instead | |
| #-sourcenode : Hostname of any one node of Source RAC DB. Make sure this is not an alias but the actual hostname on the source else the migration will fail | |
| #-srcauth : Authentication mode, mostly default | |
| #-srcarg1 : OS user in source with sudo privliliges. It is either opc or oracle in 99% of the cases | |
| #-srcarg2 : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| $ZDM_HOME/bin/zdmcli migrate database -sourcedb orcl -sourcenode shadab-db-rac-1221 -srcauth zdmauth -srcarg1 user:opc -srcarg2 identity_file:/home/opc/.ssh/id_rsa -srcarg3 sudo_location:/usr/bin/sudo -targetnode ractarget1 -targethome /u01/app/oracle/product/12.2.0.1/dbhome_1 -backupuser oracleidentitycloudservice/shadab.mohammad@oracle.com -rsp /home/opc/ZDM_Migration_Scripts/zdm21c_template/zdm_physical_template.rsp -tgtauth zdmauth -tgtarg1 user:opc -tgtarg2 identity_file:/home/opc/.ssh/id_rsa -tgtarg3 sudo_location:/usr/bin/sudo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| $ZDM_HOME/bin/zdmcli migrate database -sourcedb orcl -sourcenode shadab-db-rac-1221 -srcauth zdmauth -srcarg1 user:opc -srcarg2 identity_file:/home/opc/.ssh/id_rsa -srcarg3 sudo_location:/usr/bin/sudo -targetnode ractarget1 -targethome /u01/app/oracle/product/12.2.0.1/dbhome_1 -backupuser oracleidentitycloudservice/shadab.mohammad@oracle.com -rsp /home/opc/ZDM_Migration_Scripts/zdm21c_template/zdm_physical_template.rsp -tgtauth zdmauth -tgtarg1 user:opc -tgtarg2 identity_file:/home/opc/.ssh/id_rsa -tgtarg3 sudo_location:/usr/bin/sudo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package JdbcRedshiftConnection; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.sql.Statement; | |
| public class JdbcRedshiftConnection { | |
| public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //============================================================ | |
| //Sample Code for Query --> "select usename,usesysid,usesuper from pg_user;" | |
| //============================================================ | |
| package JdbcRedshiftConnection; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.ResultSet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo yum install nginx | |
| sudo systemctl start nginx | |
| sudo systemctl status nginx | |
| sudo systemctl enable nginx | |
| sudo firewall-cmd --zone=public --permanent --add-port=80/tcp | |
| sudo firewall-cmd --zone=public --permanent --add-service=http | |
| sudo firewall-cmd --reload | |
| sudo firewall-cmd --zone=public --permanent --list-ports | |
| ## Add port 80 to the Security List of the Subnet for Ingress Rules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo yum install httpd-tools | |
| $ ab -n 5000 -c 500 http://ip-address/ | |
| This is ApacheBench, Version 2.3 <$Revision: 1843412 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking 140.238.201.240 (be patient) | |
| Completed 500 requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo yum install httpd-tools | |
| $ ab -n 5000 -c 500 http://ip_address/ | |
| This is ApacheBench, Version 2.3 <$Revision: 1843412 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking 140.x.x.x (be patient) | |
| Completed 500 requests | |
| Completed 1000 requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cx_Oracle | |
| ### Autonomous Database Loading Block ### | |
| username='ADMIN' | |
| pwd='*******' | |
| dsn_name="""(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.ap-sydney-1.oraclecloud.com))(connect_data=(service_name=******_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)(ssl_server_cert_dn="CN=adb.ap-sydney-1.oraclecloud.com, OU=Oracle ADB SYDNEY, O=Oracle Corporation, L=Redwood City, ST=California, C=US")))""" | |
| encoding_name="UTF-8" | |
| connection = cx_Oracle.connect(user=username,password=pwd,dsn=dsn_name,encoding=encoding_name) | |
| cur = connection.cursor() |