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
############################################################################################# | |
#--GEO--C-- (1)To run for a entire DB:: expdp.sh server1 mydb pguserid 5432 | |
#--GEO--C-- (2)To run for a entire schema call by schema names separated by commas | |
# :: bash expdp.sh server1 mydb pguserid 5432 l2l,gmm | |
#--GEO--C-- Script when run creates 3 files for case(1) | |
# File 1: Dump file w/ format serverName_dbName_ALL_%m%d%Y_%H%M%S.dump; where under $HOME folder; ALL means all schemas in db | |
# File 2: log/out file w/ format serverName_dbName_ALL_%m%d%Y_%H%M%S.out; script grep the log files for any errors/ failures | |
# File 3: serverName_dbName_ALL_.txt; this has the lastest dump file name; thought process is to use this file to refresh(see impdp.sh) the stage/dev on a nighly basis; ssuming the DB is not huge | |
#--GEO--C-- Script when run creates 3 files for case(2) | |
# there will be 3 files(dump, out, name) for each schema for example if you |
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
install a pakcage $rpm -ihv sqldeveloper-4.0.3.16.84-1.noarch.rpm | |
root@server Downloads]# rpm -qa | grep -i sqlde | |
sqldeveloper-4.1.0.17.29-1.noarch | |
[root@server Downloads]# rpm -e sqldeveloper-4.1.0.17.29-1 | |
[root@server Downloads]# |
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
################################################################################################ | |
##--GEO--C-- this script copies a database to another database on the same machine or different machine | |
## | |
## | |
################################################################################################ | |
echo "To run this script supply fromhost, fromdbe, user, port, toHost,todb " | |
echo "E.g int503(fromhost) mydb(fromdb) myuser(user) (5432)port To: int503 newdb(todb) " | |
echo "-------------------------------------------------------------- " |
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
################################################################################################ | |
##--GEO--C-- this script copies a database to another database on the same machine or different machine | |
## | |
## | |
################################################################################################ | |
echo "To run this script supply fromhost, fromdbe, user, port, toHost,todb " | |
echo "E.g int503(fromhost) mydb(fromdb) myuser(user) (5432)port To: int503 newdb(todb) " | |
echo "-------------------------------------------------------------- " |
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
SET LINESIZE 32000; | |
SET PAGESIZE 40000; | |
SET LONG 50000; | |
########################################################################################## | |
#inventory INVENTORY_LOCATION shoudl be owner by grid:oinstall | |
#where are goin gto isntall oracle mount | |
ORA_MOUNT=/u01/app | |
ORA_LOC=$ORA_MOUNT/oracle | |
ORA_INV=$ORA_MOUNT/oraInventory | |
ORA_PRO=$ORA_MOUNT/oracle/product |
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
1. Download and Install | |
a. Download from http://nifi.apache.org/download.html get the zip file from windows | |
b. Extract the zip into another folder -- which will be nifi_home(c:\users\tgaj2\nifi-1.3.0) | |
2. Starting and Stopping NiFi | |
a. Go to nifi_home and under bin folder click run-nifi.bat. Takes little time to staup the webserver | |
b. To stop Ctl+C from the cmd window. Currently can't run as a service in windows. | |
3. Nifi UI | |
a. To access nifi ui http://localhost:8080/nifi | |
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
########################################################################################### | |
### make a directory to store audit and archievd audcit file | |
########################################################################################### | |
export BASE_PATH=/home ###### THIS HAS TO BE SET where the auidt data and archived audit stuff goes | |
###### THIS HAS TO BE SET | |
export DB2_HOME=/home/db2inst1 | |
###### THIS HAS TO BE SET :: SCHEMA onto which data will be loaded | |
export DB2_SCHEMA=AUDIT | |
###### THIS HAS TO BE SET:: Set the Extract location | |
echo -e "\n\nDB2_HOME: $DB2_HOME\nDB2_SCHEMA: $DB2_SCHEMA\nEXTRACT_LOC_PATH: $EXTRACT_LOC_PATH\n\n" |
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
/* | |
to copy/ archive changed files on git commit to local repository this might help | |
in my case need was to copy to /r/edt/Data\ and\ Analytics/deploy/ | |
git hooks are located under .git\hooks under local respository | |
tosetup:: | |
$git lfs update | |
$ git lfs update --force | |
then update .git/hooks/post-comit | |
*/ |
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 'CREATE ROLE '|| user1||' LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;' as createStat, | |
'ALTER ROLE '|| user1 ||' SET search_path = qtg;' as al1, | |
'ALTER ROLE '|| user1 ||' SET lock_timeout = ''60s'';' as al2, | |
'GRANT adhocgrp TO '||user1 || ';' as grant1, 'alter role ' || user1||' with password ''' ||password1 ||''';' | |
From ( | |
select 'adhoc'||a as user1, left(md5( 'adhoc'||a|| inet_server_addr()),5) password1, 'Drop user '||'adhoc'||a ||';' | |
, 'COMMENT ON ROLE ' ||'adhoc'||a ||''' adhoc id for '||pg_catalog.shobj_description(b.oid, 'pg_authid') || ''';' | |
From ( | |
select unnest(string_to_array(lower('TSDH2,TNXJ4,TDJS1,TAMG1,TPBW1,TJXB1,TJPH2,TOXM1'), ','))a |
OlderNewer