Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
Oracle Weblogic 12c

  • Oracle
    • WebLogic Reset (227) Tue04,11:01am

      WebLogic襍キ蜍輔☆繧九◆縺ウ縺ォ繝ヲ繝シ繧カ蜷阪→繝代せ繝ッ繝シ繝峨r閨槭>縺ヲ縺阪※辣ゥ繧上@縺九▲縺溘ョ縺ァ蝗樣∩縺励◆繝。繝「縲 ツツツ security繝輔か繝ォ繝繧剃ス懈 ツツツ $ mkdir $DOMAIN_HOME/servers/AdminServer/security ツツツ boot.properties繧剃ス懈青ツツ boot.properties ツツツ username=weblogicツツツ password=password ツツツ 窶サ蟷ウ譁縺ァOK ツツツ nohup & 縺ァWeblogic繧定オキ蜍 ツツツ $ nohup sh $DOMAIN_HOME/startWebLogic.sh & ツツツ 窶サnohup.out縺ォ蜷舌°繧後k縺ョ縺後>繧縺縺」縺溘i驕ゥ蠖薙↓繝ェ繝繧、繝ャ繧ッ繝医&縺帙k ツツツ boot.properties縺梧囓蜿キ蛹悶&繧後※繧九%縺ィ繧堤「コ隱 ツツツ $ ca…

      Read More...

Oracle Weblogic 12c

Oracle Weblogic 12c (12.1.1) Generic Installer x64 on CentOS 6

This post will cover installing Oracle Weblogic 12c (12.1.1) Generic Installer x64 (wls1211_generic.jar) on 64 bit CentOS 6 for evaluation.

Before investing any time in this, despite a fresh download you will need,.... a patch: (p13606167_12110_Generic.zip).ツ

I am installing this remotely, if you are doing the same, you can see my post onツVNC on CentOS 6

If not, the proceedure is identical.

Step 1. Create the user who will own WLS

Create a user 'oracle' and group dba.

  1. [root@demoツ~]#ツgroupaddツdbaツツ
  2. [root@demoツ~]#ツuseraddツ-gツdbaツoracleツツ
  3. [root@demoツ~]#ツpasswdツoracleツツ
  4. Changingツpasswordツforツuserツoracle.ツツ
  5. Newツpassword:ツツ
  6. ツツ
  7. Retypeツnewツpassword:ツツ
  8. ツツ
  9. passwd:ツallツauthenticationツtokensツupdatedツsuccessfully.ツツ
  10. [root@demoツ~]#ツツ
Step 2. Download jdk-7u5-linux-x64.tar.gz and Install.

Oracle recommends JRockit for Production Mode and JDK 1.7 for Development Mode.

Start by making a home for JAVA.

Ill create mine under /usr/java

  1. [root@demoツ~]#ツmkdirツ/usr/javaツツ

Download jdk-7u5-linux-x64.tar.gz to the /usr/java directory

  1. [root@demoツjava]#ツlsツツ
  2. jdk-7u5-linux-x64.tar.gzツツ

Extract it:

  1. [root@demoツjava]#ツtarツ-zxfツjdk-7u5-linux-x64.tar.gzツツ

This will create a directory, jdk.17.0_05 under /usr/java:

  1. [root@demoツjava]#ツlsツツ
  2. jdk1.7.0_05ツツjdk-7u5-linux-x64.tar.gzツツ

This will be our JAVA_HOME: /usr/java/jdk1.7.0_05

(You can now remove jdk-7u5-linux-x64.tar.gz using rm -f jdk-7u5-linux-x64.tar.gz).

3. Put JAVA into the path of user oracle.

Add the following to bash profile for user oracle

  1. JAVA_HOME=/usr/java/jdk1.7.0_05ツツ
  2. exportツJAVA_HOMEツツ
  3. PATH=$JAVA_HOME/bin:$PATHツツ
  4. exportツPATHツツ

Make it available now:

  1. [root@demoツjdk1.7.0_05]#ツsourceツ~/.bash_profileツツ
4. Check Java is in oracle's path:

Switch to the user oracle and verify that Java is now in the path of oracle by issuing 'java -version'

  1. [root@demoツjdk1.7.0_05]#ツsuツ-ツoracleツツ
  2. [oracle@demoツ~]$ツjavaツ-versionツツ
  3. javaツversionツ"1.7.0_05"ツツ
  4. Java(TM)ツSEツRuntimeツEnvironmentツ(buildツ1.7.0_05-b06)ツツ
  5. JavaツHotSpot(TM)ツ64-BitツServerツVMツ(buildツ23.1-b03,ツmixedツmode)ツツ
  6. [oracle@demoツ~]$ツツ
5. Make a home for Weblogic
  1. [root@demoツ~]#ツmkdirツ/home/weblogicツツ

Make the user oracle the owner:

  1. [root@demoツ~]#ツchownツoracle:dbaツ/home/weblogicツツ
6. Download wls1211_generic.jar

Download wls1211_generic.jar from either of these locations:

http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html

http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.htm

7. Install wls1211_generic.jar

Here is the short version:

1. su - oracle

2. Go to the location where you donwnloaded wls1211_generic.jar (I've downloaded it to /home)

3. Issue:ツ

  1. javaツ-jarツ-Xmx1024mツ-XX:MaxPermSize=512Mツツwls1211_generic.jarツツ

Important: if you do not set PermSize as well as Xmx, your install will fail with Out of Memory errors.


I had a dozen screen shots for all of this but decided in to just make a mp4 and upload it to YouTube.

My apologies for the quality and (lack of) editing of the video; it's my first video using demo-builder.ツ

If you expand the video to full screen mode you will be able to see the terminal (sort of).ツ

Part I Install wls1211_generic.jar:

Part II Create a domain and Admin user credentials:

Patch

As you can see from Part II, once we started the domain, we ran into:

WARNING: Input Action on WSDL operation AbortedOperation and @Action on its associated Web Method abortedOperation did not match and will cause problems in dispatching the requests
Jul 22, 2012 6:10:39 AM com.sun.xml.ws.model.JavaMethodImpl freeze

This required us to install p13606167_12110_Generic.zip as shown in the video

In the video, I installed it on offline mode.

To see how to apply in online mode, see:ツhttp://weblogic-wonders.com/weblogic/2010/12/03/methods-to-apply-patches-in-weblogic-server/

Starting the Domain

As shown above, we start the domain by going to the domain's directory and issuing './startWebLogic.sh'

  1. [oracle@demoツ~]$ツcdツ/home/weblogic/user_projects/domains/davidツツ

Start it :

  1. [oracle@demoツdavid]$ツ./startWebLogic.shツツ

I hope this was helpul.....

http://docs.oracle.com/cd/E24329_01/doc.1211/e24492/prepare.htm#BABFIDAB

This post will cover basic installation and configuration of Oracle 11g Express Edition (XE) on CentOS.

We will also take a quick look at configuring Application Express (APEX) for 11g XE.

Basic installation is straight forward.

If you just want to get up and running, you can just do steps 1 to 4 below (and 10 and 11 for Apex). The remaining steps (5 to 9) cover basic backup, recovery, and performance configuration.

The full system requirements areツhere


Your CentOS box should have swap equal to 2xRAM.

On every CentOS installation I have done for XE, I just needed to update/install the packages for libaio, bc, and flex.

  1. [root@ms3ツ~]#ツツyumツinstallツlibaioツbcツflexツツ
Step 1: Download and Install Oracle 11g XE rpm


You can download the Oracle XE rpm, oracle-xe-11.2.0-1.0.x86_64.rpm.zip, from the OTNツhere

Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip:

  1. [root@ms3ツ~]#ツunzipツ-qツoracle-xe-11.2.0-1.0.x86_64.rpm.zipツツ

This will create the directory Disk1. Change to the Disk1 directory:

  1. [root@ms3ツ~]#ツcdツDisk1ツツ
  2. [root@ms3ツDisk1]#ツlsツツ
  3. oracle-xe-11.2.0-1.0.x86_64.rpmツツresponseツツupgradeツツ

Install the rpm using rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm

  1. [root@ms3ツDisk1]#ツrpmツ-ivhツoracle-xe-11.2.0-1.0.x86_64.rpmツツ
  2. Preparing...ツツツツツツツツツツツツツツツツ###########################################ツ[100%]ツツ
  3. ツツツ1:oracle-xeツツツツツツツツツツツツツツ###########################################ツ[100%]ツツ
  4. Executingツpost-installツsteps...ツツ
  5. Youツmustツrunツ'/etc/init.d/oracle-xeツconfigure'ツasツtheツrootツuserツtoツconfigureツtheツdatabase.ツツ
  6. ツツ
  7. [root@ms3ツDisk1]#ツツ
Step 2: Configure 11g XE Database and Options


When installation completes, run '/etc/init.d/oracle-xe configure' to configure and start the database.

Unless you wish to change the ports, except the defaults and set SYS/SYSTEM password.ツ

  1. [root@ms3ツDisk1]#ツ/etc/init.d/oracle-xeツconfigureツツ
  2. ツツ
  3. OracleツDatabaseツ11gツExpressツEditionツConfigurationツツ
  4. -------------------------------------------------ツツ
  5. Thisツwillツconfigureツon-bootツpropertiesツofツOracleツDatabaseツ11gツExpressツツ
  6. Edition.ツツTheツfollowingツquestionsツwillツdetermineツwhetherツtheツdatabaseツshouldツツ
  7. beツstartingツuponツsystemツboot,ツtheツportsツitツwillツuse,ツandツtheツpasswordsツthatツツ
  8. willツbeツusedツforツdatabaseツaccounts.ツツPressツ<enter>ツtoツacceptツtheツdefaults.ツツ
  9. Ctrl-Cツwillツabort.ツツ
  10. ツツ
  11. SpecifyツtheツHTTPツportツthatツwillツbeツusedツforツOracleツApplicationツExpressツ[8080]:ツツ
  12. ツツ
  13. Specifyツaツportツthatツwillツbeツusedツforツtheツdatabaseツlistenerツ[1521]:ツツ
  14. ツツ
  15. Specifyツaツpasswordツtoツbeツusedツforツdatabaseツaccounts.ツツNoteツthatツtheツsameツツ
  16. passwordツwillツbeツusedツforツSYSツandツSYSTEM.ツツOracleツrecommendsツtheツuseツofツツ
  17. differentツpasswordsツforツeachツdatabaseツaccount.ツツThisツcanツbeツdoneツafterツツ
  18. initialツconfiguration:ツツ
  19. Confirmツtheツpassword:ツツ
  20. ツツ
  21. DoツyouツwantツOracleツDatabaseツ11gツExpressツEditionツtoツbeツstartedツonツbootツ(y/n)ツ[y]:yツツ
  22. ツツ
  23. StartingツOracleツNetツListener...Doneツツ
  24. Configuringツdatabase...Doneツツ
  25. StartingツOracleツDatabaseツ11gツExpressツEditionツinstance...Doneツツ
  26. Installationツcompletedツsuccessfully.</enter>ツツ

The installation created the directory /u01 under which Oracle XE is installed.

Step 3: Set the Environment


To set the required Oracle environment variables, use the oracle_env.sh the script included under cd /u01/app/oracle/product/11.2.0/xe/bin

  1. [root@ms3ツDisk1]#ツcdツ/u01/app/oracle/product/11.2.0/xe/binツツ

To set the environment for your current session run '. ./oracle_env.sh':

  1. [root@ms3ツbin]#ツ.ツ./oracle_env.shツツ

To set the environment permanently for users, add the following to the .bashrc or .bash_profile of the users you want to access the environment:

  1. .ツ/u01/app/oracle/product/11.2.0/xe/bin/oracle_env.shツツ

You should now be able to access SQL*Plus

  1. [root@ms3ツbin]#ツsqlplusツ/nologツツ
  2. ツツ
  3. SQL*Plus:ツReleaseツ11.2.0.2.0ツProductionツonツWedツSepツ21ツ08:17:26ツ2011ツツ
  4. ツツ
  5. Copyrightツ(c)ツ1982,ツ2011,ツOracle.ツツAllツrightsツreserved.ツツ
  6. ツツ
  7. SQL>ツconnectツsys/Passwordツasツsysdbaツツ
  8. Connected.ツツ
  9. SQL>ツツ

Step 4: Allow Remote Access to Oracle 11g XE GUI


To allow remote access to Oracle 11g XE GUI (as well as Application Express GUI) issue the following from SQL*Plus

  1. SQL>ツEXECツDBMS_XDB.SETLISTENERLOCALACCESS(FALSE);ツツ
  2. ツツ
  3. PL/SQLツprocedureツsuccessfullyツcompleted.ツツ

You should now be able to access the Oracle 11g XE Home Page GUI at:

http://localhost:8080/apex/f?p=4950:1

Replace localhost above with your IP or domain as required.

Log in as SYSTEM using the password you selected in Step 2 above.

Step 5: Move the Flash Recovery Area (Fast Recovery Area)


To protect against disk failure, you should move the Flash Recovery Area to a separate disk.

This is actually now called the Fast Recovery Area, but the existing documentation still refers to it as the Flash Recovery Area

If a separate disk is not in your budget you should, at the very least, move the Flash Recovery Area to a partition other than the Oracle installation directory.

By default, the Fast Recovery Area will be located under /u01/app/oracle/fast_recovery_area

  1. SQL>ツshowツparameterツDB_RECOVERY_FILE_DEST;ツツ
  2. ツツ
  3. NAMEツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツTYPEツツツツツツツツVALUEツツ
  4. ------------------------------------ツ-----------ツ------------------------------ツツ
  5. db_recovery_file_destツツツツツツツツツツツツツツツツstringツツツツツツ/u01/app/oracle/fast_recovery_areaツツ
  6. db_recovery_file_dest_sizeツツツツツツツツツツツbigツintegerツ10Gツツ
  7. SQL>ツツ
So, to move it elsewhere, first create the new directory
  1. [root@ms3ツ~]#ツmkdirツ/opt/fraツツ

Change the owner to oracle and the group to dbaツ

  1. [root@ms3ツ~]#ツchownツoracle:dbaツ/opt/fraツツ

Now, change the DB_RECOVERY_FILE_DEST to the location you selected above.

  1. SQL>ツALTERツSYSTEMツSETツDB_RECOVERY_FILE_DESTツ=ツ'/opt/fra';ツツ
  2. ツツ
  3. Systemツaltered.ツツ
  4. ツツ
  5. SQL>ツツ
To move the files use the movelog.sql script:
  1. SQL>ツ@?/sqlplus/admin/movelogsツツ
  2. SQL>ツSETツFEEDBACKツ1ツツ
  3. SQL>ツSETツNUMWIDTHツ10ツツ
  4. SQL>ツSETツLINESIZEツ80ツツ
  5. SQL>ツSETツTRIMSPOOLツONツツ
  6. SQL>ツSETツTABツOFFツツ
  7. SQL>ツSETツPAGESIZEツ100ツツ
  8. SQL>ツdeclareツツ
  9. ツツ2ツツツツツcursorツrlcツisツツ
  10. ツツ3ツツツツツツツツselectツgroup#ツgrp,ツthread#ツthr,ツbytes/1024ツbytes_kツツ
  11. ツツ4ツツツツツツツツツツfromツv$logツツ
  12. ツツ5ツツツツツツツツorderツbyツ1;ツツ
  13. ツツ6ツツツツツstmtツツツツツvarchar2(2048);ツツ
  14. ツツ7ツツツツツswtstmtツツvarchar2(1024)ツ:=ツ'alterツsystemツswitchツlogfile';ツツ
  15. ツツ8ツツツツツckpstmtツツvarchar2(1024)ツ:=ツ'alterツsystemツcheckpointツglobal';ツツ
  16. ツツ9ツツbeginツツ
  17. ツ10ツツツツツforツrlcRecツinツrlcツloopツツ
  18. ツ11ツツツツstmtツ:=ツ'alterツdatabaseツaddツlogfileツthreadツ'ツ||ツツ
  19. ツ12ツツツツツツツツツツツツツツツツツrlcRec.thrツ||ツ'ツsizeツ'ツ||ツツ
  20. ツ13ツツツツツツツツツツツツツツツツツrlcRec.bytes_kツ||ツ'K';ツツ
  21. ツ14ツツツツツツツツexecuteツimmediateツstmt;ツツ
  22. ツ15ツツツツツツツツbeginツツ
  23. ツ16ツツツツツツツツツツツstmtツ:=ツ'alterツdatabaseツdropツlogfileツgroupツ'ツ||ツrlcRec.grp;ツツ
  24. ツ17ツツツツツツツツツツツexecuteツimmediateツstmt;ツツ
  25. ツ18ツツツツツツツツexceptionツツ
  26. ツ19ツツツツツツツツツツツwhenツothersツthenツツ
  27. ツ20ツツツツツツツツツツツツツツexecuteツimmediateツswtstmt;ツツ
  28. ツ21ツツツツツツツツツツツツツツexecuteツimmediateツckpstmt;ツツ
  29. ツ22ツツツツツツツツツツツツツツexecuteツimmediateツstmt;ツツ
  30. ツ23ツツツツツツツツend;ツツ
  31. ツ24ツツツツツツツツexecuteツimmediateツswtstmt;ツツ
  32. ツ25ツツツツツendツloop;ツツ
  33. ツ26ツツend;ツツ
  34. ツ27ツツ/ツツ
  35. ツツ
  36. PL/SQLツprocedureツsuccessfullyツcompleted.ツツ
  37. ツツ
  38. SQL>ツツ
  39. SQL>ツツ

Now, set an appropriate size for the Fast Recovery Area. Use df -h to insure that there is ample space.

  1. SQL>ツALTERツSYSTEMツSETツDB_RECOVERY_FILE_DEST_SIZEツ=ツ20G;ツツ
  2. ツツ
  3. Systemツaltered.ツツ

Verify the new location and size.ツ

  1. SQL>ツshowツparameterツDB_RECOVERY_FILE_DEST;ツツ
  2. ツツ
  3. NAMEツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツTYPEツツツツツツツツVALUEツツ
  4. ------------------------------------ツ-----------ツ------------------------------ツツ
  5. db_recovery_file_destツツツツツツツツツツツツツツツツstringツツツツツツ/opt/fraツツ
  6. db_recovery_file_dest_sizeツツツツツツツツツツツbigツintegerツ20Gツツ
  7. SQL>ツツ
Step 6: Add Redo Log Members to Groups


You should have at least two Redo Log Groups and each group should have at least two members.

Additionally, the members should be spread across disks (or at least directories)

For whatever reason, only one member is created per group on install.

You can view the redo log files using SQL> SELECT * FROM V$LOGFILE;

Since the default location for the two members is the Flash Recovery Area, the two existing members have been moved to our new FRA.

You should now add an additional member for each group under /u01/app/oracle/oradata/XE

  1. SQL>ツALTERツDATABASEツADDツLOGFILEツMEMBERツ'/u01/app/oracle/oradata/XE/log1b.LOG'ツTOツGROUPツ1;ツツ
  2. ツツ
  3. Databaseツaltered.ツツ
  4. ツツ
  5. SQL>ツALTERツDATABASEツADDツLOGFILEツMEMBERツ'/u01/app/oracle/oradata/XE/log2b.LOG'ツTOツGROUPツ2;ツツ
  6. ツツ
  7. Databaseツaltered.ツツ
  8. ツツ
  9. SQL>ツツ

Step 7: Set Sessions and Processes Parameters


The default values for parameters and sessions is quite low on the default installation.

  1. SQL>ツshowツparametersツsessions;ツツ
  2. ツツ
  3. NAMEツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツTYPEツツツツツツツツVALUEツツ
  4. ------------------------------------ツ-----------ツ------------------------------ツツ
  5. java_max_sessionspace_sizeツツツツツツツツツツツintegerツツツツツ0ツツ
  6. java_soft_sessionspace_limitツツツツツツツツツintegerツツツツツ0ツツ
  7. license_max_sessionsツツツツツツツツツツツツツツツツツintegerツツツツツ0ツツ
  8. license_sessions_warningツツツツツツツツツツツツツintegerツツツツツ0ツツ
  9. sessionsツツツツツツツツツツツツツツツツツツツツツツツツツツツツツintegerツツツツツ172ツツ
  10. shared_server_sessionsツツツツツツツツツツツツツツツintegerツツ
  11. ツツ
  12. SQL>ツshowツparametersツprocesses;ツツ
  13. ツツ
  14. NAMEツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツTYPEツツツツツツツツVALUEツツ
  15. ------------------------------------ツ-----------ツ------------------------------ツツ
  16. aq_tm_processesツツツツツツツツツツツツツツツツツツツツツツintegerツツツツツ0ツツ
  17. db_writer_processesツツツツツツツツツツツツツツツツツツintegerツツツツツ1ツツ
  18. gcs_server_processesツツツツツツツツツツツツツツツツツintegerツツツツツ0ツツ
  19. global_txn_processesツツツツツツツツツツツツツツツツツintegerツツツツツ1ツツ
  20. job_queue_processesツツツツツツツツツツツツツツツツツツintegerツツツツツ4ツツ
  21. log_archive_max_processesツツツツツツツツツツツツintegerツツツツツ4ツツ
  22. processesツツツツツツツツツツツツツツツツツツツツツツツツツツツツintegerツツツツツ100ツツ

You can increase these parameters.

After each change, you will need to restart the database.

Increase sessions and then bounce database.

  1. SQL>ツalterツsystemツsetツsessions=250ツscope=spfile;ツツ
  2. ツツ
  3. Systemツaltered.ツツ
  4. ツツ
  5. SQL>ツshutdownツimmediateツツ
  6. Databaseツclosed.ツツ
  7. Databaseツdismounted.ツツ
  8. ORACLEツinstanceツshutツdown.ツツ
  9. SQL>ツstartupツツ
  10. ORACLEツinstanceツstarted.ツツ
  11. ツツ
  12. TotalツSystemツGlobalツAreaツ1068937216ツbytesツツ
  13. FixedツSizeツツツツツツツツツツツツツツツツツツ2233344ツbytesツツ
  14. VariableツSizeツツツツツツツツツツツツツ780143616ツbytesツツ
  15. DatabaseツBuffersツツツツツツツツツツ281018368ツbytesツツ
  16. RedoツBuffersツツツツツツツツツツツツツツツツ5541888ツbytesツツ
  17. Databaseツmounted.ツツ
  18. Databaseツopened.ツツ

Verify change to sessions parameter:

  1. SQL>ツshowツparametersツsessions;ツツ
  2. ツツ
  3. NAMEツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツTYPEツツツツツツツツVALUEツツ
  4. ------------------------------------ツ-----------ツ------------------------------ツツ
  5. java_max_sessionspace_sizeツツツツツツツツツツツintegerツツツツツ0ツツ
  6. java_soft_sessionspace_limitツツツツツツツツツintegerツツツツツ0ツツ
  7. license_max_sessionsツツツツツツツツツツツツツツツツツintegerツツツツツ0ツツ
  8. license_sessions_warningツツツツツツツツツツツツツintegerツツツツツ0ツツ
  9. sessionsツツツツツツツツツツツツツツツツツツツツツツツツツツツツツintegerツツツツツ252ツツ
  10. shared_server_sessionsツツツツツツツツツツツツツツツintegerツツ

Increase processes and restart database

  1. SQL>ツalterツsystemツsetツprocesses=200ツscope=spfile;ツツ
  2. ツツ
  3. Systemツaltered.ツツ
  4. ツツ
  5. SQL>ツツ
  6. ツツ
  7. ツツ
  8. Databaseツdismounted.ツツ
  9. ORACLEツinstanceツshutツdown.ツツ
  10. SQL>ツstartupツツ
  11. ORACLEツinstanceツstarted.ツツ
  12. ツツ
  13. TotalツSystemツGlobalツAreaツ1068937216ツbytesツツ
  14. FixedツSizeツツツツツツツツツツツツツツツツツツ2233344ツbytesツツ
  15. VariableツSizeツツツツツツツツツツツツツ763366400ツbytesツツ
  16. DatabaseツBuffersツツツツツツツツツツ297795584ツbytesツツ
  17. RedoツBuffersツツツツツツツツツツツツツツツツ5541888ツbytesツツ
  18. Databaseツmounted.ツツ
  19. Databaseツopened.ツツ

Verify change to processes parameter:

  1. SQL>ツツshowツparametersツprocesses;ツツ
  2. ツツ
  3. NAMEツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツツTYPEツツツツツツツツVALUEツツ
  4. ------------------------------------ツ-----------ツ------------------------------ツツ
  5. aq_tm_processesツツツツツツツツツツツツツツツツツツツツツツintegerツツツツツ0ツツ
  6. db_writer_processesツツツツツツツツツツツツツツツツツツintegerツツツツツ1ツツ
  7. gcs_server_processesツツツツツツツツツツツツツツツツツintegerツツツツツ0ツツ
  8. global_txn_processesツツツツツツツツツツツツツツツツツintegerツツツツツ1ツツ
  9. job_queue_processesツツツツツツツツツツツツツツツツツツintegerツツツツツ4ツツ
  10. log_archive_max_processesツツツツツツツツツツツツintegerツツツツツ4ツツ
  11. processesツツツツツツツツツツツツツツツツツツツツツツツツツツツツintegerツツツツツ200ツツ
  12. SQL>ツツ

Step 8: Enable Archivelog Mode


To enable online or "hot" backups, Archivelog Mode must be enabled.

Additionally, if you do not enable Archivelog Mode and take only offline or "cold" backups, should you need to restore the database you will only be able to restore to the last backup

To enable Archivelog Mode, shutdown the database and then startup mount:

  1. SQL>ツshutdownツimmediateツツ
  2. Databaseツclosed.ツツ
  3. Databaseツdismounted.ツツ
  4. ORACLEツinstanceツshutツdown.ツツ
  5. SQL>ツstartupツmountツツ
  6. ORACLEツinstanceツstarted.ツツ
  7. ツツ
  8. TotalツSystemツGlobalツAreaツ1068937216ツbytesツツ
  9. FixedツSizeツツツツツツツツツツツツツツツツツツ2233344ツbytesツツ
  10. VariableツSizeツツツツツツツツツツツツツ763366400ツbytesツツ
  11. DatabaseツBuffersツツツツツツツツツツ297795584ツbytesツツ
  12. RedoツBuffersツツツツツツツツツツツツツツツツ5541888ツbytesツツ
  13. Databaseツmounted.ツツ

Enable Archivelog Mode

  1. SQL>ツalterツdatabaseツarchivelog;ツツ
  2. ツツ
  3. Databaseツaltered.ツツ

Open the database and verify that Archivelog Mode is enabled

  1. SQL>ツalterツdatabaseツopen;ツツ
  2. ツツ
  3. Databaseツaltered.ツツ
  4. ツツ
  5. SQL>ツツ
  6. ツツ
  7. SQL>ツSELECTツLOG_MODEツFROMツSYS.V$DATABASE;ツツ
  8. ツツ
  9. LOG_MODEツツ
  10. ------------ツツ
  11. ARCHIVELOGツツ
  12. ツツ
  13. SQL>ツツ

Step 9: Create Online Backup Script


To create automated backups, you can modify the backup.sh included under /u01/app/oracle/product/11.2.0/xe/config/scripts

Create a directory for your backup script

  1. [root@ms3ツ~]#ツmkdirツ/opt/ora_backupツツ

Change the owner to oracle and the group to dbaツ

  1. [root@ms3ツ~]#ツchownツoracle:dbaツ/opt/ora_backupツツ

Copy the backup.sh script from /u01/app/oracle/product/11.2.0/xe/config/scripts to the directory you created above.

  1. [root@ms3ツ~]#ツcpツツ/u01/app/oracle/product/11.2.0/xe/config/scripts/backup.shツ/opt/ora_backup/backup.shツツ

Open the backup.sh script in a text editor or vi. The last section will look like this:

  1. elseツツ
  2. ツツツechoツBackupツofツtheツdatabaseツsucceeded.ツツ
  3. ツツツechoツLogツfileツisツatツ$rman_backup_current.ツツ
  4. fiツツ
  5. #Waitツforツuserツtoツpressツanyツkeyツツ
  6. echoツ-nツ"PressツENTERツkeyツtoツexit"ツツ
  7. readツuserinpツツツ

Change it to:ツ

  1. elseツツ
  2. ツツツechoツBackupツofツtheツdatabaseツsucceeded.ツツ
  3. ツツツechoツLogツfileツisツatツ$rman_backup_current.ツツ
  4. ツツツmailツ-sツ'OracleツBackupツCompleted'' This email address is being protected from spambots. You need JavaScript enabled to view it. 'ツ<ツ/u01/app/oracle/oxe_backup_current.logツツ
  5. fiツツ
  6. #Waitツforツuserツtoツpressツanyツkeyツツ
  7. #echoツ-nツ"PressツENTERツkeyツtoツexit"ツツ
  8. #readツuserinpツツツ

The line we added above, mail -s 'Oracle Backup Completed' ' This email address is being protected from spambots. You need JavaScript enabled to view it. ' < /u01/app/oracle/oxe_backup_current.log, will send us an email notification that the backup has completed as well as cat the backup log to the body of the email.

Note that we have also commented out the last two lines of the script (the prompt).ツ

Create a cron job to run the script as user oracle.

You should run it at least once a day. With Archivelog Mode enabled, it is important that backups be taken regularly to prevent the Flash Recovery Area from filling.ツ

Step 10: Oracle 11g XE and Application Express (APEX)


Oracle 11g Express Edition comes with Application Express 4.0.2 already installed.ツ

If you elect to upgrade to the latest version (4.1 as of this writing), you can do so but will loose access to the XE GUI. Not a huge loss, but something to keep in mind.

Although Apex is already installed, you will need to set the Internal Admin password.

To do so, run the apxchpwd.sql located under /u01/app/oracle/product/11.2.0/xe/apex:

Note: pick something simple like Password123! as you will be prompted to change it on first log in anyways.

  1. SQL>ツ@/u01/app/oracle/product/11.2.0/xe/apex/apxchpwd.sqlツツ
  2. EnterツaツvalueツbelowツforツtheツpasswordツforツtheツApplicationツExpressツADMINツuser.ツツ
  3. ツツ
  4. ツツ
  5. EnterツaツpasswordツforツtheツADMINツuserツツツツツツツツツツツツツツ[]ツツ
  6. ツツ
  7. Sessionツaltered.ツツ
  8. ツツ
  9. ...changingツpasswordツforツADMINツツ
  10. ツツ
  11. PL/SQLツprocedureツsuccessfullyツcompleted.ツツ
  12. ツツ
  13. ツツ
  14. Commitツcomplete.ツツ
  15. ツツ
  16. SQL>ツツ

You can access the Application Express GUI at:

http://localhost:8080/apex/f?p=4550:1

Replace localhost above with your IP or domain as required.

Workspace: Internal
User Name: admin
Password: (whatever you selected above).

Alternatively, you can access viaツ

http://localhost:8080/apex/f?p=4550:10 or http://localhost:8080/apex/apex_admin

Again, replace localhost above with your IP or domain as required.

Step 11: Oracle 11g XE: Configure EPG or Apex Listener


Unless you have a license for Oracle HTTP Server (OHS), your options are the embedded PLSQL Gateway (EPG) or Apex Listener.ツ

The Application Express that comes installed with Oracle 11g XE is configured using the EPG.

While the EPG is simpler than Apex Listener, it can be painfully slow as of Apex 3.2.ツ

Apex Listener, while quite fast, adds an extra layer of complexity.ツ

You will need to install an application server to run Apex Listener.

I have run Apex Listener on both Tomcat (unsupported) as well as Oracle GlassFish 3.x (supported) and was not impressed with either.

A lot of people who know far more than I do about APEX (read: 99.9999% of the population) like the Apex Listener.

Apex Listener and it's installation guide can be foundツhere.

The Apex Listener installation guide is well done and simple to follow.

If you need to install Oracle GlassFish or GlassFish CE (basic installation is the same), you can use my GlassFish 3.1 instructionshere.

If you want to be an outlaw and use Tomcat, you can use my Tomcat 6 installation guideツhere.ツor my Tomcat 7 installation guideツhere..

Bash Script for Oracle Data Pump

Red Hat Linux 5.4 or CentOS 5.4 Oracle 11g or 10g SID = orcl This post covers creating a basic bash script to produce a Data Pump export file (.dmp)

file which we can then FTP to a remote server or mail the file using MUTT. We'll also generate a log file of the export and write the output of the log file

into the body of an email notification. In the first scenario, we want to email the export file as an attachment, so we''ll need to do the following:

  1. Export the Scott schema on a daily basis using Data Pump.
  2. Create a log file of the Data Pump export
  3. Add the date and hour of the export to to the file name and log file in the forms of : scott-yyyymmddhh.dmp. and scottLOG-yyyymmddhh.log
  4. Use zip or gzip to compress the dump file for easier FTP and/or mailing
  5. Write the contents of the log file into the body of an email.
  6. FTP the file or attach the file to the email and send it.
To begin, you will need to create an Oracle directory to export the file to and then grant read and write on the directory for the schema.
  1. SQL>ツCREATEツORツREPLACEツDIRECTORYツbackdirツASツ/home/app/oracle/admin/orcl/dpdumpツツ
  2. ツツ
  3. SQL>ツGRANTツREAD,ツWRITEツONツDIRECTORYツbackdirツTOツscott;ツツ
If not already installed, installツMUTT:
  1. [root@server1]#ツyumツinstallツmuttツツ
Create your bash script. In the first example, we'll zip the export, attach it to an email and place the export log into the body of the
email. I'm creating mine in /usr/lib/myscripts and the file name will be scottscript.sh
  1. [root@server1]#ツcdツ/usr/lib/myscriptsツツ
  2. [root@server1]#ツviツscottscript.shツツツ
  1. #!/bin/shツツ
  2. ORACLE_HOME=/home/app/oracle/product/11.2.0/dbhome_1ツツ
  3. exportツORACLE_HOMEツツ
  4. exportツPATH=$ORACLE_HOME/bin:$PATHツツ
  5. ORACLE_SID=orcl;ツexportツORACLE_SIDツツ
  6. expdpツscott/tigerツDIRECTORY=backdirツDUMPFILE=scott-$(dateツ+%Y%m%d%H)ツVERSION=10.2ツLOGFILE=scottLOG-$(dateツ+%Y%m%d%H).logツツ
  7. zipツ-rツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).zipツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).dmpツツ
  8. catツ/home/app/oracle/admin/orcl/dpdump/scottLOG-$(dateツ+%Y%m%d%H).logツ|ツmuttツ-sツ"scottツBackup"ツ-aツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).zipツ This email address is being protected from spambots. You need JavaScript enabled to view it. ツツ
What is in the script:
In the first part of the script, we set the required environment.
  1. ORACLE_HOME=/home/app/oracle/product/11.2.0/dbhome_1ツツ
  2. exportツORACLE_HOMEツツ
  3. exportツPATH=$ORACLE_HOME/bin:$PATHツツ
  4. ORACLE_SID=orcl;ツexportツORACLE_SIDツツ
In the next bit, we do our export. In this case, I want to import my file into a local XE instance on my laptop so I'm going to specify
VERSION=10.2. Additionally, because I will be doing this daily, I am appending the date in the form of YYYYMMDDHH to the file name:
  1. expdpツscott/tigerツDIRECTORY=backdirツDUMPFILE=scott-$(dateツ+%Y%m%d%H)ツVERSION=10.2ツツ
Create a log file of our export to see if there were any issues:
  1. LOGFILE=scottLOG-$(dateツ+%Y%m%d%H).logツツ
Compress the .dmp file to make it easier to mail:
  1. zipツ-rツscott-$(dateツ+%Y%m%d%H).zipツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).dmpツツツ
Finally, we use MUTT to attach our export file to our email as well as write the log file contents to the body of the email:
  1. catツ/home/app/oracle/admin/orcl/dpdump/scottLOG-$(dateツ+%Y%m%d%H).logツ|ツツmuttツ-sツ"ScottツBackup"ツ-aツツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).zipツ This email address is being protected from spambots. You need JavaScript enabled to view it. ツツツツ
In the last bit above:
  • cat /home/app/oracle/admin/orcl/dpdump/scottLOG-$(date +%Y%m%d%H).log writes the contents of the log file into the body of the email.ツ
  • "Scott Backup" is the email subject line.
  • -a /home/app/oracle/admin/orcl/dpdump/scott-$(date +%Y%m%d%H).zip attaches our file to the email.
  • This email address is being protected from spambots. You need JavaScript enabled to view it. is the recipient address.
From here, you can set a cron job to automate running the script at whatever interval you require.ツ
Now, instead of emailing the zip file, let's FTP the file to a remote server.ツIn this case, we want to FTP the file, so we'll need to do the following:
  1. Export the Scott schema on a daily basis using Data Pump.
  2. Create a log file of the Data Pump export
  3. Add the date and hour of the export to to the file name and log file in the forms of : scott-yyyymmddhh.dmp. and scottLOG-yyyymmddhh.log
  4. Use zip or gzip to compress the dump file for easier FTP
  5. Write the contents of the log file into the body of an email notification.
  6. FTP the file.
  1. #!/bin/shツツ
  2. ORACLE_HOME=/home/app/oracle/product/11.2.0/dbhome_1ツツ
  3. exportツORACLE_HOMEツツ
  4. exportツPATH=$ORACLE_HOME/bin:$PATHツツ
  5. ORACLE_SID=orcl;ツexportツORACLE_SIDツツ
  6. HOST='192.168.0.2'ツツ
  7. USER='ftpuser'ツツ
  8. PASSWD='password'ツツ
  9. expdpツscott/tigerツDIRECTORY=backdirツDUMPFILE=scott-$(dateツ+%Y%m%d%H)ツVERSION=10.2ツLOGFILE=scottLOG-$(dateツ+%Y%m%d%H).logツツ
  10. zipツ-rツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).zipツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).dmpツツ
  11. catツ/home/app/oracle/admin/orcl/dpdump/scottLOG-$(dateツ+%Y%m%d%H).logツ|ツmuttツ-sツ"scottツBackup"This email address is being protected from spambots. You need JavaScript enabled to view it. ツツ
  12. cdツ/home/app/oracle/admin/orcl/dpdumpツツ
  13. ftpツ-nツ-vツ$HOSTツ<<ツEOTツツ
  14. binaryツツ
  15. userツ$USERツ$PASSWDツツ
  16. promptツツ
  17. putツscott-$(dateツ+%Y%m%d%H).zipツツ
  18. byeツツ
  19. EOTツツ
What is in the script:
In the first part of the script, we set the required environment.
  1. ORACLE_HOME=/home/app/oracle/product/11.2.0/dbhome_1ツツ
  2. exportツORACLE_HOMEツツ
  3. exportツPATH=$ORACLE_HOME/bin:$PATHツツ
  4. ORACLE_SID=orcl;ツexportツORACLE_SIDツツツ
Next, we set our FTP information:
  1. HOST='192.168.0.2'ツツ
  2. USER='ftpuser'ツツ
  3. PASSWD='password'ツツ
In the next bit, we do our export. Again, I want to import my file into a local XE instance on my laptop so I'm going to specify
VERSION=10.2. Additionally, because I will be doing this daily, I am appending the date in the form of YYYYMMDDHH to the file name:
  1. expdpツscott/tigerツDIRECTORY=backdirツDUMPFILE=scott-$(dateツ+%Y%m%d%H)ツVERSION=10.2ツツ
Create a log file of our export to see if there were any issues:
  1. LOGFILE=scottLOG-$(dateツ+%Y%m%d%H).logツツ
Compress the .dmp file to make it easier to FTP:
  1. zipツ-rツscott-$(dateツ+%Y%m%d%H).zipツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).dmpツツツ
Now, we use MUTT to write the log file contents to the body of an email notification:
  1. catツ/home/app/oracle/admin/orcl/dpdump/scottLOG-$(dateツ+%Y%m%d%H).logツ|ツmuttツ-sツ"ScottツBackup"ツツ This email address is being protected from spambots. You need JavaScript enabled to view it. ツツツツ
In the bit above:
  • cat /home/app/oracle/admin/orcl/dpdump/scottLOG-$(date +%Y%m%d%H).log writes the contents of the log file into the body of the email.
  • "Scott Backup" is the email subject line.
  • This email address is being protected from spambots. You need JavaScript enabled to view it. is the recipient address.ツ
Finally, we go our backup directory and FTP the file in binary mode.
  1. cdツ/home/app/oracle/admin/orcl/dpdumpツツ
  2. ftpツ-nツ-vツ$HOSTツ<<ツEOTツツ
  3. binaryツツ
  4. userツ$USERツ$PASSWDツツ
  5. promptツツ
  6. putツscott-$(dateツ+%Y%m%d%H).zipツツ
  7. byeツツ
  8. EOTツツ
Again, you now create a cron job to automate running the script at whatever interval you require.ツ
What if I want to use tar/gzip instead of zip?ツSimply make the substitutions as below:
  1. #!/bin/shツツ
  2. ORACLE_HOME=/home/app/oracle/product/11.2.0/dbhome_1ツツ
  3. exportツORACLE_HOMEツツ
  4. exportツPATH=$ORACLE_HOME/bin:$PATHツツ
  5. ORACLE_SID=orcl;ツexportツORACLE_SIDツツ
  6. HOST='192.168.0.2'ツツ
  7. USER='ftpuser'ツツ
  8. PASSWD='password'ツツ
  9. expdpツscott/tigerツDIRECTORY=backdirツDUMPFILE=scott-$(dateツ+%Y%m%d%H)ツVERSION=10.2ツLOGFILE=scottLOG-$(dateツ+%Y%m%d%H).logツツツ
  10. tarツ-cvzfツ/home/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).tar.gzツhome/app/oracle/admin/orcl/dpdump/scott-$(dateツ+%Y%m%d%H).dmpツツ
  11. catツ/home/app/oracle/admin/orcl/dpdump/scottLOG-$(dateツ+%Y%m%d%H).logツ|ツmuttツ-sツ"scottツBackup"This email address is being protected from spambots. You need JavaScript enabled to view it. ツツ
  12. cdツ/home/app/oracle/admin/orcl/dpdumpツツ
  13. ftpツ-nツ-vツ$HOSTツ<<ツEOTツツ
  14. binaryツツ
  15. userツ$USERツ$PASSWDツツ
  16. promptツツ
  17. putツscott-$(dateツ+%Y%m%d%H).tar.gzツツ
  18. byeツツ
  19. EOTツツ
You can also execute it on-demand as well via command line: [root@server1]# cd /usr/lib/myscripts [root@server1]# . /scottscript.sh

Comments   

 
0 #1 Guest 2018-03-17 08:39
I will immediately take hold oof your rss aas I can't find your
email subscription link or e-newsletter service.
Do you've any? Please allow me realize in order that I could
subscribe. Thanks.

Here is my web site - binary share trading - www.youtube.com,
Quote
 

Category Database

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email