Skip to main content

Posts

DB - How to monitor Oracle datapump jobs

These days there is lot of work around database migrations not only but mainly to cloud providers. One of the ways to migrate Oracle databases is using data pump (expdp/impdp). In general works fine, it allows an easy way to bring the database even different OS. It is always good to monitor the progress, to know where we are and estimate how long we are from the end. In this post, I am sharing some queries to help with database monitoring progress. The queries can be easily tailed to various scenarios. Starting with a simple one - the track the number of objects loaded during an import operation. When there is a massive amount of errors during the import. Drop and run the import again. The bellow query can be useful also to monitor the number of objects if we are dropping the users. Here, I’m making the assumption there were no other database activity in progress on the last 24 hours. select owner, count(0) from dba_objects where owner in ( select username from dba_users where created...

VM - Resize a .vdi disk

I created a VM with 10G disk, after the Linux 7 installation, and the first upgrade, decided was better to increase the disk to 50GB. This post , i'm sharing the steps and commands I ran to increase the disk size. Software : Host : Windows 10 Pro , Oracle VM 6.1.2 Guest : Red Hat Enterprise Linux Server release 7.1 (Maipo) / Oracle Linux Server release 7.1 Ok - the first step is to resize the *vdi disk on the host side. Open a PowerShell console in the VM folder (Left Shift + Mouse Right Click on Windows) Quick list and check on the files. PS D:\VMs\OracleLinux7_MSSQL> ls Directory: D:\VMs\OracleLinux7_MSSQL Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 09/02/2020 18:40 Logs -a---- 09/02/2020 18:41 5689 OracleLinux7_MSSQL.vbox -a---- 09/02/2020 18:41 5688 OracleLinux7_MSSQL.vbox-prev -a---- 09/02/2020 18:40 9268363264 OracleL...

VM - Partilhar Pastas Windows - Linux

Neste post escrevo como partilhar pastas entre Windows (Host) e uma VM Guest, neste caso Linux. Ha algumas formas de fazer isto, esta parece me a mais facil. Seleccionar a Pasta Windows Na consola Virtual Box > Devices > Shared Folder Seleccionar a pasta windows para partilhar no Linux   O   Montar a pasta Windows na VM Ha duas opcoes : 1) Reiniciar a VM (Auto-mount) 2) Linha de comando [root@host ~]# mkdir -p /u01/stage/win_ebs_sw [root@host ~]# chmod 777 /u01/stage/win_ebs_sw [root@host ~]# mount -t vboxsf Oracle_EBS /u01/stage/win_ebs_sw/ [root@host ~]# ls /u01/stage/win_ebs_sw ebs_weblogic_webtier [root@host ~]# df -h /u01/stage/win_ebs_sw Filesystem Size Used Avail Use% Mounted on Oracle_EBS 895G 494G 401G 56% /u01/stage/win_ebs_sw Guardar a Configuracao no /etc/fstab para tornar as alteracoes permanentes. [root@host ~]# echo "Oracle_EBS /u01/stage/win_ebs_sw vboxsf defaults 0 0" >> /etc/fstab [root@host ~]# cat /etc/fstab # /etc/...

DB – How to monitor Oracle database long ops ?

As DBAs, some questions we are often asked and to be fair we ask ourselfs when we are doing massive operations, are : Is the database doing something? How long the database takes to complete the task? There a data dictionary view, GV$SESSION_LONGOPS whom is really usefull for monitoring and to provide estimated time to get the task done. Starting with a first example, a query for general propose . set lines 240 col message form a100 col opname form a50 select * from ( select round(l.sofar/l.totalwork*100,2) as complete, --l.* l.sid, --l.opname, l.message, l.start_time, l.time_remaining/60 "minuts remaining", l.elapsed_seconds from gv$session_longops l where totalwork !=0 ) where complete < 100; The view is also usefull on specific operations such as Oracle Recovery Manager (RMAN) jobs monitoring, this query returns information about backup,restore and recovery. select sid, serial#,opname, context, sofar, totalwork, round(sofar/totalwork*100,2) "%_complet...

FMW - boot.properties

In this post, I am writing to create a boot properties in  Linux/Unix and Windows. Just a recap and for the readers not used to play with Oracle Fusion Middleware / WebLogic, the general steps to build an Oracle Fusion Middleware available are. Chose the version – and check the certification matrix again your business requirements Download the software : Oracle Fusion Middleware  + Java Install the software Create Domain Domain creation, when the servers start the startWeblogic .* scripts in the process in an iterative mode, will ask the WebLogic credentials. The way to avoid that is to provide a file called boot.properties , the location for the file is inside the domain home/servers/<servername>/security ( this folder needs to be created ) . eg. Linux/Unix: ${DOMAIN_HOME}/servers/AdminServer/security/boot.properties Windows : %domain_home%\servers\AdminServer\security\boot.properties It means that after the 4 step – the next action will be create that boot.properties ...

ASM - Copy files from/to remote diskgroup

In this post, I will show how to copy files from / to Oracle Automatic Storage Management (Oracle ASM). A typical example example is when we do TTS / a.k.a transportable tablespaces. I'm showing below how to do that using asmcmd cp command. [oracle@databaseserver01]$ $ asmcmd ls +DATA MOM/ MOMSPIT/ MOMUAT3A/   [oracle@databaseserver02] $ asmcmd cp +DATA/standby_control.ctl sys@databaseserver01.1522.+ASM:+DATA/standby_super_mario.ctl Enter password: *********   [oracle@databaseserver01][$ asmcmd ls +DATA MOM/ MOMSPIT/ MOMUAT3A/ standby_super_mario.ctl.305.859841709 More about this: asmcmd Thank you for reading, hope this post was helpful. Rogerio

OS - How to change the hostname

In this post I'm sharing how to address of the most repetitive tasks after fresh build or clone a VM. Eg. for database   pre install tasks . First of all , I will how to change the hostname. Next, I will setup the local naming resolution. At end, how to play with the firewall. Change hostname - the hostname is key including for server provisioning and orchestration, the server name can be changed using the hostnamectl command. Lets see bellow some examples. root@Unknown-08-00-27-26-48-7d # hostnamectl status Static hostname: localhost.localdomain Transient hostname: Unknown-08-00-27-26-48-7d Icon name: computer-vm Chassis: vm Machine ID: d5a9e3e4d118804089e345228a189582 Boot ID: f76e3fc1c76f49028a1583b90eb01511 Virtualization: kvm Operating System: Oracle Linux Server 7.7 CPE OS Name: cpe:/o:oracle:linux:7:7:server Kernel: Linux 4.14.35-1902.3.2.el7uek.x86_64 Architecture: x86-64 root@Unknown-08-00-27-26-48-7d # hostnamectl set-hostname wls.example.com root@Unknown-08-00-27-26-48...

OS - Dual boot Oracle Linux / Windows 10

Versão Portuguesa Sometimes is useful to have two operative systems in the laptop, is possible to get that creating two partitions in th disk, and to install the OS in the respective partition. But this post is not about that - this post is about .. after have the installation is done. After install Linux, is expectable to have a menu to select the operative system. That didn't happened in my latptop, it's loading directly the Linux .. upss Windows 10 "has gone" !!! This post is about that .. feature

OS - Dual boot Oracle Linux / Windows 10

EnglishVersion Por vezes e interessante ter dois sistemas operativos numa maquina. Isso consegue-se particionando o disco, e instalar o sistema operativo noutra partição.Este post não e sobre essa instalação, mas sim sobre pós configuração. Apos instalar Linux, quando inicio o portátil e espectável aparecer um menu para selecionar o sistema operativo, Linux ou Windows 10 ... No meu caso o portátil carrega diretamente o Linux .. upss o Windows 10 "desapareceu" !!! Este post partilho a investigação sobre isso .

OS - yum - pre install tasks

Versao Portuguesa Installing the Oracle Preinstallation RPM From Unbreakable Linux Network Oracle requires some RPMs in the system - it would to be a bit painful to install all the requirements Oracle Linux comes with the yum configured and ready to use - using it makes life easier on that task bellow the example. [root@dbserver ~]# yum install oracle-rdbms-server-12cR1-preinstall Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-7.el7 will be installed --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-...

OS - yum - preinstall

English Version Install pre reqs para Oracle DB Uma das pre tasks necessarias para base de dados Oracle e installar previamente uma lista enorme de packages. Oracle Linux  vem com os repositorios do yum  , o que facilita muito a tarefa de preparar o servidor para Oracle. [root@dbserver ~]# yum install oracle-rdbms-server-12cR1-preinstall Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-7.el7 will be installed --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: ksh for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-12cR1-preinstall-1.0-7.el7.x86_64 --> Processing De...

DB - Flashback Database

EnglishVersion Neste post partilho como como usar tecnologia flashback - neste caso flashback database Como exemplo vou mostar como ajuda num dos piores cenarios - num truncate O Truncate e muito usado para limpar as tabelas, nao so os dados mas os segmentos. para recuperar de um trunncate e necessario restaurar a base de dados. Importante flashback database e necessario para operacoes de failover do data guard. Activar flashback database Requisitos para flashback database - A base de dados em archivelog mode - tradicional archive redo logs - Feature flashback activada - stream the logs / flashback logs Para isso e necessario reiniciar a base de dados de uma forma consistente Vou criar tambem um RESTORE POINT com opcao GUARANTEE FLASHBACK DATABASE -- As '/ as sysdba', SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 849530880 byt...

VM - Shared Folder Windows - Linux

Versao Portuguesa When we work with VMs we need to make files available eg. software binaries, it has a few ways to do that, this post is about how to make share Windows (Host) folders in a Linux server (Guest).

DB - Data Guard 12c - Create Physical Standby

Versao Portuguesa Have been thinking for awile to post about Data Guard,  more specifically about  to created a physical standby.  So, today is the day, the aim of this post is not to destille  Data Guard, for better undestanding lets recap some Data Guard concepts. Data Guard allows database replication sending  and applying redo log info from a site to another, keeping in that way the data replicated and available  in the case the main site is not available.