Configure AWS Command Line Interface

In this lesson i will show you how to configure AWS command line, and how to start working with your AWS account thru command line with very simple and basic steps :-

  • First of i will assume that you don’t have any user or group in your AWS console
  • from the AWS Console :-
  • From IAM ( Identity access management ) Choose Group Create Group with permission Administrator access and then hit create.
  • create user and add that user to the group in my case the group name shown above, save the secret key and access ID as CSV.
  • Now from this link here, Download AWS Command Line Interface depend on your operating system and open cmd , terminal … etc.
  • Now from Dos enter AWS configure and fill the information like the below:-
  • Open the command line and test if it’s connected to AWS now.
You can learn more about the command line from AWS documentation , if you recive the following error 
“Could not connect to the endpoint URL: “https://s3.london.amazonaws.com/”
Then make sure you are on the right Region.
Thanks
Osama

failed to associate the token : AWS

Once you create AWS you should activate “Activate MFA on your root account” 

and do that you should use your phone (Iphone, Android) download google authenticator app from the app store/Google Play once the installation is done Scan the QR and Enter the code, the code will be change automatically, if the first try not working and you receive this error ” failed to associate the token” uninstall the app and try again.

Thank you
Osama

Plug and unplug PDB on the Cloud

You can use DBaaS Monitor to plug/Unplug in a pluggable database.

  • Open Dbaas Monitor like usual 

  • Once you did this the, you will redirected to new page, in my case i have 2 PDB let’s choose one of them and try to unplug it then Plug it again.
  • From the Right Panel press on the Unplug new screen will be open, As you see from the below picture you should the XML path in your mind in case you need to Plug the database again , put the password same as you use it when you create PDB.

The output should be “PDB unplugged successfully”..
Let’s Plug again.
  • Press on Plug PDB on the right new screen will be opened.

Enter the following ;-
    • Name of the new PDB You want.
    • The XML file should be saved under directory you choose it
Output should be successfully done.
Cheers
Osama Mustafa

Access Apex On the Cloud Using DBaas

Oracle Database Cloud Service include Oracle Application Express, which you manage using the Oracle Application Express administration console. You access this administration console by going to the Oracle Application Express.

To access the Apex Application on the cloud;-

  • From the Dbaas you want, press on the tool panel and choose Apex.
  • To use the Apex you need to enable https on your cloud, to do this you have to access to compute services –> network and choose https
  • After doing this you will be able to access to Apex Page enter the following information:-
    • In the Workspace box, enter INTERNAL.
    • In the Username box, enter ADMIN.
    • In the password box, enter your password.
Enjoy the cloud
Cheers
Osama mustafa

Enable master key Encryption Key for a PDB on the cloud

SELECT wrl_parameter, status, wallet_type FROM v$encryption_wallet;Master Key Encryption allow you to encrypt sensitive data, such as credit card numbers, stored in table columns. Encrypted data is transparently decrypted for a database user who has access to the data. Transparent data encryption helps protect data stored on media in the event that the storage media or data file gets stolen for more information about it here.

After creating Database on the cloud ( Dbaas ) you can enable the master key by using the below steps :-

  • First of all you need to check the name of the container that you want to enable master key.
    • select con_id, dbid, name from v$pdbs;
  • as you see my container name is PDB1 set the session to this.
    • ALTER SESSION SET CONTAINER = PDB1;
  • Check the location for the wallet by running the below query :-
    • SELECT wrl_parameter, status, wallet_type FROM v$encryption_wallet;
  • Back to Root Container run the below query to see the wallet parameter type there is two value autologin or password each one of them having it’s own usage, in my case the value set to password.
  • Now i should close the wallet depend on the wallet type in my case it’s set as password then i will use the below  for more information about ADMINISTER KEY MANAGEMENT here
    • ADMINISTER KEY MANAGEMENT SET KEYSTORE close IDENTIFIED BY Mypassword;
  • When i tried to open the wallet using the same password i set it before. 
    • ADMINISTER KEY MANAGEMENT SET KEYSTORE open IDENTIFIED BY MyPassword CONTAINER=all
But my wallet is closed, i found oracle support document here Document number 1944507.1 which discuss this error and provide a solution for this error you can back to this document.
Once you apply the solution you will be able to open the wallet as below.
Welcome to TDE on the cloud.

Thank you
Osama Mustafa

Enable-Disable Database Vault on the Cloud

Oracle Database Vault restricts access to specific areas in an Oracle database from any user, including users who have administrative access. For example, you can restrict administrative access to employee salaries, customer medical records, or other sensitive information. for more information about it here

Now to enable DBV on the cloud it’s very simple all you have to do is the following :-

  • Connect to the compute node as oracle user using putty i post about this before.
  • To enable DBV Run the below command :-
    • dbaascli dv on
  • After this the output should like this “Successfully configured DV”
Congratulation DBV is enabled now.
And to Disable DBV All you have to do is Run :-
  • dbaascli dv off
Enjoy the Cloud , Cheers,
Osama Mustafa
Notes :-
  1. For the username i put C## because i am using database 12cR1 and enable pluggable..

Deleting a Backup On The Cloud

In this post i will show you how to delete backup on the cloud using the command line :-

  • Connect to the compute node as the opc user.
  • Start a root-user command shell using sudo command 
    • sudo su –
  • List the backup
    • # /var/opt/oracle/bkup_api/bkup_api recover_list –keep
  • Delete the backup 
    • # /var/opt/oracle/bkup_api/bkup_api bkup_delete –bkup=backup-tag
      • where backup-tag is the tag of the backup you want to delete.
Thank you
Osama Mustafa

Scaling a Database Deployment – Oracle Cloud

If a database deployment on Oracle Database Cloud Service is performing poorly or is running out of storage, you can scale up the environment supporting the database deployment.

follow these steps to scale up/Down your Dbaas :-

  • Open the Oracle Database Cloud Service console.
  • Click the name of the deployment you want to scale.
  • Choose the scaling command:
  • The Scale Up/Down Service overlay is displayed. 
Choose which resource you want to Press Yes.
Thank you
Osama