Anda di halaman 1dari 4

Oracle 9,10g

Sybase A SE 12,15

An O ra cle insta nce consists of: A) Six proce sse s: P MO N P roce ss Monitor, SMO N Syste m Monitor, DBW n Da ta ba se W rite r, LGW R Log W rite r, AR C n Archive r, a nd C KP T C he ck point. Additiona l proce sse s on a 10g R AC syste m m a y include R EC O Distribute d Tra nsa ction R e cove ry, C JQ n Job C oordina tor P roce ss, LC Kn Sha re d R e source Lock ing, LMDn Globa l Lock Ma na ge r, LMO N Lock Ma na ge r, LMS* Globa l C a che Se rvice , MMAN Me m ory Ma na ge r, MMNL Me trics Monitor, se ssion hitory, m e trics com puta tion, MMO N Me trics Monitor, sta tistics, sna pshots, a nd P SP n a P L-SQ L plug in. B) Da ta file s which conta in the ta ble s a nd othe r da ta obje cts, control file s which conta in configura tion inform a tion, re do log file s for tra nsa ction proce ssing, a nd a rchive file s for re cove ry purpose s. C ) C onfigura tion file s which conta ins the insta nce a ttribute s, a nd e x te rna l se curity inform a tion Memory Model The O ra cle m e m ory m ode l consists of: A) the SGA, which conta ins e x e cuta ble progra m code ; B) the sha re d pool, which is split be twe e n the libra ry ca che a nd da ta dictiona ry ca che , optim ize d que rie s a re store d he re ; C ) the re do log buffe r, which is whe re tra nsa ctions a re store d be fore the y a re writte n to the re do logs; D) the db buffe r ca che , which is whe re da ta ba se ope ra tions a re store d be fore the y a re writte n to the da ta file s. The O ra cle da ta se rve r runs a s a m ultiple proce sse s within the ope ra ting syste m ; the num be r of use rs conne cte d to the da ta ba se is re fle cte d in the num be r of proce sse s m a na ge d by the O S. Ea ch O ra cle use r conne ction re quire s 1 m e g of se rve r m e m ory. Transaction Processing Tra nsa ctions a re writte n to the re do log buffe r, whe re the y a dva nce to the re do logs, da ta file buffe r, a nd da ta file s. W he n a rollba ck occurs, block im a ge s a re disca rde d from the re do log buffe r; a s the pre vious block da ta is he ld in the rollba ck se gm e nt block s. C om m itte d tra nsa ctions a re prom ote d to the a rchive logs. Archive logs a re use d to re store the da ta in the e ve nt of a ha rdwa re fa ilure . A che ck point ope ra tion flushe s a ll upda te d (com m itte d) m e m ory block s from the log buffe r a nd da ta ba se buffe r pool. Note tha t tra nsa ction logging is optiona l, on a ta ble by ta ble ba sis, a nd a rchive logging is a lso optiona l. During a n upda te tra nsa ction, re cord lock ing provide s pre ve nts da ta block collisions from occurring. Acce ss to the "be fore " im a ge of the re cord(s) is m a de a va ila ble during this tim e , which re duce s conte ntion. This is a pa te nte d re cord lock ing m e cha nism .

A Syba se se rve r consists of: A) two proce sse s, da ta se rve r a nd ba ck up se rve r ; B) de vice s which house the da ta ba se s; one da ta ba se (m a ste r) conta ins syste m a nd configura tion da ta ; C ) a configura tion file which conta ins the se rve r a ttribute s.

Memory Model The Syba se m e m ory m ode l consists of: A) the progra m a re a , which is whe re the da ta se rve r e x e cuta ble is store d; B) the da ta ca che , store s re ce ntly fe tche d pa ge s from the da ta ba se de vice C ) the store d proce dure ca che , which conta ins optim ize d sql ca lls The Syba se da ta se rve r runs a s a single proce ss within the ope ra ting syste m ; whe n m ultiple use rs a re conne cte d to the da ta ba se , only one proce ss is m a na ge d by the O S. Ea ch Syba se da ta ba se conne ction re quire s 40-60k of m e m ory. The "tota l m e m ory" configura tion pa ra m e te r de te rm ine s the a m ount of m e m ory a lloca te d to the se rve r. This m e m ory is ta k e n im m e dia te ly upon sta rtup, a nd doe s not incre a se . Transaction Processing Tra nsa ctions a re writte n to the da ta ca che , whe re the y a dva nce to the tra nsa ction log, a nd da ta ba se de vice . W he n a rollba ck occurs, pa ge s a re disca rde d from the da ta ca che . The tra nsa ction logs a re use d to re store da ta in e ve nt of a ha rdwa re fa ilure . A che ck point ope ra tion flushe s a ll upda te d (com m itte d) m e m ory pa ge s to the ir re spe ctive ta ble s. Tra nsa ction logging is re quire d for a ll da ta ba se s; only im a ge (blob) fie lds m a y be e x e m pt. During a n upda te tra nsa ction, the da ta pa ge (s) conta ining the row(s) a re lock e d. This will ca use conte ntion if the tra nsa ction is not e fficie ntly writte n. R e cord lock ing ca n be turne d on in ce rta in ca se s, but this re quire s sizing the ta ble structure with re spe ct to the pa ge size . The lock ing m e cha nism ca n be bypa sse d by se tting the isola tion le ve l, to a llow da ta to be re a d from uncom m itte d tra nsa ctions. Backup Procedures A "dum p da ta ba se " ope ra tion ca n be pe rform e d whe n the da ta ba se is on-line or offline . Subse que nt "dum p tra nsa ction" com m a nds ne e d to be issue d during the da y, to e nsure a cce pta ble re cove ry windows. A ne w ASE 12.5 fe a ture a llows da ta ba se dum p file s to be "m ine d" for a single ta ble . Thus a n e ntire da ta ba se loa de d is not re quire d whe n only a single ta ble re store is ne e de d. Recovery Procedures A "loa d da ta ba se " com m a nd loa ds the de signa te d da ta ba se with the na m e d dum p file . Subse que nt "loa d

Backup Procedures P re vious to O ra cle 8, the only wa y to ba ck up the da ta ba se wa s through a "cold" ba ck up. This involve d shutting down the O ra cle insta nce , ba ck ing up the da ta file s, a nd re sta rting upon com ple tion. O ra cle 8,9, a nd 10g ha s the R e cove ry Ma na ge r pa ck a ge which fa cilita te s ba ck ing up da ta file s on-line .

Recovery Procedures R e cove ry is a chie ve d by re storing the da ta file s, a nd ve rifying the control file s a re synchronize d prope rly. W he n R MAN is use d (it is now the sta nda rd in m ost

W he n R MAN is use d (it is now the sta nda rd in m ost production da ta ba se s) re cove ry is a ccom plishe d via a n a utom a te d se t of proce sse s.

tra nsa ction" com m a nds ca n the n be issue d to loa d m ultiple tra nsa ction dum p file s. Security and A ccount Setup The initia l login shippe d with Syba se is "sa " (syste m a dm inistra tor). This login ha s the role "sa _role " which is the supe r-use r, in Syba se te rm s. Use r logins a re a dde d a t the se rve r le ve l, a nd the n gra nte d a cce ss to e a ch da ta ba se , a s ne e de d. W ithin e a ch da ta ba se , a cce ss to ta ble s ca n be gra nte d pe r a pplica tion re quire m e nts. A use r ca n a lso be a lia se d a s "dbo", which a utom a tica lly gra nts the m a ll rights within a da ta ba se .

Security and A ccount Setup O ra cle is shippe d with se ve ra l built-in a ccounts: syste m , inte rna l, a nd sys. O pe ra ting syste m a uthe ntica tion is re quire d in orde r for a login to be cre a te d with sim ila r privile ge s. Afte r a login is cre a te d, a cce ss is the n gra nte d to the ta ble s within sche m a s a s ne e de d.

Database Creation Da ta ba se s a re initia lize d with the "cre a te da ta ba se " com m a nd. In m ost (99.9%) ca se s the da ta ba se na m e is the sa m e a s the insta nce na m e , a nd the re is only one da ta ba se pe r insta nce . W ithin a n O ra cle insta nce , sche m a s a re cre a te d which conta in the ta ble s for a n a pplica tion. Ta ble s a re re fe re nce d by schema_name.tablename. Ea ch use r is a ssigne d a de fa ult sche m a upon cre a tion; this sche m a na m e is the sa m e a s the use r na m e . In orde r for ta ble s to be re fe re nce d without the sche m a na m e , the y m ust be owne d by the use r, or in the "syste m " sche m a . "Synonym s" ca n be cre a te d to bypa ss the pre fix re quire m e nt. Typica lly, a n "inte rna l" or "syste m " le ve l login will be use d to a cce ss the da ta ba se . A typica l O ra cle insta nce will ha ve 12 da ta file s, 6 re do log m e m be rs, 6 a rchive file s, a nd 4 control file s, a ll spre a d a cross va rious disk subsyste m s. Data Types Supporte d da ta type s include num be r, cha r, va rcha r2, da te , long ra w, clob, a nd blob. In O ra cle 10, num e ric da ta type s we re introduce d. Blob a nd clob (O ra cle 8+ only) da ta type s a re im ple m e nte d via pointe rs within the physica l re cord structure ; the fie ld conte nts a re store d in de dica te d block s. As a re sult, e a ch blob or clob fie ld re quire s a t le a st 2K of stora ge (de pe nding on the da ta ba se block size ). Long ra w da ta type s a re store d in-line , a nd a re discoura ge d. For string da ta , the va rcha r2 type ca n be use d for le ngths up to 2000; the clob type ca n be use d for longe r fie ld da ta . ( ** blob = bina ry la rge obje ct, clob = cha ra cte r la rge obje ct) Da te fie lds a re re pre se nte d a s a num be r of da ys, a long with a de cim a ls fra ction (a ccura te to the m inute ). Additiona l a ccura cy ca n be obta ine d by purcha sing a se pa ra te m odule . Se que nce s provide a m e a ns of a utoincre m e nting a n ID colum n - se le cting sequence_name.NEXTVAL a utom a tica lly incre m e nts the se que nce a nd re turns the ne w va lue . Storage Concepts Ta ble s a re store d in ta ble spa ce s; a ta ble spa ce is m a de up of one or m ore da ta file s. Although it is possible to use ra w de vice s within O ra cle , it is not re com m e nde d. C ontrol file s, rollba ck se gm e nts, a nd re do logs a re a ll store d in se pa ra te file s within the ope ra ting syste m . Note tha t O ra cle 10g R AC fe a ture s a spe cia l O FS (O ra cle File Syste m ), which a llows the da ta ba se to ge t be tte r i/o pe rform a nce ove r conve ntiona l file syste m s.

Database Creation Da ta ba se s a re initia lize d with the "cre a te da ta ba se " com m a nd. It is not unusua l for a Syba se se rve r to conta in m a ny diffe re nt da ta ba se s. Ta ble s a re cre a te d within e a ch da ta ba se ; use rs re fe r to ta ble s by using ownername.tablename nom e ncla ture . "Alia sing" use rs with the da ta ba se e lim ina te s the ne e d for the pre fix . Typica lly, a use r will be a lia se d a s "dbo" (da ta ba se owne r), which a lso give s the sa m e re sult. A typica l Syba se da ta ba se will consist of six se gm e nts spre a d a cross va rious de vice s (non-SAN e nvironm e nt).

Data Types Supporte d da ta type s include inte ge r, de cim a l, floa t, m one y, cha r, va rcha r, da te tim e , im a ge , a nd te x t da ta type s. Te x t a nd im a ge da ta type s a re im ple m e nte d via pointe rs within the physica l re cord structure ; the fie ld conte nts a re store d in de dica te d pa ge s. As a re sult, e a ch te x t or im a ge fie ld re quire s a t le a st 2K of stora ge (on m ost pla tform s). For string da ta , the va rcha r type ca n be use d for le ngths up to 4000; the text type ca n be use d for longe r fie ld da ta . Da te tim e fie lds a re store d a s a num be r which is a ccura te to 1/300 of a se cond. W ithin a "cre a te ta ble " sta te m e nt, a colum n ca n be fla gge d a s a n "ide ntity" colum n, which ca use s it to be incre m e nte d a utom a tica lly whe n rows a re inse rte d.

Storage Concepts Ta ble s a re store d in se gm e nts; a se gm e nt is a n a re a within a de vice , with a na m e a nd a size , tha t is a lloca te d for a da ta ba se . The tra nsa ction log is store d in its own se gm e nt, usua lly on a se pa ra te de vice .

Partitioning O ra cle 9i,10g doe s support se m a ntic pa rtitioning, by list, ra nge , ha sh, ha sh ra nge , a nd com posite .

Partitioning Se m a ntic "sm a rt" pa rtitioning is ne w in ASE 15. Ta ble s ca n be pa rtitione d by ra nge , va lue , or round-robin. By de fa ult, a ll ta ble s in ASE 15 a re pa rtitione d, roundrobin. Failover and High A vailability The ASE High Ava ila bility option a llows se rve r fa ilove r to occur within spe cifie d m e trics. ASE 15 supports for se rve r cluste rs, sha re d disk stora ge be twe e n se rve rs, a nd m ultiple clie nt fa ilove r in a cluste r se tting will be a va ila ble in la te 2007 / e a rly 2008.

Failover and High A vailability O ra cle offe rs se ve ra l type s of high a va ila bility configura tions: Tra nspa re nt Applica tion Fa ilove r (TAF), O ra cle Stre a m s (se nd tra nsa ctions to re m ote se rve r), Da ta Gua rd, a nd Sta ndby Da ta ba se .

PL-SQL P L-SQ L is a robust progra m m ing la ngua ge in which store d proce dure s ca n be writte n. The proce dure s a re store d in a com pile d form a t, which a llows for fa ste r e x e cution of code . C ursors a re supporte d for row by row proce ssing. Arra ys a re supporte d (using the ta ble da ta type ), a s we ll a s structure s (the re cord type ). Since P L-SQ L proce dure s ca nnot re turn a re sult se t, re turning rows to a ca lling a pplica tion re quire s im ple m e nting a rra ys a s "out" va ria ble s. O ne powe rful fe a ture of P L-SQ L is the a bility to cre a te custom functions which ca n be use d within SQ L sta te m e nts. R e gula r Ex pre ssions a re supporte d, in a ddition to Use r De fine d O pe ra tors. Triggers O ra cle supports se le ct, inse rt, upda te , a nd de le te trigge rs. Trigge rs ca n be se t to fire 'be fore ' or 'a fte r' a tra nsa ction. NEW a nd O LD a lia se s a re use d to re fe r to the be fore a nd a fte r im a ge s of the da ta . Trigge rs by de fa ult fire for a ll rows in the tra nsa ction; the y ca n be se t to fire for e a ch row a lso. O ra cle a lso supports DDL Eve nt Trigge rs.

Transact-SQL Tra nsa ct-SQ L is a robust progra m m ing la ngua ge in which store d proce dure s ca n be writte n. The proce dure s a re store d in a com pile d form a t, which a llows for fa ste r e x e cution of code . C ursors a re supporte d for row by row proce ssing. Te m pora ry ta ble s a re supporte d, which a llows custom ize d, priva te work ta ble s to be cre a te d for com ple x proce sse s. Any num be r of re sult se ts ca n be re turne d to ca lling a pplica tions via SELEC T sta te m e nts.

Triggers Syba se ASE supports inse rt, upda te , a nd de le te trigge rs. Trigge rs a re fire d a fte r the tra nsa ction sta rts, a nd ha ve the ca pa bility to roll ba ck if re quire d. Im a ge s of the 'be fore ' a nd 'a fte r' re cords a re visible within the trigge r. Trigge rs by de fa ult fire for a ll rows in the tra nsa ction.

A nalytic Functions, OLA P O ra cle 10 doe s support a na lytic functions lik e m e dia n, n-tile , a nd le a d/la g, ove r pa rtitions.

A nalytic Functions, OLA P Syba se ASE doe s not support a na lytic functions (m e dia n, n-tile , le a d/la g, ove r pa rtitions) a t the m om e nt; Syba se IQ , the da ta wa re house product, doe s support m ost a na lytic functions.

Flat File Processing O ra cle include s the SQ LLDR utility (SQ L Loa de r) which ca n im port via fla t file s. "Dire ct" m ode im ports a re a chie ve d by sim ply re m oving the inde x e s (a nd trigge rs) from the ta rge t ta ble , a nd spe cifying dire ct=ye s a t the com m a nd line . The re is no O ra cle utility for e x porting da ta to a fla t file ; sqlplus m ust be use d to spool the da ta to a file . Performance and scalability O ra cle ha s a lwa ys be e n k nown for its spe e d a nd pe rform a nce . O ra cle 10 supports ove r 15,000 a ctive use r conne ctions. The pa te nte d re cord lock ing sche m e m a de it a n a ttra ctive ca ndida te for ca nne d a pplica tions m a rk e te d by P e ople soft a nd the lik e . The a bility to turn tra nsa ction logging on a nd off a t will a llows O ra cle sque a k by com pe titors during be nchm a rk a na lysis runs.

Flat File Processing Syba se ASE include s the BC P utility (Bulk -C opy) which ca n im port or e x port da ta via fla t file s. "Fa st" m ode im ports a re a chie ve d by sim ply re m oving the inde x e s (a nd trigge rs) from the ta rge t ta ble .

Performance and scalability O n a re gula r ba sis, Syba se Ada ptive Se rve r Ente rprise on Sun ca pture s the #1 TP C be nchm a rk for SMP pe rform a nce , che ck syba se .com for the la te st re sults. Sca la bility: Syba se 15 sca le s from ha ndhe ld de vice s to e nte rprise le ve l se rve rs.

Price and Support P rice pe r se a t is re la tive ly high, com pa re d to othe r ve ndors. Support is a chie ve d by ope ning "TAR " ca se s with the support te a m . R e sponse is usua lly within 48 hours.

Price P rice pe r se a t is a ve ra ge , com pa re d to othe r ve ndors; Syba se ASE is the le a de r in lowe st tra nsa ction cost, with the be st pe rform a nce , a m ong the le a ding e nte rprise da ta ba se ve ndors. Support is a chie ve d by ope ning ca se s with the support te a m . R e sponse is usua lly within 24 hours. Management and Development Tools (for Windows) ISQ L is the inte ra ctive que ry tool use d with Syba se ; it is use ful for e nte ring que rie s a nd store d proce dure s. Syba se C e ntra l is shippe d with Syba se ASE. It offe rs a good inte rfa ce for pe rform ing ba sic da ta ba se ta sk s. The "be st of bre e d" product in this ca te gory is DBArtisa n by Em ba rca de ro Te chnologie s. Syba se re ce ntly re le a se d W ork spa ce , a n Eclipse ba se d SQ L de ve lopm e nt e nvironm e nt, which fe a ture s a store d proce dure de bugge r a nd gra phica l SQ L cre a tor. For de ve lopm e nt, Syba se Inc. offe rs W ork spa ce , P owe rbuilde r, P owe rde signe r, P owe r J a nd its "Studio" line products. P owe rbuilde r re m a ins the m ost robust, stra ightforwa rd, a nd pra ctica l choice for windows de ve lopm e nt, supporting m a ny othe r R DBMs in a ddition to Syba se ASE.

Management and Development Tools (for Windows) SQ L-P lus is the inte ra ctive que ry tool use d with O ra cle ; it is use ful for e nte ring que rie s a nd store d proce dure s. C om ple x re porting ca pa bilitie s a re a va ila ble for those willing to le a rn SQ L-P lus e x te nsions. O ra cle Ente rprise ships with Ente rprise Ma na ge r, a full fe a ture d front e nd to the intrica cie s of O ra cle . The m a in a re a s of the syste m (se curity, stora ge , sche m a s) a re m a na ge d by tota lly se pa ra te a pplica tions, which is cum be rsom e a t tim e s. The "be st of bre e d" product in this ca te gory is DBArtisa n by Em ba rca de ro Te chnologie s. Ma ny de ve lope rs choose Toa d, a s it is che a pe r a nd ha s a lot of nice fe a ture s.

A dditional Features of Interest, in Oracle 10g

O R A_R O W SC N Syste m C olum n A tim e sta m p-lik e da ta type on e a ch re cord, use d for upda te consiste ncy. FO R ALL O ption A m e thod by which to pe rform upda te s via 'bulk ' ope ra tions. Significa nt pe rform a nce im prove m e nts ca n be obta ine d via this m e cha nism . P R AGMA SER IALLY_R EUSABLE O ption A m e thod by which pa ck a ge s ca n be m a na ge d in m e m ory m ore e fficie ntly. Function Ba se d Inde x e s This a llows re sults to be pre -ca lce d into a n inde x , e lim ina ting the ne e d for ca lcula tion a t runtim e . DBMS_AP P LIC ATIO N_INFO .SET_SESSIO N_LO NGO P S C om m a nd A m e thod by which to se t sta tus or com ple tion ra te of long running proce sse s. P a ck a ge Initia liza tion Se ction Allows the se tup routine s for a pa ck a ge to occur just once pe r se ssion. Sorte d Ha sh C luste rs Allows groups of re cords to be re a d from disk via a ha sh ide ntife r. W ITH C la use Q ue rie s Allows a que ry to be re fe re nce d a s a virtua l ta ble m ultiple tim e s within a SQ L block .

A dditional Notes, Regarding Sybase A SE

Replication Server Syba se 's e nte rprise da ta re plica tion fa cility is the le a de r in the industry; m ore O ra cle custom e rs purcha se the Syba se offe ring tha n do O ra cle 's own product. Encryption ASE 15's ne w pa te nt-pe nding e ncryption te chnology a llows se a m le ss e ncryption of colum ns with little or no cha nge to m ost a pplica tions. Computed Columns ASE 15 supports both m a te ria lize d a nd virtua l com pute d colum ns; this e lim ina te s the ne e d to pe rform C P U-inte nsive ca lcula tions a t runtim e . Functiona l inde x e s ca n be built on the se colum ns.

Anda mungkin juga menyukai