sexta-feira, 14 de outubro de 2022

Oracle Database - Create an Oracle environment for tests with Swingbench

Hello all

Yesterday I needed to build a test environment with Power Protect using DD Boost.

When I have to building an environment for tests, I use Workbench to this.

Below, I put a step by step to build a simple environment.

For this test, I'm create the database IRONMAN with a PDB call IM1.

And just remember, it has worked for me, but it may not work for you.

=================================
== Download Swingbench
=================================
su - oracle 
mkdir Swingbench
cd Swingbench
wget https://www.dominicgiles.com/site_downloads/swingbenchlatest.zip
 
=================================
== Create a TNSNAMES
=================================
vim $ORACLE_HOME/network/admin/tnsnames.ora

IM1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.localdomain)(PORT = 1521))
(CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = im1)
)
)

=================================
== Restart TNSNAMES
=================================
        -- The script grid.sh create environment variables for grid infrastructure 
source grid.sh
srvctl stop listener
srvctl start listener
srvctl status listener -v

-- The script db.sh create environment variables for database IRONMAN 
source db.sql
sqlplus system/xxx@IM1
=================================
== Create tablespace and user
=================================
alter session set container=IM1;

-- Drop user & tablespace, if exists
DROP USER soe CASCADE;
DROP TABLESPACE SOE INCLUDING CONTENTS AND DATAFILES; 

-- Create a tablespace with Bigfile
CREATE BIGFILE TABLESPACE SOE DATAFILE '+DATA' SIZE 100G AUTOEXTEND ON NEXT 100G MAXSIZE 500G;

-- Create user
CREATE USER soe IDENTIFIED BY Dell123## DEFAULT TABLESPACE soe TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
ALTER USER soe QUOTA UNLIMITED ON soe;
GRANT CREATE SESSION, DBA to soe; 

=================================
== Create REDOs and alter TEMP &
== UNDO, if necessary
=================================
-- Redos
column REDOLOG_FILE_NAME format a50;
set lines 1000
SELECT a.GROUP#, a.THREAD#, a.SEQUENCE#,
   a.ARCHIVED, a.STATUS, b.MEMBER AS REDOLOG_FILE_NAME,
   (a.BYTES/1024/1024) AS SIZE_MB 
FROM v$log a
JOIN v$logfile b ON a.Group#=b.Group#
ORDER BY a.GROUP#;

ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 4 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 5 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 6 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 7 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 8 ('+REDO','+REDO') SIZE 1G;
ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 9 ('+REDO','+REDO') SIZE 1G;
-- Undo 
col T_NAME for a23
col FILE_NAME for a65
SELECT tablespace_name T_NAME,file_name, bytes/1024/1024 MB 
FROM dba_data_files 
WHERE tablespace_name =(SELECT UPPER(value) FROM v$parameter WHERE name = 'undo_tablespace') 
ORDER BY file_name;

--- CDB
SQL> alter database datafile '+DATA/IRONMAN/DATAFILE/undotbs1.258.1107594131' resize 1G;
SQL> alter database datafile '+DATA/IRONMAN/DATAFILE/undotbs1.258.1107594131' autoextend on next 1G maxsize 31G;
SQL> alter tablespace undotbs1 ADD DATAFILE '+DATA' size 1G autoextend on next 512M maxsize 31G;

-- Temp
set pages 999 lines 400
col FILE_NAME format a75
SELECT d.TABLESPACE_NAME, d.FILE_NAME, d.BYTES/1024/1024 SIZE_MB, d.AUTOEXTENSIBLE, d.MAXBYTES/1024/1024 MAXSIZE_MB, d.INCREMENT_BY*(v.BLOCK_SIZE/1024)/1024 INCREMENT_BY_MB
FROM dba_temp_files d, v$tempfile v
WHERE d.FILE_ID = v.FILE#
ORDER BY d.TABLESPACE_NAME, d.FILE_NAME;
--- CDB
SQL> ALTER TABLESPACE temp ADD TEMPFILE '+DATA' SIZE 1G AUTOEXTEND ON NEXT 1G MAXSIZE 31G;
=================================
== Connection test
=================================
conn soe/xxx##@IM1

==================================================================
== Using Swingbench
==================================================================
First, disable archive mode to make the process faster.

cd /home/oracle/Swingbench/swingbench/bin
./shwizard










That's all folks!!!

I hope that help you.

Regards
Mario

terça-feira, 11 de outubro de 2022

Cloud Engineering & Architecture - Landing Zone

===================
EN
===================
Hello all

In my last MBA Cloud Engineering & Architecture class, we have had a discuss about Landing Zones and your importance in the Journey 2 Cloud process.

We have been talking about the Gartner’s Cloud Adoption Framework also.


One of many challenges for customer to Journey 2 Cloud is the moment of start of provisioning and deployment. It's between the step 4 and step 5 on the Framework.

At this moment we have many challenges of architecture, security & deployment problems to solve and many customers & Cloud Engineers make mistakes. They don't think in a pre-architecture and best practices for a Cloud environment because they have many tasks to do, many setups to plan and little time. 

One of many errors is to start the provisioning & deployment without Landing Zone.

Use the Landing Zone definitions can be helping to simplify and ensure the necessary security for the start of your project.
 
What is Landing Zone?

Landing Zone are a solution that helps the customers to create and configure a Secure Cloud Environment with many accounts where them can operate efficiently based on best practices for a Cloud Architecture to security, network, compartments, gateways, among others.

As we have many options of design, services & deploy options, the environment settings with many accounts can use much time and require a big knowledge about Cloud, besides being able to have many security issues.
 
For example, it's very important think in Tenancy, Policies, 2factor authentication, Compartments, Virtual Cloud Network (VCN) and subnets, Internet & NAT gateway, security groups, Firewall, DDoS, WAF, Infrastructure As A Code, notifications, automation, among other things. 

The Landing Zone Services can help you in these tasks.

Below, the links with the Landing Zone Rules & definitions in the Big Four Cloud Providers:

But just remember:
1) This work for me, but it might not work for you.
2) This post is just for study. The real world can be different - and it is, probably.

Regards
Mario

===================
PTB
===================
Fala pessoal

Em minha última aula do MBA Cloud Engineering & Architecture, nós falamos sobre Landing Zones e sua importância para o processo de Journey 2 Cloud.

Nós estamos falando também sobre o Gartner’s Cloud Adoption Framework.

Um dos muitos desafios para o cliente no Journey 2 Cloud é o momento de começar o provisionamento e o deployment. Isso fica entre o step 4 e o step 5 no Framework.

Neste momento nós temos muitos desafios com a arquitetura, segurança e problemas de deploy para rersolver e muitos clientes e Cloud Engineers cometem erros. Eles não pensam na pre-arquitetura e nas best practices para ambientes em Cloud porque eles tem muitas tarefas a fazer, muitos deploys a planejar, e pouco tempo para isso

Um dos muitos erros é começão o provisionamento e deployment sem usar Landing Zone.

Usar as definições de Landing Zone pode ajudar a simplificar e garantir a segurança necessária para o início do seu projeto.

O que é Landing Zone?

Landing Zone é uma solução que ajuda os clientes a criar e configurar um Ambiente Cloud Seguro com muitas contas onde eles podem operar de forma eficiente com base nas best practices de uma Arquitetura Cloud para segurança, network, compartiments, gateways, entre outros.

Como temos muitas opções de design, serviços e opções de implantação, as configurações do ambiente com muitas contas podem consumir muito tempo e exigir um grande conhecimento sobre Cloud, além de poder ter muitas falhas de segurança.
 
Por exemplo, é muito importante pensar em 
Tenancy, Policies, 2factor authentication, Compartments, Virtual Cloud Network (VCN) and subnets, Internet & NAT gateway, security groups, Firewall, DDoS, WAF, Infrastructure As A Code, notifications, automation, entre outras coisas.

Os Serviços da Landing Zone podem ajudá-lo nessas tarefas.

Acima, os links com as regras e definições da Landing Zone nos quatro grandes Cloud Providers.

Mas lembre-se:
1) Isso funciona para mim, mas pode não funcionar para você.
2) Esse post é apenas para aprendizado. O mundo real pode ser diferente - e provavelmente é.

Abraço
Mario

segunda-feira, 10 de outubro de 2022

OCI Foundations - Regions, Availability Domains & Fault Domains

==============
EN
==============
Hello All

I started my studies today to renew my OCI Foundations certification and as I study, I create my Mind Maps.

Today we will talk about Regions, Availability Domains and Fault Domains.

If you want to see the Mind Map, click on the image below.

Hope this helps you.

Regards
Mario


==============
PTB
==============
Fala pessoal

Eu comecei os meus estudos para renovar a minha certificação OCI Foundations hoje e conforme eu for estudando, eu vou criando meus Mind Maps.

Hoje vamos falar sobre Regions, Availability Domains & Fault Domains.

Se quiser ver o Mind Map, basta clicar na imagem abaixo.

Espero que isso ajude você.

Abraço
Mario



segunda-feira, 3 de outubro de 2022

Cloud Engineering & Architecture - Mental Map - API definitions and its main details (Definicções e principais detalhes de APIs)

====================
EN
====================
Hello all

One more Mental Map. 

This time, we'll talk about APIs, your definitions and its main details.

This subject have presented on API Management class on my MBA Cloud Engineering & Architecture. 

But just remember:
1) This work for me, but it migth not work for you.
2) This mental map is just for academic study. The real world can be different - and it is, probably.

If you want to see this API Mental Map, just click the image below. 

And if you have any question or suggestions,  let me know, please.

====================
PTB
====================
Fala pessoal

Mais um Mental Map. 

Dessa vez, vamos falar sobre APIs, suas definições e seus principais detalhes.

Esse assunto foi apresentado na aula de API Management no meu MBA de Cloud Engineering & Architecture. 

Mas lembre-se:
1)  Isso funciona para mim, mas pode não funcionar para você.
2) Esse Mental Map é apenas para aprendizado acadêmico. O mundo real pode ser diferente - e provavelmente é.

Se quiser ver o API Mental Map, basta clicar na imagem abaixo.

E se você tiver qualquer dúvida ou sugestão, por favor me fale.

Regards
Mario

Postagem em destaque

[ORACLE] How to move a datafile to a new location in ASM.

Hello everyone! I hope you're doing well! Today, I needed to move a datafile to another ASM Disk Group. The process was simple, but reme...