Hoje 29 de Agosto de 2018 estou iniciando uma série de posts que denominei de Diário de um DBA. O conteúdo dos posts contidos nesta série serão exclusivamente em Português e não serão de conteúdos técnicos como estou acostumado a publicar neste blog e, sim, com dicas, um pouco da minha experiência, histórias e ideias que um DBA pode passar, já passou ou irá passar ao longo de sua carreira. Além disso, o foco é de alguma maneira ajudar DBAs que já estão na carreira ou aqueles que começaram e/ou…
Simple way how to use Database Point-in-Time Recovery
There are some situations where it is relevant for DBA to use FLASHBACK or Database Point-in-Time Recovery such as when a user modifies some data incorrectly or also when an upgrade failed and if it wishes to revert the previous situation of the database among several others possibilities. With this, in this post I will be explaining in a simple way how to use Database Point-in-Time Recovery. Therefore, I will be considering some requirements for this operation be possible: – The database must be enabled in Archivelog mode: – The…
[Oracle 12c] BACKUP PLUGGABLE DATABASE
Backing up the Oracle database is always very important. In version 12c, there is the possibility of backing up one or more PDBs. There are two methods to back up the PDB, one is connecting directly as a ROOT in RMAN and using the “BACKUP PLUGGABLE DATABASE” command or the option to connect directly to the PDB through the service and execute the “BACKUP DATABASE” command. So, in this post I will be explaining just how to backup the PDB by connecting as ROOT and using as an example a…
[Oracle 12c] BACKUP DATABASE ROOT
Backing up the Oracle database is always very important. In version 12c, there is a possibility of backing up the ROOT database that has important metadata for the CDB. So, in this post I’ll be illustrating how to backup the ROOT database: 1. Connect to the RMAN catalog: 2- Execute the command BACKUP DATABASE ROOT: Efetuar o backup do banco de dados Oracle é sempre muito importante. Na versao 12c, há a possibilidade de se efetuar o backup do banco de dados ROOT que possui possui metadados importantes para…
Oracle Database 12c : Common User x Local User
In this post I will be showing you how to create an user in the CDB, what are called “Common Users” (users using the COMMON_USER_PREFIX parameter to set the user prefix at creation time) and then afterwards an user in a PDB called TECHDATABASKET , which are the “Local Users”. 1- Creating Common User in a CDB: 2- Creating Local User in a PD Neste post estarei mostrando simplificamente como criar um usuário no CBD, o que chamados de “Common Users” (usuários que utilizam o parâmetro COMMON_USER_PREFIX para definir o…
Creating a PDB by Cloning a Remote PDB
In this post I will be showing a simple example of how to create a PDB database through another PDB remotely. CDB database: CBD4 with the PDB database named TECHDATABASKET2 CDB database: CBD3 where the TECHDATABASKET2new PDB will be created using the TECHDATABASKET2 PDB of the CDB4 database. Then here are the examples: 1-The database must be CDB and be connected in the CDB$ROOT: 2- Creating the service entry for the TECHDATABASKET2 PDB in TNSNAMES.ORA and performing some tests: – Adding the entry for the service of the PDB…
Creating a PDB from a local PDB
In this post I will be showing a simple example of how to create a PDB database through a local PDB: Then follow the examples: 1-The database must be CDB and you must be connected in the CDB$ROOT: 2-Create the PDB through the local PDB (which should be open in read-only mode: – As we will be using the PDB TECHDATABASKET in this example, the next step will be to put this PDB in READ ONLY mode: — Como estaremos utilizando o PDB TECHDATABASKET neste exemplo, o próximo passo será…
Creating a PDB database from seed template
In this post I will be showing a simple example of how to create a PDB database from the seed template. Therefore, follow the examples: 1-The database must be CDB and you have to be connected in CDB$ROOT: 2- Create the PDB from seed: 3- Open the new PDB in read/write mode: 4- Check the status of the new PDB: Neste post estarei mostrando um simples exemplo de como se criar um banco de dados PDB do template seed. Sendo assim, seguem os exemplos: 1-O banco de dados …
Configuring Multiple local_listener
The configuration of multiple listeners consists of setting up 2 or more listeners for the same database. This is a task that consists of the following steps: 1- Creation of listeners:: 1.1: Listener named X1 on port 1539; 1.1: Listener named X2 on port 1537; 1.2: Initialization of listeners: 2- Create the entries of each listener for the database in tnsnames.ora: Example: Database named cbd4; 2.1: Entries will be created in tnsnames: 2.2: Testing Inputs Inserted: 2- Define the services in the database listener_local parameter of the…
Oracle 12c: Save State in a single instance
The SAVE STATE clause serves to maintain the state of the PDB when the CDB is restarted. For example, if when the CDB was restarted the OPEN_MODE of the PDB was in READ ONLY, then when the CDB will be available the PDB will initialize in READ ONLY state automatically. Saving the state of the PDBS PDBOL and PDBOL_2 through the command “ALTER PLUGGABLE DATABASE <PDB NAME> SAVE STATE;”: Simulating the unavailability of the CBD: Rebooting the CDB: See that the PDB states were maintained: The saved states of the…