Monday, February 3, 2014

Export Meta Data (Without data) Only Using expdp In Oracle.

'/u01/app/oracle/product/11.2.0/db_1/bin/expdp' micr/micr@bachdb schemas=micr directory=MY_OCE CONTENT=METADATA_ONLY dumpfile=MICR_030214.DMP logfile=MICR_030214.LOG

Export: Release 11.2.0.1.0 - Production on Mon Feb 3 16:55:22 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "MICR"."SYS_EXPORT_SCHEMA_01":  micr/********@bachdb schemas=micr directory=MY_OCE CONTENT=METADATA_ONLY dumpfile=MICR_030214.DMP logfile=MICR_030214.LOG
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/XMLSCHEMA/XMLSCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/VIEW/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/JAVA_SOURCE/JAVA_SOURCE
Processing object type SCHEMA_EXPORT/JAVA_CLASS/JAVA_CLASS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/JOB
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
Master table "MICR"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for MICR.SYS_EXPORT_SCHEMA_01 is:
  /u01/XML/OCE/MICR_030214.DMP
Job "MICR"."SYS_EXPORT_SCHEMA_01" successfully completed at 16:56:09

Saturday, February 1, 2014

Auto Start Weblogic Server, Forms & Reports Server In Red Hat Linux.

1. logon as oracle user.

Create a file boot.properties in the path

(/u01/oracle/middleware/user_projects/domains/ClassicDomain/servers/AdminServer,
/u01/oracle/middleware/user_projects/domains/ClassicDomain/servers/AdminServer/security,
/u01/oracle/Middleware/user_projects/domains/ClassicDomain/servers/WLS_FORMS/security,
/u01/oracle/Middleware/user_projects/domains/ClassicDomain/servers/WLS_REPORTS/security)

and add the following line

username=weblogic // This username for your weblogic server
password=weblogic#2 // This password for your weblogic server


#  Open terminal and past the following

[oracle@micrsvr Desktop]#mkdir /u01/Scripts

Now create the following file in this Location (/u01/Scripts/)

Name :- WeblogicStart.sh

File Source
(
echo
echo Starting Weblogic Server startWeblogic.sh .................................
echo

/home/oracle/Middleware/user_projects/domains/ClassicDomain/bin/startWebLogic.sh
)

Name :- WLS_FORMS.sh

File Source
echo
echo Starting WLS_FORMS .................................
echo

/home/oracle/Middleware/user_projects/domains/ClassicDomain/bin/startManagedWebLogic.sh WLS_FORMS

Name :- WLS_REPORTS.sh

echo
echo Starting WLS_REPORTS .................................
echo
/home/oracle/Middleware/user_projects/domains/ClassicDomain/bin/startManagedWebLogic.sh WLS_REPORTS


Now Run the following command

[oracle@micrsvr Desktop]# chmod +x /u01/Scripts/WeblogicStart.sh
[oracle@micrsvr Desktop]# chmod +x /u01/Scripts/WLS_FORMS.sh
[oracle@micrsvr Desktop]# chmod +x /u01/Scripts/WLS_REPORTS.sh

2. Open Terminal And Write The following.

[oracle@micrsvr Desktop]# crontab -e

3. Past the following .....

@reboot /u01/Scripts/WeblogicStart.sh
@reboot /u01/Scripts/WLS_FORMS.sh
@reboot /u01/Scripts/WLS_REPORTS.sh

## This ensure all of services start after your server started.

Configure Webutil For Oracle Forms Report 11g In Redhat Linux & Windows.

1.Past the following file in this (/u01/oracle/middleware/Oracle_FRHome1/forms/java (D:\Oracle\Middleware\Oracle_FRHome1\forms\java) ) path.

jre-6u31-windows-i586-s.exe
jacob.jar
rolloverbutton.jar

2. Past the following file in this (/u01/oracle/middleware/Oracle_FRHome1/forms/webutil/win32, /u01/oracle/middleware/Oracle_FRHome1/forms/webutil/, /u01/oracle/middleware/Oracle_FRHome1/forms/webutil/win64) path.

(D:\Oracle\Middleware\Oracle_FRHome1\forms\webutil, D:\Oracle\Middleware\Oracle_FRHome1\forms\webutil\win32)

jacob-1.14.3-x86.dll
ffisamp.dll
jacob.dll
jacob-1.14.3-x64.dll

3. Open and change the following webutil.cfg from this path (/u01/oracle/middleware/asinst_1/config/FormsComponent/forms/server)

(D:\Oracle\Middleware\asinst_1\config\FormsComponent\forms\server)

transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=FALSE
#List transfer.appsrv.read.<n> directories
transfer.appsrv.read.1=/tmp
#List transfer.appsrv.write.<n> directories
transfer.appsrv.write.1=/tmp

4. Open default.env and add class path the following way from this path (/u01/oracle/middleware/user_projects/domains/ClassicDomain/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config)

(D:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.2\config)

:/u01/oracle/middleware/Oracle_FRHome1/forms/java/frmall.jar:/u01/oracle/middleware/Oracle_FRHome1/forms/java/jacob.jar:/u01/oracle/middleware/Oracle_FRHome1/opmn/lib/frmall.jar:/u01/oracle/middleware/Oracle_FRHome1/opmn/lib/jacob.jar

5. Change Password in the path keystore, privatkey in sign_webutil.sh file from this

path(/u01/oracle/middleware/asinst_1/bin)

(D:\Oracle\Middleware\asinst_1\bin)

KEYSTORE_PASSWORD=123456
JAR_KEY_PASSWORD=123456

[N.B. –Check the file sign_webutil.sh if not add the following line(/u01/oracle/middleware/Oracle_FRHome1/jdk/bin/keytool and /u01/oracle/middleware/Oracle_FRHome1/jdk/bin/jarsigner)  need to add.]
6. Now open terminal and complete registration for
Jacob.jar, frmall.jar, frmwebutil.jar and rolloverbutton.ja
r
('/u01/oracle/middleware/asinst_1/bin/sign_webutil.sh' '/u01/oracle/middleware/Oracle_FRHome1/forms/java/frmall.jar')


7. Open formsweb .cfg from the following patha and past micr key from the following path (/u01/oracle/middleware/user_projects/domains/ClassicDomain/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config)
[micr]
form=/u01/FORMS_MICR/FORMS/frm_logon.fmx usesdi=yes userid=micr/micr@micrdb codebase=/forms/java imageBase=codebase jpi_classid=clsid:CAFEEFAC-0016-0000-0012-ABCDEFFEDCBA jpi_codebase=/forms/java/jre-6u31-windows-i586-s.exe#Version=1,6,0,21 jpi_mimetype=application/x-java-applet;jpi-version=1.6.0_31 pageTitle=e-MICR width=100% height=100% #archive_jini=frmall_jinit.jar archive=frmall.jar,myicon.jar webUtilArchive=frmwebutil.jar,jacob.jar WebUtilLogging=off WebUtilLoggingDetail=normal WebUtilErrorMode=Alert WebUtilDispatchMonitorInterval=5 WebUtilTrustInternal=true WebUtilMaxTransferSize=16300 baseHTMLjinitiator=webutiljini.htm baseHTML=webutilbase.htm baseHTMLjpi=webutiljpi.htm separateFrame=FALSE lookandfeel=Oracle background=none logo=none

8. Report Server Path (/u01/oracle/middleware/Oracle_FRHome1/reports/conf, /u01/oracle/middleware/user_projects/domains/ClassicDomain/config/fmwconfig/servers/WLS_REPORTS/applications/reports_11.1.2/configuration or search cgicmd.dat file and past this line) open cgicmd.dat and past this

micr userid=micr/micr@micrdb%*

9. Optionally Password Fixed Create a file boot.properties in the path and add the following line (/u01/oracle/middleware/user_projects/domains/ClassicDomain/servers/AdminServer/security)

username=weblogic
password=weblogic#2

Oracle Weblogic Server And Forms & Reports Installation In Red Hat Linux Step By Step.

Note :- Oracle 11g R1 Web logic And Forms & Reports Installation Installation. This configuration steps for Red Hat Linux 5.5 and 6.2. You need to follow only one for your operating system.

1. Set IP and host name the following way.

Open terminal and write
[root@micr~#]vi /etc/sysconfig/network
Check following lines exists
NETWORKING=yes
NETWORKING_IPV6=NO
HOSTNAME=micr

 [root@micr~#]vi /etc/hosts
127.0.0.1            localhost.localdomain  localhost
10.11.201.200   micr.localdomain  micr

[root@micr~#]ping micr
(Hints replay 10.11.201.200   IP address. If replay 127.0.0.1 problem)

2.  Set minimum parameter settings in the following way.

Open terminal and add the following lines

[root@micr~#]vi /etc/sysctl.conf

kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 206173
kernel.msgmnb = 65535
kernel.msgmni = 2878
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=4194304
net.core.rmem_max=262144
net.core.wmem_max=262144

Now run the following line to check any item duplicate or not

[root@micr~#]/sbin/sysctl –p

If any item is duplicate then set comments previous item.

3. Now set limits the following way

Open terminal and execute the command and add the following limits.
[root@micr~#]vi /etc/security/limits.conf

oracle soft nofile 4096
oracle hard nofile 4096
* soft nproc 2047
* hard nproc 16384
* soft nofile 4096
* hard nofile 65536

4. Now install the following packages if they are not already present from your DVD.

For Red Hat 5.5
rpm -Uvh libaio-devel
rpm -Uvh sysstat
rpm -Uvh openmotif
rpm -Uvh openmotif22
rpm -Uvh binutils-2.16.91.0.5-23.4
rpm -Uvh gcc-4.1.0-28.4
rpm -Uvh gcc-c++-4.1.0-28.4
rpm -Uvh glibc-devel-2.4-31.2
rpm -Uvh libgcc-4.1.0-28.4
rpm -Uvh libstdc++-devel-4.1.0-28.4
rpm -Uvh libstdc++-4.1.0-28.4
rpm -Uvh make-3.80-202.2
rpm -Uvh compat-db 4.1.25-9
rpm -Uvh libXp-1.0.0-8.1.el5

For Red Hat 6.2

    rpm -Uvh binutils-2*x86_64*
    rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
    rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*
    rpm -Uvh compat-libstdc++-33*x86_64*
    rpm -Uvh glibc-common-2*x86_64*
    rpm -Uvh glibc-devel-2*x86_64*
    rpm -Uvh glibc-devel-2*i686*
    rpm -Uvh glibc-headers-2*x86_64*
    rpm -Uvh elfutils-libelf-0*x86_64*
    rpm -Uvh elfutils-libelf-devel-0*x86_64*
    rpm -Uvh gcc-4*x86_64*
    rpm -Uvh gcc-c++-4*x86_64*
    rpm -Uvh ksh-*x86_64*
    rpm -Uvh libaio-0*x86_64*
    rpm -Uvh libaio-devel-0*x86_64*
    rpm -Uvh libaio-0*i686*
    rpm -Uvh libaio-devel-0*i686*
    rpm -Uvh libgcc-4*x86_64*
    rpm -Uvh libgcc-4*i686*
    rpm -Uvh libstdc++-4*x86_64*
    rpm -Uvh libstdc++-4*i686*
    rpm -Uvh libstdc++-devel-4*x86_64*
    rpm -Uvh make-3.81*x86_64*
    rpm -Uvh numactl-devel-2*x86_64*
    rpm -Uvh sysstat-9*x86_64*
    rpm -Uvh compat-libstdc++-33*i686*
    rpm -Uvh compat-libcap*

5. Create the new groups and users.

Open terminal and execute the following
 [root@micr~#]groupadd dba -- Add new group dba
 [root@micr~#]useradd -g dba oracle -- Creating user with adding group.
 [root@micr~#]passwd oracle -- Set password for oracle user.

6. Disable secure Linux.

Open terminal and execute the following.
[root@micr~#]vi /etc/selinux/config

Making sure the SELINUX flag is set as follows.
SELINUX=disabled

7. Disable Firewall Configuration

Open terminal and execute the following you can see Security Level Configuration Tool and disable firewall.
[root@micr~#]system-config-securitylevel

8. Now reboot your system.

9. Create and grant permission the directories in which the Oracle software will be installed.

[root@micr~#] mkdir -p /u01/oracle/middleware -- Creating directory.
[root@micr~#] chown -Rh oracle:dba /u01/oracle/middleware -- Changing ownership
[root@micr~#] chmod -R 775 /u01 -- Changing File Mode.

10. Now login as oracle user and set bash profile in the following way.

Open terminal and execute the following.

[oracle@micr~#]vi .bash_profile

Now set the following parameter.

############# Oracle Fushion Middlewire Bash Profile For Red Hat 6.2 ###################

MW_HOME=/u01/oracle/middleware; export MW_HOME
WLS_HOME=$MW_HOME/wlserver_10.3; export WLS_HOME
JAVA_HOME=/usr/java/jdk1.7.0_10; export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH

############# Oracle Fushion Middlewire Bash Profile For Red Hat 5.5 ###################

MW_HOME=/u01/oracle/middleware; export MW_HOME
WLS_HOME=$MW_HOME/wlserver_10.3; export WLS_HOME
JAVA_HOME=/usr/java/jdk1.6.0_34; export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH

11. Installing JDK.

Go to jdk folder, open terminal and perform the following
[root@micr~#]./jdk-6u34-linux-x64-rpm.bin

After successfully installing jdk install web logic in the following way.

12. Installing Web Logic.

Log in as oracle user and go to wls1035_generic.jar folder, open terminal and perform the following

[oracle@micr linux64bit #]. /usr/java/jdk1.6.0_34/bin/java -Xmx1024m -jar wls1035_generic.jar

After successfully installing web logic install forms reports in the following way.

13. Installing Forms Reports.

Log in as oracle user and go to installer folder, open terminal and perform the following
Stop Web logic server

[oracle@micr Disk1]$ ./runInstaller

Create Table Using Object Type In Oracle Database.

Note :- In Oracle database we can create table using object type.

SQL> CREATE TYPE TY_EMPLOYEES
  2  AS OBJECT
  3  ( EMP_ID NUMBER,
  4    EMP_NAME VARCHAR2(300),
  5    STREET VARCHAR2(10),
  6    CITY   VARCHAR2(200),
  7    SALARY NUMBER(6),
  8    JOINING_DATE DATE
  9  )
 10  /

Type created.

SQL> CREATE TABLE EMPLOYEES OF TY_EMPLOYEES;

Table created.

SQL> INSERT INTO EMPLOYEES(EMP_ID, EMP_NAME, STREET, CITY, SALARY, JOINING_DATE)
  2  VALUES(100,'RAJIB','DHAKA','DHAKA',5000,SYSDATE);

1 row created.

SQL> SELECT * FROM EMPLOYEES;

    EMP_ID
----------
EMP_NAME
--------------------------------------------------------------------------------
STREET
----------
CITY
--------------------------------------------------------------------------------
    SALARY JOINING_D
---------- ---------
       100
RAJIB
DHAKA

    EMP_ID
----------
EMP_NAME
--------------------------------------------------------------------------------
STREET
----------
CITY
--------------------------------------------------------------------------------
    SALARY JOINING_D
---------- ---------
DHAKA
      5000 02-FEB-14


SQL>