SqlPlus quick reference
This file contains 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
# ############################################################################################################# | |
# Ver [2.1] | |
# CONFIGURATION BASELINE COLLECTOR SCRIPT FOR ORACLE DATABASE & LINUX OS | |
# THIS SCRIPT WILL WRITE FOUR LOG FILES: | |
# - ONE FOR DATABASE CONFIGURATIONS [One log for EACH database]. | |
# - ONE CONTAINS CREATION/GRANTED PRIVILEGES DDL STATEMENTS FOR ALL DB USERS [One log for EACH database]. | |
# - ONE FOR CONTROLFILE BACKUP TO TRACE [One log for EACH database]. | |
# - ONE FOR OS CONFIGURATIONS. | |
# | |
# FEATURES: |
... and follow the instructions in the readme file.
https://github.com/oracle/docker-images/tree/master/OracleDatabase
cd docker-images/OracleDatabase/dockerfiles
This file contains 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
SELECT * FROM DBA_DATA_FILES; | |
ALTER TABLESPACE TBS_DB | |
ADD DATAFILE 'D:\APP\RBS\PRODUCT\11.2.0\DBHOME_1\DATABASE\TBS_DB5.DBF' | |
SIZE 10G | |
AUTOEXTEND ON; | |
ALTER DATABASE DATAFILE 'D:\APP\RBS\PRODUCT\11.2.0\DBHOME_1\DATABASE\TITAS_DB2.DBF' AUTOEXTEND ON; |
This file contains 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
docker run -d -p 9000:8080 -p 1521:1521 -v /home/glats/Documentos/oracle:/u01/app/oracle sath89/oracle-xe-11g |
This file contains 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 | |
if [ $USER = "oracle" ]; then | |
if [ $SHELL = "/bin/ksh" ]; then | |
ulimit -p 16384 | |
ulimit -n 65536 | |
else | |
ulimit -u 16384 -n 65536 | |
fi | |
fi |
This file contains 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 | |
echo "start" | |
user=root | |
pass=root | |
database=centent_db_dev | |
o_user=OR_AD | |
o_pass=or_ad | |
o_database=or | |
o_user_upper=OR_AD | |
path="$(pwd)/mod_bk.sql" |
This file contains 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
############################################################################################### | |
### calculating the memory | |
export ORACLE_BASE=/u01/app/oracle #setting the BASE | |
export ORACLE_SID=CLINDB #Setting SID | |
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1 #Setting ORACLE_HOME | |
audit_file_dest=$ORACLE_BASE/admin/$ORACLE_SID/adump | |
rm=$(free|awk '/^Mem:/{print $2}') ## get the total ram | |
oramem=$(echo "$rm*40/100"|bc) ### allocated 40% of total to oracle | |
sga=$(echo "$oramem*60/100"|bc) ### out of 60 allocated 60% to SGA |
This file contains 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 | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=3072 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo chmod 600 /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
sudo yum update -y | |
sudo yum install -y wget |
This file contains 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
iptables -I INPUT -p tcp --dport 1521 -j ACCEPT | |
iptables -I INPUT -p tcp --dport 1522 -j ACCEPT |