45 liens privés
read -p "User: " user
wget https://www.dwservice.net/download/dwagent.sh
DISPLAY="" sudo bash dwagent.sh
sudo systemctl stop dwagent.service
sudo systemctl disable dwagent.service
cd ~
mkdir -p .config/systemd/user
cd .config/systemd/user/
sudo mv /etc/systemd/system/dwagent.service .
sudo chown $user:$user dwagent.service
sed -i 's/WantedBy=multi-user.target/WantedBy=default.target/' ~/.config/systemd/user/dwagent.service
sudo chown -R $user:$user/opt/dwagent
sudo loginctl enable-linger $user
systemctl --user enable dwagent
systemctl --user start dwagent
systemctl --user status dwagent
- Get the current control_file location
SQL> show parameter control_files
NAME TYPE VALUE
control_files string /u01/oracle/dbaclass/control01.ctl
- Set the new location of controfile:
SQL> alter system set control_files='/u03/oracle/dbaclass/control01.ctl' scope=spfile;
System altered.
- start the database in nomount stage:
shutdown immediate;
startup nomount
- Restore controlfile to new location:
RMAN> restore controlfile from '/u01/oracle/dbaclass/control01.ctl';
Starting restore at 13-JAN-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=2201 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=/u03/oracle/dbaclass/control01.ctl
Finished restore at 13-JAN-19
- restart the database:
alter database mount;
alter database open;
- Check the control_file again:
SQL> show parameter control_files
NAME TYPE VALUE
control_files string /u03/oracle/dbaclass/control01.ctl
Create a Dockerfile like this:
FROM your_image as initial
FROM your_image_base
COPY --from=initial / /
your_image_base should be something like 'alpine' - so the smallest image from which your image and its parents descend from.
Now build the image and check the history and size:
docker build -t your-image:2.0 .
docker image history your-image:2.0
docker image ls
./wlst.sh
You will get WLST prompt in offline mode, invoke the following command
wls:/offline> domain = "/opt/apps/user_projects/domains/domain_name"
Note: change the domain path if necessary
wls:/offline> service = weblogic.security.internal.SerializedSystemIni.getEncryptionService(domain)
wls:/offline> encryption = weblogic.security.internal.encryption.ClearOrEncryptedService(service)
wls:/offline> print encryption.decrypt("{AES}WDhZb5/IP95P4eM8jwYITiZs01kawSeliV59aFog1jE=")
weblogic123
wls:/offline>
Pour eliminer le Privacy Protection executer les étapes suivantes :
1°)taskkill.exe /F /IM privacy.exe
2°)Telechargement de trojan-killer.net
3°)Executer un Scan trojan Killer
microdnf install -y openssh openssh-server openssh-clients initscripts wget passwd tar crontabs unzip bzip2
microdnf install -y hostname libaio
microdnf install -y glibc-*.i686 libgcc-*.i686 libstdc++-*.i686
microdnf install -y java
microdnf install -y ed vim sed tar which ncurses
microdnf install -y yum oracle-epel-release-el8
microdnf install -y ncurses-compat-libs
microdnf install -y screen rlwrap
yum config-manager --enable ol8_baseos_latest
yum config-manager --enable ol8_appstream
microdnf install -y oracle-database-preinstall-19c
check /etc/hosts with /etc/hostname: your hostname (like mypeoplesoft) should resolve only IPv4.
For full install of PeopleSoft (so with DB), check if you have more than 1G free RAM... if not, you can do that:
dd bs=1024 count=1M if=/dev/zero of=/swapfile
mkswap /swapfile
swapon /swapfile
Check if you have more than 2 or 3G free space for /tmp, if not ask more to IT.
go to DPK folder and:
cd setup
./psft-dpk-setup.sh # No args for full install
Lancer cmd en tant qu'admin.
takeown /F X:\FULL_PATH_TO_FOLDER
takeown /F X:\FULL_PATH_TO_FOLDER /r /d y
icacls X:\FULL_PATH_TO_FOLDER /grant Administrateurs:F
icacls X:\FULL_PATH_TO_FOLDER /grant Administrateurs:F /t
-
Download patches
-
backup precheck
cd precheck
ps -ef |grep pmon > current_instance.txt
ps -ef |grep tns > current_tns.txt
cat /etc/oratab > current_oratab.txt
$ORACLE_HOME/OPatch/opatch lsinventory > before_current_lsinventory.txt -
Check conflicts
export PATH=$ORACLE_HOME/OPatch:$PATH
opatch version
unzip <patch.zip> && cd <path folder>
opatch prereq CheckConflictAgainstOHWithDetail -ph ./ -
Stop oracle database and listeners
-
Check
ps -ef|grep pmon
ps -ef|grep tns
ps -ef|grep exp
ps -ef|grep rman -
Apply patch
opatch apply -
Check
opatch lsinventory > after_current_lsinventory.txt -
Start only oracle database (not the listener)
-
Patch data
datapatch -verbose -
Check
sqlplus / as sysdba
SET LINESIZE 400
COLUMN action_time FORMAT A20
COLUMN action FORMAT A10
COLUMN status FORMAT A10
COLUMN description FORMAT A40
COLUMN version FORMAT A10
COLUMN bundle_series FORMAT A10
SELECT TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time,action,status,description,patch_id FROM sys.dba_registry_sqlpatch ORDER by action_time;
-
Check stop and start
sqlplus / as sysdba
shutdown immediate
startup
select name,open_mode from v$database; -
Start the listener
Open "psappsrv.ubx" file and navigate to the bottom and locate the section with environment settings (it begins with *PS_ENVFILE)
Add the following environment variable:
LLE_DEPRECATION_WARN_LEVEL=NONE
0 - My Oracle Support patch 6880880 (OPatch) : https://updates.oracle.com/download/6880880.html
1 - Download the Patch from oracle support
2 - Copy patches to folder where oracle dba user has access
3 - For 6880880, zip old OPatch folder in $ORACLE_HOME
4 - Shutdown oracle database server and listener
5 - For other patch, go to $ORACLE_HOME and run command : ./opatch apply <path where the patch is>/patch.zip
6 - Startup oracle database server and listener
7 - ./datapatch -verbose
8 - In sqlplus (/ as sysdba) run : @?/rdbms/admin/utlrp.sql
9 - In sqlplus, check remaining INVALID objects : select owner, count(*) count from all_objects where status = ‘INVALID’ group by owner;
apt-get install -y libaio1 alien
# Change version based on https://www.oracle.com/de/database/technologies/instant-client/linux-x86-64-downloads.html
# Example alternative: http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.5-basiclite-19.5.0.0.0-1.x86_64.rpm
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
rm -f oracle-instantclient*.rpm
# Optionally install SQLPlus
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
rm -f oracle-instantclient*.rpm
lsof | egrep "deleted|COMMAND"
-> note PID and FD number
file /proc/<PID>/fd/<FD number>
-> "broken symbolic link to ..."
echo > /proc/<PID>/fd/<FD number>
If datafiles of an INDEX tablespace, do not forget to check integrity :
select 'alter index "||index_name||' validate structure;' from dba_indexes where tablespace_name='PSINDEX';
Note to take :
lvdisplay => note PV Path and note VG Name to extend (for LV Path/Name choosed), for example "system".
vgdisplay => confirm format (lvm2)
After adding disk or resize VDI :
fdisk -l
fdisk /dev/sda => add new primary or logical volume, for example "sda3"
pvscan or pvdisplay or pvs => does NOT show new partition
pvcreate /dev/sda3
pvscan or pvdisplay or pvs => show new partition
vgextend system /dev/sda3 (where system is VG Name)
lvextend -l +100%FREE /dev/system/root (where /dev/system/root is the PV Path noted before)
resize2fs /dev/system/root
It's done.
Confirm with df -h command
\n# [ $LOGNAME@\h:$PWD [\t] [ohvers
SID:${ORACLE_SID:-"no sid"}] ]\n#