Monday, January 6, 2014

Oracle Developer Days.ova

Virtual Box Download -> https://www.virtualbox.org/wiki/Downloads

Oracle_Developer_Day.ova -> here



Linux Server Login
username : oracle
password : oracle

Oracle Developer Days VM root password is also : oracle

Terminal
sqlplus "sys as sysdba"
password : 123
SQL> alter user hr identified by hr account unlock;



Sql Developer Connection details
Connection Name : HR_ORCL
Username : hr
Password : hr
Hostname : localhost
Port : 1521
SID : orcl



If you need to connect from outside VM, please refer to this article http://barrymcgillin.blogspot.hk/2011/12/using-oracle-developer-days-virtualbox.html on how to add Ethernet or Wifi Adapter. Then you can connect via other clients such as ssh or PLSQL to the new adapter from outside VM. If you use the NAT adapter, you should use the port forwarding setting as in the article.



This is how to show and resize the virtual hard-disk partition if needed
VBoxManage showhdinfo ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk1.vmdk
VBoxManage showhdinfo ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk2.vmdk

VBoxManage clonehd ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk2.vmdk ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk2A.vdi --format vdi

VBoxManage modifyhd ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk2A.vdi --resize 40960

VBoxManage clonehd ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk2A.vdi ~/VirtualBox\ VMs/Oracle\ Developer\ Days/Oracle_Developer_Day-disk2A.vmdk --format vmdk



Please refer to this on how to grow the linux partition using GParted http://derekmolloy.ie/resize-a-virtualbox-disk/


To create DBLINK to remote server using Easy Connect Naming (see here http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm#NETAG1125) :
Need to create the DBLINK using "sys as sysdba"

CREATE PUBLIC DATABASE LINK mydblink
CONNECT TO myusername IDENTIFIED BY "mypassword!"
USING '//172.1.2.3:1521/service_name';

GRANT CREATE SYNONYM, CREATE VIEW, CREATE DATABASE LINK, CREATE PUBLIC SYNONYM, DROP PUBLIC SYNONYM TO HR;