Monday, February 22, 2016

Generating SSH Key DBAAS



With puttygen tool you can create your private, public, and open ssh keys for Cloud instances, here the procedure:

1.- Open tool

PuTTY Key Generator

2.- Select SSH-2 RSA

PuTTY Key Generator parameters

3- Bits:

PuTTY Key Generator parameters

4- Generate:
Generate button

5- Draw stg for randomness

Generating key - status

6.- Copy key

Generated public key

7.- Set the key pass phrase to create a private key

Key passphrase fields

There is no way to recover a passphrase if you forget it.



8.- Save it (PPK Extension)


9.- If you need to create a compatible SSH key for commands, export it as open ssh.

Save private key in OpenSSH format

10.- Create public key by copy-paste the content of the generated key,point 6, in a txt file and save it.

Note: Not the private key

Public key for pasting

Public key pasted into text editor


More information:

http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/obe_dbaas_QS/oracle_database_cloud_service_dbaas_quick_start.html#section1




Access DBAAS through SSH


Sometimes you are required to enter to a machine node to make some administrative tasks, you cannot do in web consoles, so you need to enter with SSH.

With a client like MobaXterm, Putty, or whatever SSH Client you have do the following

Remote Host: Here you put the public ip
User: oracle | opc

oracle for common administrative tasks
opc user if you need root privilege using sudo command

Port: Use the default (22)

In auth section use the private key that you create when you configured your database service, you create 3 keys:

1.- Private Key
2.- Public Key
3.- SSH Key

Here you select your private key

Click in OK

Click in connect session







There you go ! 

DBAAS Useful Links


Here I share useful links when you have provisioned with database as a service:

The main requirements is that you have DB Enterprise Edition and service and listeners up and running:

Links:

EM
https://public-ip:5500/em/shell#/config/show_params
system/pwd

Database Monitor
https://public-ip/dbaas_monitor/
DBAAS_MONITOR/pwd

APEX
https://public-ip/ords/pdb1/f?p=4050:3:8030913058308:::::

INTERNAL (always)
ADMIN/pwd

GlassFish
https://public-ip:4848/common/index.jsf
admin/pwd

Make sure you have database instance up and running

For instance:

https://dbaas.oraclecloud.com/dbaas/faces/dbRunner.jspx username and password provided when Oracle granted your access.




And also in Compute Services.

https://computeui.us.oraclecloud.com/mycompute/faces/instances.jspx

Check if Instance and Network services are up and runnig.


If not restart the network services in update option


There you go!

Monday, January 25, 2016

Overview Business Intelligence Cloud Service

Oracle has driven BI Cloud strongly, that's why I share you a very good link if you want to learn about BI Cloud Service

Main topics:

Explore Data in Visual Analyzer Projects
View Reports in Dashboards and Analyses
Getting Started with Analyses
Getting Started with Dashboards
Prepare Data and Models for Exploration and Reporting
Getting Started with Data Loading
Getting Started with Data Modeling
Manage Your BI Cloud Service

https://docs.oracle.com/cloud/latest/reportingcs_use/reportingcs_tutorials.htm

Monday, November 23, 2015

Change JAVA default location of Linux




When you install a product for example 12 C versions Oracle when you are running the installer this ask you for a specific JAVA version and there is no other way to set that if you don't install it, even when set JAVA_HOME, JRE_HOME, JDK_HOME, (Or I haven't find it yet)
So, download the JAVA version you want and move it to:

/usr/lib/jvm/jdk1.7.0_79 (for example)

To set your JAVA version and associate it to java command, then configure the JAVA command, with root privileges run:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_79/bin/java" 1
sudo update-alternatives --config java

Optionally you can set:

export JAVA_HOME=/usr/java/jdk1.7.0_79
export JRE_HOME=/usr/java/jdk1.7.0_79/jre
export JDK_HOME=/usr/java/jdk1.7.0_79

In your bash_profile.

Restart bash or reboot.

Note:

When you install java with rpm  option, this is installed in /user/java/(java_version)

Annexed:

Remove-->

sudo update-alternatives --remove "java" "/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java"  

Friday, July 24, 2015

Change Dynamic Ip to Static Ip Oracle Linux Server



Change the network file, and set the gateway


[oracle@alexdb ~]$ cat  /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=alexdb.oracle.com
GATEWAY=192.168.x.x

Change your interface:
/etc/sysconfig/network-scripts/ifcfg-eth0

Check the values in red

DEVICE=eth0
NM_CONTROLLED=yes
HWADDR=00:21:F6:3F:3A:69
TYPE=Ethernet
UUID=ea5fd29b-4752-4ef7-890f-9611c18eb4c6
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
ONBOOT=yes
PEERROUTES=yes
IPADDR=192.168.128.63
GATEWAY=192.168.128.1
NETMASK=255.255.255.0
BOOTPROTO=static
USERCTL=no


Change the hosts file /etc/hosts


issue the following command:
service network restart

Your mac address must match HWADDR=00:21:F6:3F:3A:69 to your interface address

ifup eth0 if your interface is not available. 

Cheers!


Tuesday, June 30, 2015

How to change UUID from VDI Virtual Box


Today I had a problem, I ran out of time and I had to create a clone of virtual machine but I didn't wanted to install again the SO,  what I did is create a duplicate in file system of the vm. When I tried to start both machines at same time I get an error of UUID.

To fix this:

I changed the UUID with a vbox command



C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands sethduuid "C:
\Users\Alejandro\VirtualBox VMs\OL6.6_BI1\OL6.6.vdi"

UUID changed to: 762eadf7-3b7a-4d9b-a08f-6a88e888931b


Then I got an Error with the VM when I was trying to started it, Checking the files associated I realized that the old UUID was in, So I use the new UUID and replace the UUID reference in the file associated to the VDI the vbox file.

Content:

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.14-windows">
  <Machine uuid="{762eadf7-3b7a-4d9b-a08f-6a88e888931b}" name="OL6.6" OSType="Oracle_64" snapshotFolder="Snapshots" lastStateChange="2015-07-01T02:37:11Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{762eadf7-3b7a-4d9b-a08f-6a88e888931b}" location="OL6.6.vdi" format="VDI" type="Normal"/>
      </HardDisks>
      <DVDImages/>
      <FloppyImages/>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
      <ExtraDataItem name="GUI/LastGuestSizeHint" value="640,480"/>
      <ExtraDataItem name="GUI/LastNormalWindowPosition" value="806,72,944,394,max"/>
      <ExtraDataItem name="GUI/MiniToolBarAlignment" value="bottom"/>
      <ExtraDataItem name="GUI/SaveMountedAtRuntime" value="yes"/>
      <ExtraDataItem name="GUI/ShowMiniToolBar" value="yes"/>
    </ExtraData>
    <Hardware version="2">
      <CPU count="1" hotplug="false">
        <HardwareVirtEx enabled="true"/>
        <HardwareVirtExNestedPaging enabled="true"/>
        <HardwareVirtExVPID enabled="true"/>
        <HardwareVirtExUX enabled="true"/>
        <PAE enabled="true"/>
        <LongMode enabled="true"/>
        <HardwareVirtExLargePages enabled="true"/>
        <HardwareVirtForce enabled="false"/>
      </CPU>
      <Memory RAMSize="4096" PageFusion="false"/>
      <HID Pointing="PS2Mouse" Keyboard="PS2Keyboard"/>
      <HPET enabled="false"/>
      <Chipset type="PIIX3"/>
      <Boot>
        <Order position="1" device="Floppy"/>
        <Order position="2" device="DVD"/>
        <Order position="3" device="HardDisk"/>
        <Order position="4" device="None"/>
      </Boot>
      <Display VRAMSize="12" monitorCount="1" accelerate3D="false" accelerate2DVideo="false"/>
      <VideoCapture enabled="false" screens="18446744073709551615" horzRes="1024" vertRes="768" rate="512" fps="25"/>
      <RemoteDisplay enabled="false" authType="Null" authTimeout="5000"/>
      <BIOS>
        <ACPI enabled="true"/>
        <IOAPIC enabled="true"/>
        <Logo fadeIn="true" fadeOut="true" displayTime="0"/>
        <BootMenu mode="MessageAndMenu"/>
        <TimeOffset value="0"/>
        <PXEDebug enabled="false"/>
      </BIOS>
      <USB>
        <Controllers>
          <Controller name="OHCI" type="OHCI"/>
          <Controller name="EHCI" type="EHCI"/>
        </Controllers>
        <DeviceFilters/>
      </USB>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="08002723B9FA" cable="true" speed="0" promiscuousModePolicy="AllowAll" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="Intel(R) Dual Band Wireless-AC 7260"/>
        </Adapter>
        <Adapter slot="1" enabled="false" MACAddress="0800274AF066" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="2" enabled="false" MACAddress="0800278B7008" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="3" enabled="false" MACAddress="08002755B6EB" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="4" enabled="false" MACAddress="0800277F3F9A" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="5" enabled="false" MACAddress="080027677373" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="6" enabled="false" MACAddress="080027B9B276" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
        <Adapter slot="7" enabled="false" MACAddress="080027F0677A" cable="true" speed="0" type="82540EM">
          <DisabledModes>
            <NAT>
              <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
              <Alias logging="false" proxy-only="false" use-same-ports="false"/>
            </NAT>
          </DisabledModes>
        </Adapter>
      </Network>
      <UART>
        <Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
        <Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
      </UART>
      <LPT>
        <Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
      </LPT>
      <AudioAdapter controller="AC97" driver="DirectSound" enabled="true"/>
      <RTC localOrUTC="UTC"/>
      <SharedFolders>
        <SharedFolder name="Programas" hostPath="C:\Oracle\Programas" writable="true" autoMount="true"/>
      </SharedFolders>
      <Clipboard mode="Bidirectional"/>
      <DragAndDrop mode="Bidirectional"/>
      <IO>
        <IoCache enabled="true" size="5"/>
        <BandwidthGroups/>
      </IO>
      <HostPci>
        <Devices/>
      </HostPci>
      <EmulatedUSB>
        <CardReader enabled="false"/>
      </EmulatedUSB>
      <Guest memoryBalloonSize="0"/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/GuestAdd/HostVerLastChecked" value="4.3.26" timestamp="1435712622146009900" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Revision" value="98988" timestamp="1435712516094043001" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Vbgl/Video/0" value="1920x954x0,0x0,1" timestamp="1435712592180704800" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Vbgl/Video/SavedMode" value="1920x954x0" timestamp="1435712592181204800" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/Version" value="4.3.26" timestamp="1435712516093542900" flags=""/>
        <GuestProperty name="/VirtualBox/GuestAdd/VersionExt" value="4.3.26" timestamp="1435712516094043000" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/OS/Product" value="Linux" timestamp="1435712516092542800" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/OS/Release" value="2.6.39-400.17.1.el6uek.x86_64" timestamp="1435712516093042900" flags=""/>
        <GuestProperty name="/VirtualBox/GuestInfo/OS/Version" value="#1 SMP Fri Feb 22 18:16:18 PST 2013" timestamp="1435712516093042901" flags=""/>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="es_ES" timestamp="1435709890894685000" flags=""/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" port="1" device="0">
          <HostDrive src="D:"/>
        </AttachedDevice>
      </StorageController>
      <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" port="0" device="0">
          <Image uuid="{762eadf7-3b7a-4d9b-a08f-6a88e888931b}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>

Now I have my two duplicate VM's! =)