ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÔÚLinux»úÆ÷ÉÏ°²×°ÔËÐÐOracle

·¢²¼Ê±¼ä:2006-08-02 08:46:11À´Ô´:ºìÁª×÷Õß:ÑϺ®
¡¡¡¡ÕªÒª£ºOracleÓÚÈ¥ÄêÄêµ×Ðû²¼ÒÆÖ²Oracle 8ºÍOracle Application Serverµ½Linux¡£ ÕâÊÇÒ»¸öÃ÷È·ÎÞÎóµÄ±êÖ¾£ºÕû¸öÊÀ½ç¶¼Ó¦¸ÃÈÏʶµ½£¬LinuxÒѾ­ÊÇÒ»¸öÑÏËàµÄ²Ù×÷ϵͳ£¬×ãÒԳе£ÆóÒµ¼¶µÄÓ¦ÓᣠUche OgbujiÔÚÏÂÎÄÖнâÊÍÁËÓ¦¸ÃÈçºÎ°²×°¡¢ÅäÖúͳõ²½Ê¹ÓÃOracle 8 for Linux¡£

ÈçºÎÔÚÄãµÄLinux»úÆ÷ÉÏ°²×°ÔËÐÐOracle

һƪʵÓÃÖ¸µ¼

¡¡¡¡¾­¹ýÁËÐí¶àÒ¥´«ºÍ°µÊ¾Ö®ºó£¬OracleÓÚ1998Äê10ÔÂ7ÈÕ·¢²¼ÁËLinuxÉϵÄOracle 8Êý¾Ý¿âºÍOracle Application Server¡£ÕâÊÇLinux½üÆÚÀúÊ·ÖÐ×îΪҫÑÛµÄһĻ¡£

¡¡¡¡ÎÞÂÛÄú¸öÈ˶ÔOracle¹«Ë¾µÄ¿´·¨ÈçºÎ£¬¸Ã¹«Ë¾ÔÚ´ó¹æÄ£Êý¾ÝÓ¦ÓÃÁìÓòµÄ¾Þ´óÉùÓþʹÕâ´Î²úÆ··¢²¼³ÉΪһ¸öÃ÷È· ÎÞÎóµÄ±êÖ¾£ºÕû¸öÊÀ½ç¶¼Ó¦¸ÃÈÏʶµ½£¬LinuxÒѾ­ÊÇÒ»¸öÑÏËàµÄ²Ù×÷ϵͳ£¬×ãÒԳе£ÆóÒµ¼¶µÄÓ¦Óá£

¡¡¡¡µ«¶ÔÓÚÈκÎÕæÕý¹ØÐÄLinuxµÄÈËÀ´Ëµ£¬¸÷ÖÖÐû´«¹¥ÊÆÖ»ÊǹýÑÛÑÌÔÆ£¬Ö»ÓдúÂë²ÅÊǹؼüµÄ¡££¨only code matters. Òë×¢£ºÊÂʵÉÏ£¬Oracle 8i, ¼´8.1.5 for LinuxÒѾ­¿ª·¢Íê³É£¬µ«ÆäÖеÄJServerÄ£¿éÓÐÎÊÌ⣬ËùÒÔOracle»¹Ã»Óз¢²¼¡££©

¿ªÊ¼Ðж¯

¡¡¡¡ÔÚRedHatÉÏ°²×°Oracle¿ÉÒÔÊÇÏ൱Çá¶øÒ׾ٵģ¬µ«ÒªÊÇÍêÈ«¸ú×ÅOracle¹«Ë¾µÄÎĵµ×ß¾Íδ±ØÄÇôÈÝÒ×ÁË ¡£×î¿ìµÄ½Ý¾¶ÊÇTom BissetµÄÖ÷Ò³£º
http://jordan.fortwayne.com/oracle¡£

¡¡¡¡Èç¹ûÄú¿´ÁËTomµÄÖ÷Ò³£¬ÄÇôÄú»á×¢Òâµ½Ëû©ÁËJDBCµÄ°²×°¡£Èç¹ûÄú×¼±¸Ê¹ÓÃJDBC£¨¶ÔÓÚ¿çƽ̨µÄOracleÓ¦ÓÃÊ®·Ö·½±ã£©£¬Ö»ÐèÔÚ°²×°ÆÁĻҪÇóÄúÑ¡Ôñ×é¼þ£¨components£©Ê±£¬¼ÓÉϸÃÑ¡Ïî¼´¿É¡£µ±È»£¬ÄúÓ¦¸ÃÏÈ×°ºÃJDK¡£ÎÒ¸öÈËʹÓÃBlackdownµÄJDK 1.1.7¡££¨Òë×¢£ºRedhat°üÀ¨JDK£©È»ºóÐèÒªÉèÖÃoracleÓû§µÄClassPath»·¾³±äÁ¿£¬×îºÃµÄ°ì·¨ÊÇÔÚoracleÓû§Ä¿Â¼µÄ.bash_profile »ò .profileÖмÓÉÏÒ»¾ä£º
CLASSPATH=/usr/lib/jdk/lib/classes.zip; export CLASSPATHÈ»ºó£¬Èç¹ûÄúÖ»Ðè×öWeb AppletµÄ»°£¬ÔÚ°²×°³ÌÐò"Choose JDBC Components"µÄʱºò£¬ Ñ¡Ôñ"JDK 1.1 JDBC Thin Driver"£¬Èç¹ûÄúÐèÒª×öÍêÕûµÄJavaÓ¦Óã¬Ñ¡Ôñ"JDK 1.1 JDBC OCI Driver"¡£


¡¡¡¡ÁíÍâÇë×¢Ò⣺°²×°³ÌÐòÈÃÄúÊäÈë¸÷¿ÚÁîʱ£¬Èç¹û¿ÚÁî²»·ûºÏ¹æ·¶£¬²»»á¾¯¸æ¡£ÎÒµÚÒ»´Î°²×°Ê±£¬¿ÚÁîÀï¼ÓÁË"."£¬ÕâÔÚUNIXÖÐÊÇÔÊÐíµÄ£¬Oracle¾ÍÊÇÁíÒ»ÂëÊÂÁË¡£Ö±µ½°²×°¿ì½áÊøʱ£¬³ÌÐò²Å¸æËßÎÒ¿ÚÁîÓÐÎÊÌâ¡£µ±Ê±Îª±£ÏÕ Æð¼û£¬ÎÒ´ÓÍ·×öÁËÒ»´Î°²×°¡£

¡¡¡¡°²×°³ÌÐòµÄÁíÒ»¸öÎÊÌâÊÇÊÔͼÍù»¹Ã»Óн¨Á¢µÄĿ¼À�±´Îļþ¡£ÓбØÒªÔÚ°²×°Ç°
mkdir -p /u01/app/oracle/product/8.0.5/doc/server.805/install¡£
ÕâÒ»¹Ø¹ýºóÍòÊ´󼪡£

¡¡¡¡°²×°³É¹¦ºó£¬±ØÐëÒÔROOTÉí·ÝµÇ¼£¬ÔËÐÐroot.sh¡£ÎÒ¶Ôroot.sh×÷ÁËÒÔϸĶ¯£º
? LBIN»·¾³±äÁ¿´Ó/usr/lbin¸Ä³ÉÁË/usr/local/bin
? Ôö¼Ó»·¾³±äÁ¿LOG=/tmp/oracle-root.sh.log£¬ÕâÑù½Å±¾µÄÔËÐнá¹û»á¼Ç¼ÏÂÀ´

¡¡¡¡root.shÀï˵µ½£¬ÒªÏëÊý¾Ý¿â×÷Ϊһ¸ö·þÎñÆ÷ÔËÐУ¬±ØÐëÏÈÉ趨TWO_TASK±äÁ¿£»
µ«ÊÇ£¬ÊÂʵÉÏÈç¹û´Ó°²×°OracleµÄ»úÆ÷ÉÏÔËÐÐroot.sh£¬¾ÍûÓбØÒªÉèÕâ¸ö±äÁ¿¡£


PythonºÍOracle

¡¡¡¡ÎÒÅäÖÃÁËÒ»ÏÂpython£¨Òë×¢£ºÒ»ÖÖÇ¿´ó£¬¿ìËÙµÄÃæÏò¶ÔÏóµÄ½Å±¾ÓïÑÔ£©£¬ÒÔ²âÊÔOracleµÄ±à³Ì½Ó¿ÚºÍÍøÂç½Ó¿Ú ¡£ÔÚpythonÖÐÒªÁ¬Oracle,ÐèÒªDigital Creation£¨ZopeÓ¦Ó÷þÎñÆ÷µÄ×÷Õߣ©µÄDCOracleÄ£¿é¡£
ÄúÖ»ÐèÏÂÔØÈí¼þ²¢°´ÕÕָʾÕÕ×ö¾ÍÐС£Èç¹ûÊÇDCOracle 1.1.0£¬Ê¹ÓÃSetup-8.0.4µÄÅäÖ㬴ÓORACLE_LIBS±äÁ¿ÖÐɾȥ-lsocket, -lnsl, -lgen, -lelf, -laio, ºÍ-lposix4¼´¿É£¬ÄÇЩ¶¼ÊÇSolarisרÓõġ£×¢ÒâRedhat 5.2ºÍ6.0Öа²×°µÄ pythonÉèÖò»È«£¬configĿ¼ºÍincludeĿ¼±»Ê¡ÂÔ£¬ÎÞ·¨±àÒë°²×°µÚÈý·½µÄÄ£¿é¡£Äú±ØÐë×Ô¼º±àÒëpython»òÕßÏÂÔØÒ»¸öºÏÊʵÄRPM¡£ÕÒpythonµÄRPM£¬×îºÃµÄÈ¥´¦¿ÉÄÜÊÇOliver AndrichµÄ Python & LinuxÖ÷Ò³¡£
Ö»Òªrpm -e --nodeps python£¬ È»ºó rpm -i python,python-devºÍÆäËûRPM¼´¿É¡£
×°ºÃpythonºó£¬ÎÒÔËÐÐÁËÒÔϵĻù±¾²éѯ£¬·ÃÎÊOracle¡£

ÒýÓÃ:
[uche@malatesta uche]$ python
Python 1.5.1 (#1, Sep 3 1998, 22:51:17) [GCC 2.7.2.3] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import DCOracle
>>> #connect to DB. scott/tiger are the test database username/password
>>> dbc=DCOracle.Connect("scott/tiger@sforza") #sforza is the local
Oracle
server
>>> c = dbc.cursor()
>>> c.execute("SELECT * FROM emp WHERE emp.deptno = 10")
>>> rows = c.fetchall()
>>> print rows
[(7782, CLARK, MANAGER, 7839, dbiDate(1981-06-09 00:00:00), 2450.0,
None, 10),
(7839, KING, PRESIDENT, None, dbiDate(1981-11-17 00:00:00), 5000.0,
None, 10),
(7934, MILLER, CLERK, 7782, dbiDate(1982-01-23 00:00:00), 1300.0,
None, 10)]



¿ª·¢¹¤×÷Õ¾ÅäÖÃ

¡¡¡¡ÎÒÔÚÊý¾Ý¿â·þÎñÆ÷ÒÔÍâµÄһ̨»úÆ÷ÉϱàÒë°²×°ÁËpythonºÍÆäËû±à³Ì½Ó¿Ú¡£×î³õ£¬¿´ÆðÀ´ËƺõÎÒ±ØÐë°²×°Oracle µÄËùÓÐPRO*C/C++Èí¼þ°ü¡£µ«Òª°ÑOracle°²×°³ÌÐòÔËÐе½ÄÇÒ»²½Ò²¹»Âé·³µÄ£¬ËùÒÔÎÒ²»ÏëÄÇÑù°ì¡£ÓÚÊÇÎÒÕÒ³öÁËд³ÌÐòËùÐèÒªµÄ×îСÏÞÁ¿µÄÍ·Îļþ(include)¡¢¶ÔÏóÎļþ(object)ºÍ¿âÎļþ(library):

$ORACLE_HOME/lib/*
$ORACLE_HOME/rdbms/demo/*
$ORACLE_HOME/rdbms/lib/*
ÎҵĻúÆ÷ÉÏÉèORACLE_HOMEΪ/usr/local/oracle¡£

¡¡¡¡×¢ÒâÕâЩÎļþ»¹²»ÄÜÈÃÄú¿ÉÒÔÔÚC³ÌÐòÖÐÖ±½ÓǶÈëSQLÓï¾ä£¬Ö»ÓÐÍêÕû°²×°PRO*C/C++ºó²ÅÐС£Èç¹ûÒªÓÃJAVAµÄ»°£¬»¹µÃÔö¼Ó$ORACLE_HOME/jdbc/lib/*£»×¢Òâ°ÑÕâ¸öĿ¼¼Óµ½ClASSPATH±äÁ¿ÖС£

JDBCÁ¬½Ó


¡¡¡¡Îª²âÊÔJDBCÁ¬½Ó£¬ÎÒ×÷ÁËÒ»¸öС³ÌÐò£¬ÔÚÒ»¸ölistboxÄÚÏÔʾ²âÊÔ¿âÖеÄËùÓйÍÔ±Ãû¡£ÏÂÃæµÄ³ÌÐò1Êǵ÷ÓÃJDBCµÄjava Applet£¬³ÌÐò2Êǵ÷ÓÃJAVA³ÌÐòµÄHTML³¬Îı¾¡£Èç¹ûÄúµÄJDBCÒѾ­°²×°³É¹¦£¬½«³ÌÐò1¿½±´Îª JDBCTest.java£¬½«³ÌÐò2¿½±´ÎªJDBCTest.html£¬
È»ºó£º

javac JDBCTest.java
appletviewer JDBCTest.html

Äú¾Í¿ÉÒÔ×Ô¼º¿´¿´½á¹ûÈçºÎÁË£º

³ÌÐò1£º

ÒýÓÃ:
/*
Applet that reads in several rows from a remote Oracle database
and presents them in a listbox.
*/
import java.sql.*;
import java.awt.*;
import java.applet.*;
import java.lang.*;
public class JDBCTest extends Applet
{
//Single-select ListBox
private List employee_list = new List(5, false)
public void init()
{
setLayout(new BorderLayout());
try {
//Set up the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//Connect to an Oracle database on machine sforza, using username
//"scott" and password "tiger"
Connection DB_conn = DriverManager.getConnection
("jdbc:oracle:thin:@sforza:1521:ORCL", "scott", "tiger");
//Connection DB_conn = DriverManager.getConnection
("jdbc:oracle:thin:scott/tiger@sforza:1521:ORCL");
//Create a JDBC statement object
Statement statement_obj = DB_conn.createStatement();
//Execute a query to get the employee names from the test DB
ResultSet results = statement_obj.executeQuery ("select ENAME from
EMP");
//Populate the list box with all the employee names
while (results.next ()){
employee_list.add(results.getString(1));
}
} catch (SQLException e) {
throw new RuntimeException("SQL Exception " + e.getMessage());
}
add(employee_list);
}
}


³ÌÐò2£º



Oracle JDBC driver test

height="150"> Your
browser doesnt support Java.


Last modified: Sat Mar 6 22:19:26 MST 1999


³ÌÐò1µÄ´ó²¿·Ö¶¼ÊÇÓë¾ßÌåÊý¾Ý¿âÎ޹صÄJDBCµ÷Óã¬ÒÀÑù»­ºù«ÄúÒ²¿ÉÒÔ
·ÃÎÊPostgresQL£¬Ö÷ÒªºÍOracleÏà
¹ØµÄ²¿·ÖÊÇ£º

Connection DB_conn = DriverManager.getConnection
("jdbc:oracle:thin:@sforza:1521:ORCL", "scott", "tiger");


¡¡¡¡×¢Òâ Oracle thin JDBC driverÖÐURIµÄ¸ñʽ£º
jdbc:oracle:thin:@::
Èç¹ûÄúÏëÔÚURIÖаüÀ¨Óû§ÃûºÍ¿ÚÁîµÄ»°£º
jdbc:oracle:thin:username/password@::

ͬÑùµÄURI»¹ÓÐÒ»¸ö½Ï³¤µÄ¸ñʽ£º
"jdbc:oracle:thin:@(description=(address=(host= _IP>)(protocol
=tcp)(port=))(connect_data=(sid=)))"
×¢ÒâORCLÊÇϵͳ°²×°µÄȱʡSID£¨System Identifier£¬ÏµÍ³±êʶ·û£©¡£
Èç¹ûÄúÔÚ°²×°Ê±Ê¹ÓÃÁËÆäËûµÄSID£¬
ÔÚURIÀïÒ²ÓÃÄǸöSID¡£$ORACLE_HOME/network/admin/tnsnames.ora°ü
À¨ÁËOracle·þÎñÆ÷µÄ¶Ë¿ÚºÍSIDÉèÖá£
ÕâÊÇTNS Listener£¬OracleÍøÂçÁ¬½Ó½ø³ÌµÄÅäÖÃÎļþ¡£Èç¹ûÄúÎÞ·¨Í¨¹ýÍøÂçÁ¬½ÓÊý¾Ý¿âµÄ»°£¬Ê×ÏÈÓ¦¸Ã¼ì²é¶Ë¿ÚºÅºÍSIDÊÇ·ñÕýÈ·£¬TNS listnerÊÇ·ñÕý³££¨Òë×¢£ºlsnrctl status£¬»òÕßtnsping£©¡£JDBC²¢²»ÊÇ¿ª·¢SQLÊý¾Ý¿âÓ¦ÓõÄΨһÊֶΣ¬ANSI±ê×¼SQLJÔÊÐíÔÚJAVA³ÌÐòÖÐÖ±½ÓǶÈëSQLÓï¾ä¡£Oracle for Linux 8.0.5²¢Ã»ÓÐÀ¦°óSQLJ£¬µ«¿ÉÒÔ×÷ΪÁíÒ»¸ö¶ÀÁ¢²úÆ·»ñµÃ¡£SQLJÊÇ100£¥µÄJAVA£¬Ó¦¸ÃÔÚLinuxÉÏÔËÐÐûÓÐÎÊÌ⣬ÊÂʵÉÏSQLJÔڵײãʹÓõľÍÊÇJDBC£¬Òò´Ë¿ÉÒÔͬÈκÎSQLÊý¾Ý¿â»¥Áª£¬²¢²»ÏÞÓÚOracle¡£

¡¡¡¡Ï£ÍûÉÏÃæµÄÕâЩÀý×ÓÄܶÔÄúµÄ±à³ÌÓÐËù°ïÖú¡£¿ÉϧOracle for LinuxµÄ±à³ÌÎĵµÏ൱µÄÉÙ£¬Òª²»¾ÍÊÇÒþ²ØµÃÊ®·ÖÉî:) Ò²ÐíÔÚÊý¾Ý¿â±à³ÌµÃÐÄÓ¦ÊÖ֮ǰ£¬ÄúµÃÏÈ¿ÐËüÒ»Á½±¾Êé¡£

PL/SQL

¡¡¡¡¶ÔSQLµÄ¹ý³ÌÐÔÓïÑÔÀ©Õ¹£¨PL/SQL£©¿ÉÄÜÊÇOracle×îÖøÃûµÄÌص㡣ÕâÖÖÇ¿´óµÄרҵÊý¾Ý¿â¹ÜÀíÓïÑÔÔÊÐíÄú¶ÔÉùÃ÷ÐÔµÄSQL¼ÓÂß¼­¿ØÖÆ¡£Ò»°ã£¬PL/SQLµÄ´æ´¢¹ý³Ì£¨stored procedure£©ÓÃÃüÁîÐеÄsqlplus£¬Í¼Ðλ¯µÄDeveloper/2000£¨LinuxÉÏÄ¿Ç°»¹Ã»ÓУ©»òÆäËû¹¤¾ß¿ª·¢£¬ÔÊÐíÄú´ÓOracleÖÚ¶àµÄ²éѯ½Ó¿Ú£¨Oracle Application Server, Python, Perl, JDBC »òÕßC)·ÃÎÊ¡£

³ÌÐò3£º

ÒýÓÃ:
create or replace package stored_sample as
function get_annual_salary (emp_number in number) return number;
end stored_sample;
/
create or replace package body stored_sample as
function get_annual_salary (emp_number in number) return number
is
annual_salary number;
monthly_salary number;
begin
select sal into monthly_salary from emp where empno = emp_number;
annual_salary := monthly_salary * 24;
return (annual_salary);
end get_annual_salary;
end stored_sample;
/



¡¡¡¡ÉÏÃæµÄ³ÌÐò3ÊÇ´æ´¢½ø³ÌµÄÒ»¸öСʾ·¶£¬Ëü½ÓÊÜÒ»¸öÔ±¹¤ºÅ£¬·µ»Ø¸ÃÔ±¹¤µÄÄêн¡£Ïà¹ØµÄº¯Êýget_annual_salary·â×°ÔÚPL/SQL°üsample_packageÖС£

Èç¹û°Ñ³ÌÐò3¿½±´µ½Îļþsample.sql£¬Äú¿ÉÒÔͨ¹ýsqlplusÔËÐÐËü£¬ÈçÏÂËùʾ£º

ÒýÓÃ:
[oracle@sforza demo]$ sqlplus

SQL*Plus: Release 8.0.5.0.0 - Production on Sun Mar 7 13:36:32
1999

(c) Copyright 1998 Oracle Corporation. All rights reserved.

Enter user-name: scott
Enter password:

Connected to:
Oracle8 Release 8.0.5.0.0 - Production
PL/SQL Release 8.0.5.0.0 - Production

SQL> @sample
Package created.

Package body created.

SQL> set serveroutput on
SQL> exec
dbms_output.put_line(stored_sample.get_annual_salary(7782))
58800

PL/SQL procedure successfully completed.

SQL>


¡¡¡¡Í¨¹ýÆäËûµÄ±à³Ì½Ó¿Ú£¬Ò²¿ÉÒÔʹÓÃÕâ¸öPL/SQL°ü¡£Python/DCOracleÖУ¬
²Î¼ûConnection¶ÔÏóµÄprocedures³ÉÔ±
JDBCÖУ¬²Î¼ûjava.sql.CallableStatement¡£

¡¡¡¡OracleÓÐÖÚ¶àµÄÄÚÖú¯Êý¡£ÊÂʵÉÏ£¬´ó¶àÊýÄúÒÔÇ°ÓÃÍⲿ´úÂëÍê³ÉµÄ¹¦Äܶ¼¿ÉÒÔͨ¹ýPL/SQL¸ßЧµØÍê³É¡£Èç¹ûÄúÐèҪʲô±È½Ïͨ³£µÄ¹¦ÄÜ£¬Çë²Î¿¼PL/SQLÊֲᣬ¿´ÄúÐèÒªµÄº¯ÊýÊÇ·ñÒѾ­ÊµÏÖÁË¡£Èç¹ûÄú×¼±¸×ö´óÁ¿µÄOracle±à³ÌµÄ»°£¬¾­³£·­ÔÄPL/SQLÊÖ²áÒÔÊìϤ¸÷ÖÖº¯ÊýÊÇ´óÓкô¦µÄ¡£

¹ÜÀíOracle for Linux

¡¡¡¡Èç¹ûÄúÒѾ­Ï°¹ßÔËÐÐÏà¶Ô²»ÄÇô¸´ÔÓµÄÊý¾Ý¿â£¬ÄÇôÔÚOracleÖÐÍê³ÉһЩÈÕ³£²Ù×÷£¬ÀýÈ罨Á¢ÐÂÊý¾Ý¿â»òÕßÐÔÄܵ÷г»áÏÔµÃÏ൱¸´ÔÓ¡£ÓÐһЩ¹Ø¼üµÄÅäÖÃÎļþÐèҪά»¤£¬Èçinit.ora, config.oraºÍtnsnames.ora¡£Ò»°ãÓкü¸ÖÖ°ì·¨Ö¸¶¨Ò»Ð©¹Ø¼ü²ÎÊý£¬È統ǰµÄSID¡£¿ÉÒÔÔÚÉÏÊöµÄÎļþÖÐÉùÃ÷£¬Ò²¿ÉÒÔÔÚ»·¾³±äÁ¿ÖÐÉùÃ÷£¬»òÕßÊÇͨ¹ýoracle¹¤¾ßµÄÔËÐвÎÊý¡£ÕâÖÖÁé»îÐÔÊÇÖµµÃÔÞÉ͵ģ¬¿ÉϧÓÐʱ¸ãÇåÄÇÒ»ÖÖÉèÖÃÓÅÏÈÒ²ºÜÉËÄԽ

¡¡¡¡Í¬LinuxÒ»Ñù£¬OracleÌṩµÄ°²È«»úÖÆÈç¹û¹ÜÀí²»µ±£¬¾ÍÐÎͬÐéÉè¡£»¨Ê±¼äÊìϤ¸÷ÖÖ·ÃÎʹæÔòºÍÉèÖã¬ÒÔ¼°¸÷ÖÖÌØÊâOracleÓû§ÕʺŵĽÇÉ«£¬»¹ÊÇÖµµÃµÄ¡£

¡¡¡¡OracleµÄÐÔÄܵ÷гÊÇÒ»¸ö·Ç³£´ó£¬Ò²·Ç³£×¨µÄ»°Ìâ¡£µ÷гµÃµ±£¬¿ÉÒԺܴó³Ì¶ÈµØÌá¸ßÐÔÄÜ¡£OracleÔËÐкÍCPU¡¢ÄÚ´æ¡¢Íâ´æµÄ¹ØϵÊÇÏ൱¸´Ôӵģ¬ÕâЩÒòËرØÐ뿼ÂÇ¡£ÁíÍ⣬PL/SQL°ü£¬´æ´¢¹ý³Ì£¬ÁÙʱ±í¿Õ¼ä£¬±í½á¹¹±¾Éí£¬ËùÓÐÕâЩ¶¼»áËæ×ÅʹÓöøÈÕÇ÷¸´ÔÓ£¬±£Ö¤Êý¾Ý¿âµÄ½á¹¹ÓÅ»¯£¬Ã»ÓÐÀ¬»ø£¬¾ø¶Ô±È¶¨ÆÚ´ÓcronÔËÐÐvacuum¸´Ôӵöࡣ

¡¡¡¡Oracle DBA(database adminstrator£¬Êý¾Ý¿â¹ÜÀíÔ±£©ÊǵçÄÔרҵÈËÔ±ÖÐÒ»¸öÖøÃûµÄÑÇÎÄ»¯¡£Õâ²¢²»Ææ¹Ö¡£OracleµÄÇ¿´ó¹¦ÄܺÍÁé»îÐÔ£¬Ò²Í¬Ê±Òâζ×ŶàµÃÈÃÈË·¢·èµÄ¸÷ÖÖСÃØÃÜ¡¢Ð¡¼¼ÇÉ¡¢Ð¡ÏÝÚ壬Õâ·½ÃæµÄÌصãËü¾ø²»±ÈÈκÎÈËÉÙ£­£­°üÀ¨LinuxÔÚÄÚ¡£ÄúÔÚÕ÷·þLinuxʱ¿ÉÄÜÒѾ­·¢ÏÖ£¬OReillyµÄ¶¯ÎïÔ°£¨Òë×¢£ºËùÓÐOReilly and Associate³ö°æµÄÊ鶼ÒÔ¶¯Îï×÷·âÃ棩ÊÇÒ»¸öºÜºÃµÄÈ¥´¦¡£Èç¹ûÄúÐèÒªÔÚOracleÉÏÍê³ÉÐí¶à¹¤×÷£¬ÕÒÕһƷâÃæµÄOReilly Oracleר¼­¡£ÄÇÀÄã»áÕÒµ½±ÈOracle°ÝռͥÃÔ¹¬Ê½ÎĵµºÃµÄ¶àµÄÐÅÏ¢À´Ô´¡£

Oracle for Linux vs. Oracle for NT

¡¡¡¡NTÉϵÄOracle (Òë×¢£ºOracleÔÚNTÉϵÄÏúÁ¿³¬¹ýÁËSQL SERVER£¬ÊÇNTµÚÒ»´óÊý¾Ý¿â£©ÎªÐí¶à¹ÜÀí¹¦ÄÜÌṩÁËͼÐνçÃ棬ÀàËƵŦÄÜÔÚUNIX/LinuxÉÏÖ»ÄÜͨ¹ýsqlplus·ÃÎÊ¡£ÕâÑùµÄͼÐνçÃ棬Éè¼ÆµÃÓëNT¿ØÖÆÃæ°åµÄÆäËû²¿·ÖÆÄΪÏàËÆ¡£Linux DBA±ØÐëÊìϤsqlplus¡£NTµÄÎÊÌâÊÇ£¬Ðí¶à¹ÜÀíÈÎÎñÒªÇóÓû§ÔÚÖ÷¿Ø̨£¨»úÆ÷ÆÁĻǰ£©Íê³É£¬Èç¹ûÏëÔ¶³Ì¹ÜÀí¾ÍÐèÒª°º¹óµÄµÚÈý·½Èí¼þ£¨»òÕßOracle Enterprise Manager?£©¡£UNIXÉϵÄOracle¹ÜÀí¿ÉÒÔ´ÓÈκξ­¹ýÊÚȨµÄÔ¶µØ½øÐУ¬Ð§¹ûͬÔÚ»úÆ÷Ö÷¿Ø̨һÑù¡£

¡¡¡¡NTÉϵÄOracleʹÓÃÒ»¸ö½ø³ÌÄڵĶà¸ö½ø³Ì£¬¶øUNIX/LinuxÉϵÄOracleʹÓöà¸ö¶ÀÁ¢µÄ£¬Ê¹ÓÃÏ໥¶ÀÁ¢µÄÄÚ´æ¿Õ¼ä£¨Òë×¢£ºUNIXÉÏÒ²ÓжàÏ̵߳IJ¿·Ö£ºMultithreaded Server£¬MTS£¬Ï൱ÓÚÇ°ÎÄÌáµ½µÄlistenerµÄ¶àḬ̈߳汾¡££©NTÉϵÄʵÏÖ·½Ê½±ÜÃâÁ˽ø³Ì¼äͨÐÅ£¬ÓÐССµÄÐÔÄÜÓÅÊÆ£¬µ«UNIXÉϵÄʵÏÖ·½Ê½ÌṩÁ˸ߵöàµÄ¿É¿¿ÐÔºÍÊý¾ÝÍêÕûÐÔ£¬ÒòΪһ¸öOracle½ø³Ì²»¿ÉÄÜÎÛȾÁíÒ»¸öOracle½ø³ÌµÄµØÖ·¿Õ¼ä¡££¨Òë×¢£ºÔÚNTºÍVMSÉÏ£¬´´½¨Ò»¸öеĽø³Ì±È´´½¨Ò»¸öеÄḬ̈߳º¹óµÃ¶à£¬¶øÇÒNTµÄ½ø³Ì¼äÇл»ºÜÂý£¬Òò´Ë΢Èí½¨Òé³ÌÐòÔ±Ö»ÒªÓпÉÄܾÍʹÓöàÏ̡߳£ÔÚUNIXÉÏ£¬½¨Á¢Ð½ø³ÌÊDZȽϸßЧµÄ¡£¶øÔÚLinuxÉÏ£¬½¨Á¢Ð½ø³ÌºÍеÄÄÚºËÏß³Ì,kernel thread¶¼Ê¹ÓÃͬһ¸ö»ù±¾ÏµÍ³µ÷Óã¬Ð§ÂÊÏ൱¸ß¡££©

¡¡¡¡ÔÚ32λµÄÓ²¼þϵͳÉÏ£¬LinuxµÄext2ÎļþϵͳµÄÏÞÖÆÊÇ×î´óÎļþΪ2G£¬NTΪ4G¡£Õâ²¢²»Ì«Ó°ÏìOracleµÄÓû§£¬ÒòΪ±í¿Õ¼ätablespace¿ÉÒÔÀ©Õ¹µ½¶à¸öÎļþÉÏ£¬µ«»¹ÊÇÓÐССµÄЧÂÊÎÊÌâ¡£µ±È»£¬64λµÄLinux (Alpha,Ultra-Sparc, PA-RISC)»áÏû³ýÕâЩÏÞÖÆ£¬64λµÄSolaris(Solaris 7)Ò²Ò»Ñù¡££¨Òë×¢£ºÕâÀïÆäʵÓÐһЩÎÊÌ⣬´ýÎÒ²éÃ÷ÔÙÏò¸÷λ¿´¹Ù½»´ú£©¡£


һЩºÃ¹¤¾ß/½áÊøÓï

¡¡¡¡Oracleͬʱ·¢²¼ÁËOracle Application Server (OAS)µÄLinux°æ±¾¡£¶ÔOASµÄÉîÈë̽ÌÖÔÚ±¾ÎÄ·¶Î§Ö®Í⣬µ«ËüȷʵÊÇÁ¬½Óºó¶ËOracleÊý¾Ý¿â£¬½¨Á¢Internet»òIntranetÓ¦ÓõÄÒ»¸öÇ¿ÓÐÁ¦µÄ¹¤¾ß¡£OASÌṩJAVA¿ª·¢ÄÜÁ¦£¬¿ÉÒÔ½«HTTPºÍIIOPÓëOCIÍøÂç½Ó¿Ú´®ÔÚÒ»Æ𣬾߱¸ÓѺõĽçÃæÒÔ±ãÉè¼ÆWEB±íµ¥ºÍ±¨±í£¬»¹ÓÐÆäËû·½±ãµÄ¹¤¾ß¡£

¡¡¡¡OracleÈç´ËÁ÷ÐУ¬×ÔȻҲÓÐÏàÓ¦µÄÒ»Åú¿ªÔ´Èí¼þ£¨Open Source£©¹¤¾ß¡£ÆäÖеÄOWS killer ÊÇÒ»¸ö»ùÓÚJAVAServletµÄ¿ÉÒÔÌæ´úOASµÄWEB½Ó¿Ú¹¤¾ß£¬ÓëApache WEB·þÎñÆ÷¡¢ApacheµÄJserv JAVA ServeletÄ£¿é¼¯³É£¬Ìṩ¶ÔOracleÊý¾Ý¿âµÄ·ÃÎÊ¡££¨Òë×¢£ºOWS, Oracle Web ServerÊÇOracle Application ServerÔçÆÚ°æ±¾µÄÃû³Æ£©¡£Äú¿ÉÒÔÔÚMatts House ÕÒµ½¸ü¶àµÄ¹¤¾ßÒÔ¹ÜÀíOracleµÄ´æ´¢¹ý³Ì¡¢Ìṩ¿ìËٵı¨±í¹¦ÄÜ¡£

¡¡¡¡ÕÆÎÕOracle¿É²»ÊǾÙÊÖÖ®À͵ÄÊ£¬µ«Ò²Ã»ÓбØÒªÍû¶øÈ´²½¡£È·Êµ£¬ÊÀÉÏÓÐÐí¶à¸üÈÝÒ×¹ÜÀíµÄÊý¾Ý¿â£¬µ«Èç¹ûÄúÐèÒª¸ß¼¶µÄSQL£¬»òÕßPL/SQLµÄ¹¦ÄÜ£¬»òÕßtrigger£¬»òÕ߸÷ÖÖÀ©Õ¹£¬»òÕßÏȽøµÄ½»Ò×¹ÜÀí£¬»òÕß±ØÐëºÍOracleϵͳ¹²´æ£¬Äú»á·¢ÏÖLinuxÊÇÒ»¸ö¼«¼ÑµÄOracleƽ̨¡£ÄúÒѾ­ÔÚLinuxµÄÊÀ½çÖÐ̽Ë÷ÁËÕâÑùÔ¶£¬Ò»¶¨Ò²ÄÜÓ¦¸¶OracleµÄÌôÕ½¡£


ÔÚRedhatÉÏ°²×°Oracle 8.0.5ºÍOAS 3µÄÏêϸָµ¼:

£¨Step-by-step install notes for Oracle 8.0.5 and Application Server on Red Hat)

ÏÂÔØOracle 8ºÍOracle Application Server

Oliver Andrichs Python & Linux Page

do=listmsgs&conf=Early.Linux class=red target=_blank>Oracle on Linux -- Oracle TechnetÉϵÄÂÛ̳

Blackdown.org -- Linux JDK

PythondµÄOracleÄ£¿é

java/sqlj/index.html" target=_blank>Oracle SQLJ -- ÔÚJavaÖÐǶÈëSQL

OWS Killer

Matts House

bsd.org.ru/linux-oracle.HOW-TO.html" target=_blank>ÔÚFreeBSDÉÏÔËÐÐOracle for Linux
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. wangzhe81 ÓÚ 2006-08-02 12:39:40·¢±í:

    лл·ÖÏí