45 liens privés
- 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
-
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
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
Activer à la mano le mode userspace de systemd pour certains utilisateurs
sudo apt-get update 2>&1 | sed -ne 's?^.*NO_PUBKEY ??p' | xargs -r -- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
In case somehow, you got duplicate mails in a maildir, like me, maybe this is helpful to you:
?
1
find /var/mail/user -type d -name cur -print0 | xargs -0 /usr/bin/fdupes -n | less
Of course you need fdupes installed. On debian:
?
1
apt-get install fdupes
The above command is the dry run, showing you the duplicates.
Then to delete the duplicates, leaving only the first found file:
?
1
find /var/mail/user -type d -name cur -print0 | xargs -0 /usr/bin/fdupes -ndN | less
Use the same thing again with “new” instead of “cur” if you have duplicate unread mails. This only looks at duplicates within the same folder, so you can also safely run it on /var/mail for all users.