Oracle jgaicc

mai 15, 2007

TIPS & Cdes

Filed under: Uncategorized — jgaicc @ 8:23
DROP [PUBLIC] DATABASE LINK dblink

CREATE DATABASE LINK "EWORK.WIPO.INT"
   CONNECT TO "EWORKTST" IDENTIFIED BY "eworktst"
   USING 'EWORK10.WIPO.INT';


alias ls='ls -CFa'
alias grip='grep -i'
alias ll='ls -ltrh'
alias ltr='ls -latr'
alias psor='/bin/ps -ef |sort'
alias psorg='psor|grp'
alias grp=grip
alias alg='alias|grp'
alias envg='env|grp'
alias m=more
alias alert='tail -100 $ORACLE_ADMIN/$ORACLE_SID/bdump/alert_$ORACLE_SID.log|more'
alias arch='cd $ORACLE_ADMIN/$ORACLE_SID/arch'
alias bdump='cd $ORACLE_ADMIN/$ORACLE_SID/bdump'
alias cdump='cd $ORACLE_ADMIN/$ORACLE_SID/cdump'

alias udump='cd $ORACLE_ADMIN/$ORACLE_SID/udump'

alias pfile='cd $ORACLE_ADMIN/$ORACLE_SID/pfile'
alias rm='rm -i'
alias sid='env|grep ORACLE_SID'
alias admin='cd $ORACLE_ADMIN'

export ORACLE_SID=


grep "ORA-" *.log |
ps -efo comm | grep dbw | cut -d"_" -f3 | sort | uniq

 find . -name libclntsh.so.* -exec  ls -l {} ;

find . | xargs grep -i WebProfile=
find . | xargs grep -i /oracle/backup/

find . -size +10024k

find . -size +90024k |xargs ls -lhtr

find /opt/fdrupstream/oracle  -name *.cfg | xargs grep profile

find . -name *.cfg | xargs grep profile

 . ~/.profile

/opt/fdrupstream/oracle/UNDPEPT1

 cd $PS_HOME/appserv && ./psadmin

CREATE PFILE='/u01/admin/jg...........' FROM  PFILE=/u01/admin/prod/pfile/initprod.ora';

export ORACLE_SID=WIFSDM84 && env | grep -i ORACLE_SID && sqlplus '/ as sysdba'

export ORACLE_SID=WIFSPRD && env | grep -i ORACLE_SID && sqlplus '/ as sysdba'
SELECT * FROM user_role_privs;

CREATE SPFILE='/u01/admin/jg...........' FROM PFILE=/u01/admin/prod/pfile/initprod.ora';

   Finding active Oracle databases on a machine ps -efo comm | grep dbw | cut -d"_" -f3 | sort | uniq

 sqlplus '/ as sysdba'

rman catalog rmundpsys/rmundpsys@UNDPRMAN target /

/u01/app/oracle/oracle/product/10GR2

export ORACLE_HOME=/u01/app/oracle/product/9IR2
export ORACLE_SID=WIFSPRD; export ORACLE_SID

export ORACLE_SID=UNDPP1EP

ORACLE_SID=UNDPEPO1; export ORACLE_SID
ORACLE_SID=UNDPEPS1; export ORACLE_SID

ORACLE_SID=WIFSDMO; export ORACLE_SID
ORACLE_SID=UNDPEPO1; export ORACLE_SID
ORACLE_SID=UNDPP1EP; export ORACLE_SID
ORACLE_SID=UNDPEPO1; export ORACLE_SID

env | grep -i ORACLE_SID

CMD /K SQLPLUS UNDPEPM/UNDPEPM@UNDPP1EP

Pour Savoir si la base est en mode ARCHIVELOG :

SELECT LOG_MODE FROM SYS.V$DATABASE;
LOG_MODE
------------
NOARCHIVELOG

orapwd file=$ORACLE_HOME/dbs/pwdUNDPEPS1.ora password=manager entries=15

more /var/opt/oracle/oraInst.loc

ORACLE_SID=UNDPEPS1; export ORACLE_SID

$ id -p
uid=100(oracle) gid=101(oinstall) projid=3(default)
$ prctl -n project.max-shm-memory -i project default
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      3.92GB      -   deny                                 -
        system          16.0EB    max   deny       

chown -R psoftep:psoft * ; chmod -R a+rwx *

. ./psconfig.sh

rm -i /u01/app/ptep/PT84806/MAINT/upd688617.dms
    -***********************************************************************

set pagesize 0
set linesize 121
col value$ format a40
col comment$ format a36

SELECT *
FROM props$;
 -***************************************************

 find . -name libclntsh.so.* -exec  ls -l {} ;

   Finding active Oracle databases on a machine

ps -efo comm | grep dbw | cut -d"_" -f3 | sort | uniq

rman catalog rmundpsys/rmundpsys@UNDPRMAN target /

/u01/app/oracle/oracle/product/10GR2

export ORACLE_HOME=/u01/app/oracle/product/9IR2
export ORACLE_SID=WIFSPRD; export ORACLE_SID

export ORACLE_SID=UNDPP1EP

ORACLE_SID=UNDPEPO1; export ORACLE_SID
ORACLE_SID=UNDPEPS1; export ORACLE_SID

ORACLE_SID=WIFSDMO; export ORACLE_SID
ORACLE_SID=UNDPEPO1; export ORACLE_SID
ORACLE_SID=UNDPP1EP; export ORACLE_SID
ORACLE_SID=UNDPEPO1; export ORACLE_SID

env | grep -i ORACLE_SID

CMD /K SQLPLUS UNDPEPM/UNDPEPM@UNDPP1EP

Pour Savoir si la base est en mode ARCHIVELOG :

SELECT LOG_MODE FROM SYS.V$DATABASE;
LOG_MODE
------------
NOARCHIVELOG

orapwd file=$ORACLE_HOME/dbs/pwdUNDPEPS1.ora password=manager entries=15

orapwd file=$ORACLE_HOME/dbs/pwdWIFSDM84.ora password=manager entries=15

orapwd file=$ORACLE_HOME/dbs/orapwdUNDPP1EP password=manager entries=15

more /var/opt/oracle/oraInst.loc

ORACLE_SID=UNDPEPS1; export ORACLE_SID

$ id -p
uid=100(oracle) gid=101(oinstall) projid=3(default)
$ prctl -n project.max-shm-memory -i project default
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      3.92GB      -   deny                                 -
        system          16.0EB    max   deny       

chown -R psoftep:psoft * ; chmod -R a+rwx *

. ./psconfig.sh

rm -i /u01/app/ptep/PT84806/MAINT/upd688617.dms
    -***********************************************************************

set pagesize 0
set linesize 121
col value$ format a40
col comment$ format a36

SELECT *
FROM props$;
 -***************************************************

SYS@UNDPEPD1> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/oradata/UNDPEPD1/archive
Oldest online log sequence     1
Current log sequence           3
SYS@UNDPEPD1>
-----------------------------------------------------------------------------------------------------------

how can i know which user connected peoplesoft

SELECT DISTINCT A.ROLEUSER, B.ACCTLOCK, B.OPRDEFNDESC, B.LASTSIGNONDTTM
 FROM PSROLEUSER A,
      PSOPRDEFN B
 WHERE B.OPRID = A.ROLEUSER
 AND B.ACCTLOCK = 0
   ORDER BY 4
---------------------connecter en UNDPEPM/UNDPEPM

SELECT DISTINCT A.ROLEUSER, B.ACCTLOCK, B.OPRDEFNDESC, B.LASTSIGNONDTTM
 FROM PSROLEUSER A,
      PSOPRDEFN B
 WHERE B.OPRID = A.ROLEUSER
 AND B.ACCTLOCK = 0
   ORDER BY 4
;


SQL> drop database link EWORK.WIPO.INT;

Database link dropped.

Laisser un commentaire »

Aucun commentaire pour l’instant.

RSS feed for comments on this post. TrackBack URI

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

Créez un site Web ou un blog gratuitement sur WordPress.com.

%d blogueurs aiment cette page :