Visit Counter

Wednesday, December 31, 2014

MySQL Database Migrate to Oracle 11g






















SQL Server to Oracle Database Migration using SQL Developer



1. Create a Connection with SQL Server.


 Right Click on created connection with sql server.

2.












3.











4.










 5.


.

6



7.











8.











9.











10.











11.











12. 











13.















How to connect MYSQL database to SQL Developer


1.Down load the JDBC driver from given site.

http://dev.mysql.com/downloads/connector/j/5.0.html


2. Go to Tools menu and select the Preferences.



















3. Select the driver which downloaded.












4.













5.


How can i connect SQL Server in SQL Developer




I'm using SQL Developer, I want to connect SQL Server n it and migrate data from SQL Server to Oracle 11g. When click on Retrieve Databaser its give me the following error:-



"Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property."


Solution:


1 - Download and open the JTDS folder.
2 - The ntlmauth.dll you will find inside the x86/SSO folder
3 - The JtdsXA.dll you will find inside the x86/XA folder
4 - Put the ntlmauth.ddl and JtdsXA.dll inside de Sql Developer/sqldeveloper/bin
5 - Copy the jtds-1.2.4.jar to Sql Developer/sqldeveloper/lib





Sunday, November 30, 2014

ORA-16024 - parameter string cannot be parsed



ORA-16024 - parameter string cannot be parsed

Cause - The value for the specified LOG_ARCHIVE_DEST_n (n = 1...5) parameter could not be parsed.
Common causes for this error are a misplaced equal sign, an unrecognized option, or an option that is missing a required value.

Action - Correct the value for the LOG_ARCHIVE_DEST_n parameter




Another Cause: 

I created pfile from spfile on production server for standby database.
Actually I didn't transfer pfile through FTP..I transfer file through copy/paste using NAS.
It transfered the pfile but when I start the database given above error...I googled checked all solution but it didn't work. I again transfer pfile through FTP then it resolved.



Monday, November 24, 2014

Find a File by Name in UNIX, Solaris, or Linux




Using the find command, one can locate a file by name.

To find a file such as filename.txt anywhere on the system:

# find  /  -name   filename.txt  -print


# find /export/home  -name  core   -print



/export/home/bsp/core
/export/home/alauddin/core
/export/home/khalil/core
/export/home/ashif/core
/export/home/rmohan/core
/export/home/arsalan/core
/export/home/edu/core
/export/home/ayman1/core
/export/home/crizaldo/core
/export/home/farooqa/core
/export/home/roger/core
/export/home/iype/core
/export/home/jamsheer/core
/export/home/farhat/core
/export/home/kamar/core
/export/home/karim/core
/export/home/khaja/core
/export/home/bokka/core
/export/home/libin/core
/export/home/ouseph/core
/export/home/moamen/core
/export/home/murali/core
/export/home/mnabil/core
/export/home/pradeep/core
/export/home/pradeepa/core
/export/home/greg/core
/export/home/ronnie/core
/export/home/muneer/core
/export/home/micheal/core
/export/home/essa/core
/export/home/anshad/core
/export/home/vinesh/core
/export/home/ummar/core
/export/home/victor/core
/export/home/waseem/core
/export/home/ajith/core
/export/home/elefatih/core
/export/home/gireesh/core
/export/home/kunhi/core
/export/home/jaison/core
/export/home/mhassan/core





Wednesday, November 5, 2014

ORA-12162: TNS:net service name is incorrectly specified



When I try to connect as sysdba getting below error.


SQL> CONN / AS SYSDBA

*****************************************************************************
ERROR: ORA-12162: TNS:net service name is incorrectly specified
*****************************************************************************



Set the environment variables.



Solution:

 $ORACLE_HOME=/ora/oracle/test
 $ export ORACLE_HOME

 $ ORACLE_SID=oratest
 $ export ORACLE_SID

Monday, May 5, 2014

ORACLE 10g ASM Creation on Oracle Linux 5


Environment:

Oracle Virtual Box
Oracle Linux 5
Oracle Database 10g


1- Install Oracle Linux 5 on virtual machine.


2- Create oracle user & group oinstall,dba,oper


3- Download & install ASMLib packages.


http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html#oracleasm_rhel5_amd64

oracleasm-2.6.18-8.el5-2.0.4-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-support-2.1.8-1.el5.x86_64.rpm

# rpm -ivh oracleasm-2.6.18-8.el5-2.0.4-1.el5.x86_64.rpm
# rpm -ivh oracleasmlib-2.0.4-1.el5.x86_64.rpm
# rpm -ivh oracleasm-support-2.1.8-1.el5.x86_64.rpm

4- Virtual machine and add 4 disks.

5- Create required partitions

[root@oraasm1 ~]# fdisk -l

Disk /dev/sda: 107.6 GB, 107660443648 bytes
255 heads, 63 sectors/track, 13088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2295    18434556   83  Linux
/dev/sda2            2296        9307    56323890   83  Linux
/dev/sda3            9308       10582    10241437+  83  Linux
/dev/sda4           10583       13088    20129445    5  Extended
/dev/sda5           10583       11857    10241406   82  Linux swap / Solaris
/dev/sda6           11858       13004     9213246   83  Linux

Disk /dev/sdb: 17.7 GB, 17752522752 bytes
255 heads, 63 sectors/track, 2158 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 17.7 GB, 17752522752 bytes
255 heads, 63 sectors/track, 2158 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 17.7 GB, 17752522752 bytes
255 heads, 63 sectors/track, 2158 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 17.7 GB, 17752522752 bytes
255 heads, 63 sectors/track, 2158 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table


[root@oraasm1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 2158.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2158, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2158, default 2158):
Using default value 2158

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oraasm1 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 2158.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2158, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2158, default 2158):
Using default value 2158

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oraasm1 ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 2158.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2158, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2158, default 2158):
Using default value 2158

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oraasm1 ~]#


[root@oraasm1 ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 2158.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2158, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2158, default 2158):
Using default value 2158

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@oraasm1 ~]#


6- Configure ASM options.

[root@oraasm1 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@oraasm1 ~]#
[root@oraasm1 ~]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@oraasm1 ~]#


7- label Disks

[root@oraasm1 ~]#
[root@oraasm1 ~]# /etc/init.d/oracleasm createdisk vol1 /dev/sdb1
Marking disk "vol1" as an ASM disk:                        [  OK  ]

[root@oraasm1 ~]# /etc/init.d/oracleasm createdisk vol2 /dev/sdc1
Marking disk "vol2" as an ASM disk:                        [  OK  ]

[root@oraasm1 ~]# /etc/init.d/oracleasm createdisk vol3 /dev/sdd1
Marking disk "vol3" as an ASM disk:                        [  OK  ]

[root@oraasm1 ~]# /etc/init.d/oracleasm createdisk vol4 /dev/sde1
Marking disk "vol4" as an ASM disk:                        [  OK  ]

[root@oraasm1 ~]#


8- Install Oracle 10g database software only.
 

Note: Add the redhat-5 in oraparm.ini file

/ora/oracle/Desktop/database/install/oraparam.ini
 
[Certified Version]
Linux=redhat-3,SuSE-9,redhat-4,redhat-5

Install the below packages.

xorg-x11-deprecated-libs-6.8.2-1.EL.52.x86_64.rpm
openmotif21-2.1.30-11.RHEL4.6.i386.rpm
openmotif-2.2.3-10.2.e14.x86_64.rpm
compat-glibc-headers-2.3.2-95.30.x86_64.rpm
compat-glibc-2.3.2-95.30.x86_64.rpm
compat-libstdc++-296-132.7.2.i386.rpm
compat-db-4.1.25-9.i386.rpm
compat-db-4.1.25-9.x86_64.rpm
libstdc++-devel-3.4.6-9.i386
libaio-0.3.105.2.x86_64.rpm
libaio-devel-0.3.105-2.x86_65.rpm
libobjc-3.4.6-10.x86_64.rpm
libieee1284-0.2.8-4.x86_64.rpm
sysstat-5.0.5-16.rhel4.x86_64.rpm
glibc-kernheaders-2.4-9.1.100.EL.x86_64.rpm
glibc-headers-2.3.4-2.39.x86_64.rpm
glibc-devel-2.3.4-2.39.i386.rpm
glibc-devel-2.3.4-2.39.x86_64.rpm
glibc-2.3.4-2.41.x86_64.rpm
gcc-3.4.6-9.x86_64.rpm
gcc-c++-3.4.6-9.x86_64.rpm
gcc-objc-3.4.6-10.x86_64.rpm
sane-backends-1.0.14-6.e14.1.x86_64.rpm


9- Create Database using DBCA

$./dbca