Twin Cities Oracle Users Group


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Total Dollars: Top 3 are 75% of total database sales Source: IDC Competitive Analysis: The RDBMS Top 10: License Sales Analysis and Market Forecast, 2002 - 2007 Nov 2003 Unix Windo Linux Ot Main Oth Total Maint Total Totals: 2605 3327 225 16 1370 372 7916 4725 12641
  • License revenue only. Microsoft did not have any maintenance revenue in 2002 and 2001 for SQL Server 2000, but it now has maintenance available. Oracle and IBM’s 2001 maintenance revenue is not in the study 2003 increase is from Oracle press release Oracle Looking for more Linux sales, migration from lesser players - Sybase, Progress, Informix, plus new 10g database MS Annual Report 2003 - Server and Tools revenue was $5.84 billion, $6.16 billion, and $7.14 billion in 2001, 2002, and 2003. Server and Tools consists of server software licenses and client access licenses (CALs) for Windows Server, SQL Server, Exchange Server, and other servers. It also includes developer tools, training, certification, Microsoft Press, Premier product support services, and Microsoft consulting services. Total Server and Tools revenue grew $983 million or 16% in fiscal 2003, driven by an increase in Windows-based server shipments and growth in SQL Server and Exchange revenue. Server revenue, including CALs, grew $787 million or 18% from fiscal 2002 as a result of increased new and anniversary multi-year licensing agreements.
  • Install data - FactPoint survey in 2002 Market share - AMR Research, The Enterprise Application Spending Report 2001-2006 released Sep 2002
  • DBCC - database checking and consistency command
  • Oracle - database the physical files and instance as the memory structures and processes to interact with the database. Undo tablespace is new for 9i SQL Server 2k an instance is a complete, near independent installation of SQL Server that includes: 1. Binaries and associated options (mandatory and optionally installed) 2. Windows Services and associated registry entries 3. System databases, their physical database files, log files and other example databases associated with the instance. The control file is critical to an Oracle instance, it stores a variety of information such as: Database name Timestamp of DB creation Names and locations of database files and redo logs Tablespace information Archive Log history Checkpoint information SQLServer-The control file is basically the master database. Without it the instance will not be able to start as it consists of all the information about other system and user databases. The master database can also be viewed the system tablespace to some degree, but it distributes its data dictionary objects with other system and user databases (such as MSDB). The data dictionary within SQL Server is a series of system tables with the sys prefix owned by the internal user dbo Back up all master, msdb, model system dbs. An Oracle tablespace can have one of more data files. Within SQL Server, a file-group can have one or more datafiles. Objects can span multiple data files in its file-group as they can do within Oracle tablespace data files. If there is more than one data file per file-group, then SQL Server will stripe (store) data evenly across each of the datafiles (based on the % free space within each data file). The DBA cannot Offline/Online a file-group like you can an Oracle tablespace. As an Oracle database has two or more redo logs, so each database within a SQL Server instance has a transaction log file that is further divided into smaller logical log files. There are no rollback segments in a SQL Server database. Because of this, writers can block readers and SQL Server’s locking mechanism is much more complex that Oracle’s with a higher probability of locking problems with long running, non-committed transactions.
  • Think of a SQL Server instance as a new installation of SQL Server. Multiple installations of SQL Server on the same server - introduced named instances . 16 per server max. Allows you to have, say, a SQL Server 2k instance running Service Pack 2 installed and other running Service Pack 1 on the same server. In context to Oracle, its like having v8.1.5 and v8.1.6 running on the same server. Common Files: COM (DLL’s) Replication Full text search Directory service integration Import OLEDB provider etc Tools: Enterprise Manager Command line and GUI query analyser tools BCP, Bulk Insert etc DTS Run command line Rebuild Master DB utility Wizards Books online (BOL) SQL Templates Each instance maintains what is left over, namely their data files and complete set of executable files. It is important to remember that the MDAC (Microsoft Data Access Components, is not instance dependent, it is a server wide API for all data access (ADO, OLE-DB, ODBC). Therefore, care must be taken between service packs and even other SQL Server installations as they may inadvertently “break” existing products. When a new user database is created within an instance, its structure is modelled from the MODEL system database. The DBA may customise selected properties of MODEL to reflect these within any new database created. When a SQL Server DBA talks about “SQL”, some are actually referring to the product “SQL Server” rather than the SQL language. No equivalent of INIT.ORA in SQLServer - use registry entries, settings in master database, service startup parameters (sqlsrvr.exe). Also, no environment variables in SQL Server - only registry entries for each instance
  • Oracle provides fine grain control over virtually all aspects of the memory (and storage) engine, whereas SQL Server provides very little control. This is not necessarily a bad thing in a majority of cases. SQL Server runs with a similar architecture to that of its underlying operating system, via a pool of threads that asynchronously perform a variety of tasks on behalf of the DBMS and its related engine components (storage, relational etc). SGA (SQLServerAddress Space)-The maximum address space for SQL Server is 2Gb, this can be extended via the /3GB switch in the operating systems boot.ini file. Each instance has own address space and memory pool. View threads under sqlsrvr.exe with DBCC SQLPERF (UMSSTATS) and DBCC SQLPERF(THREADS). This memory allocation is controlled via the –g parameter on instance startup and defaults to 128Mb. DBA only sets startup, min, max memory. Consider setting the maximum RAM by 10 to 20% less that the total server memory for dedicated database servers. The buffer cache is a dynamic pool of buffers (8k pages) read from the physical data files and is equivalent to the Oracle buffer cache. All subsequent reads/writes to physical data files occur via the buffer cache. The cache itself consists of: Linked list - to all free buffer pages Each buffer page has a header that, among other things, contains a reference pointer that is incremented when SQL statements reference the page. The increment may differ internally. A value of zero on the reference counter marks the page as dirty. A write is then scheduled. A global pool of worker threads via the user connection will manage writes and reads from the cache. The Oracle buffer cache goes many steps further than SQL Server in terms of configureability and control, for example: Default, Keep or Recycle pools (multiple buffer pools), sizing, different block-size buffers. SQLServer - no control on block size of buffers. The redo log buffer in Oracle is a circular buffer of redo entries (which are any changes made by any insert, delete, update, create, alter, drop statement) stored sequentially in the SGA and controlled via the log buffer parameter. The background process lgwr writes the redo log buffer entries to the current active online redo log file. In a SQL Server instance we have a single log cache memory structure for all databases within the instance; there is a series of cache buffers for each database within the instance. For every change made to a buffer cache page a log cache entry is made recording the change, this must be written to the databases transaction log before the dirty buffer cache record is written (flushed) to disk. This process is essential to ensure effective rollback during database or user transaction recovery. Due to this write-ahead strategy of log-cache transaction log buffer cache flush the transaction log is at times called the write-ahead log.
  • In a UNIX environment, most Oracle processes are part of one master Oracle process, rather than being individual processes. On Windows NT, all processes consist of at least one thread. A thread is an individual execution within a process. Threads enable concurrent operations within a process so that a process can run different parts of its program simultaneously on different processors. A thread is the most fundamental component that can be scheduled on Windows NT. LMS- Lock Process RECO- Recoverer Process PMON- Process Monitor SMON- System monitor CKPT - Checkpoint ARC0 - Archiver (numbered) DBW0 - Database writer (numbered) LGWR - Log Writer D000 - Dispatcher Process
  • Each database connection is managed via a worker thread no matter the underlying DB-Library provider. In SQL Server, each connection is through a database instance login , which defines instance wide privileges, language and other basic properties for the associated process (SPID) managed via a worker thread. The connection itself is controlled via the UMS (user mode schedular) as described in the Memory Structures section. The properties of each SPID can be monitored via the sp_who and sp_who2 stored procedures or by querying the master..sysprocesses table. The DBA determines which of the databases within the instance the login can access, these are called database users ; The login to user mapping exists separately for each instance database with their own database level privileges (i.e. 1 login to many database users within the instance). The sysprocesses table has a variety of information that the DBA may be interested in, namely the ECID (execution context ID in which threads are running under for the SPID, KPID (current NT thread managing the SPID), CMD (command being executed) and much more. Such information may be present in the server error logs on occasions.
  • SQLServer does not support multiple block sizes or variable extents. In Oracle, we have the logical allocation of space based on blocks extents segments , with blocks being the finest level of granularity for storage. Oracle allows the DBA to specify different block sizes for each tablespace (up to 5 standard sizes in 9i) SELECT SEGMENT_NAME, BYTES, BLOCKS FROM DBA_EXTENTS WHERE SEGMENT_TYPE = 'ROLLBACK'; SEGMENT_NAME BYTES BLOCKS --------------- --------- -------- RS1 10240 5 RS1 10240 5 SYSTEM 51200 25 SYSTEM 51200 25 SYSTEM 51200 25 Notice that the rs1 rollback segment is comprised of two extents, both 10K, while the SYSTEM rollback segment is comprised of three equally sized extents of 50K. There are eight different page types in SQL Server : data index text/image global and secondary allocation map – what extents (64k contiguous) are allocation page free space – information about page free space index allocation map – extent information about index allocation bulk change map – lists extents modified from bulk operations since last log backup differential change map - extents modified since last backup database command Since SQL Server has fixed page sizes the extent size is also fixed at 64k (8x8k pages) and is contiguous in its storage. This is the smallest IO call SQL Server will make. The idea of the DBA pre-allocating extents to objects or change extent size is non-existent in SQL Server. The fillfactor option is used in place of pctused in Oracle. You cannot use this option in create table command though, it is only used when indexes(clustered or non-clustered) are created. When DBA’s of SQLServer talk about defragmentation, it is usually in context with indexes and rebuilding them to resolve storage issue and page splitting. The default fill factor is zero, this is similar to 100% but with space for one record left at the higher level of the index nodes.
  • It is worth mentioning that in Oracles’ locally managed tablespace, the tablespace manages its own extents via a bitmap structure for each datafile to track free or used blocks. As the uniform extents are allocated and deallocated the bitmap entries for the associated blocks are also altered. On top of this, there is no requirement for coalescing free extents to consolidate fragmented free space as all extents are uniform in size (unlike dictionary managed tablespaces). In SQL Server, “free space management” in terms of a ‘free-list’ entries consists of two page types: GAM – global allocation map page Tracks extent allocation 1 x GAM = 64k extents (4Gb data) One bit for each extent 1 = free, 0 = allocated SGAM – shared global allocation map page Tracks those extents that have mixed pages and have at least one unused page 1 x SGAM = 64k extents (4Gb data) 1 = extent is mixed and has free pages 0 = not used as mixed, or, is a mixed extent whose pages are all in use. A PFS (page free space) page records individual page allocations within the data file. The page itself is a bitmap structure similar to the GAM and SGAM but only covers 8000 pages at a time. The value of the bit denotes the percentage full within the pages for an extent, for example: Empty 1 - 50% 51 - 80% 81 - 95% 96 - 100% The PFS bitmap is constructed as extents are allocated. Finally, we need to discuss IAM’s (Index Allocation Maps). These are critical as they map the extents in a database file used by the heaps (non-indexes tables), indexes (including clustered indexed tables) and blob objects (ntext, image, text pages). Each object has at least one IAM so long as: the object has data allocated the object did have data, but it was “deleted” rather than truncated. The IAM’s are linear linked lists and are scattered throughout the data file as the objects within it acquire space. If the file-group has more than one data file then remember that storage will be allocated evenly over the data files based on the total % free space in the data files, therefore IAM linked lists will span the physical data files within the logical file-group.
  • Oracle query: COL PRODUCT FORMAT A35 COL VERSION FORMAT A15 COL STATUS FORMAT A15 SELECT * FROM PRODUCT_COMPONENT_VERSION; PRODUCT VERSION STATUS ----------------------------------- --------------- ---------- NLSRTL Production Oracle9i Enterprise Edition Production PL/SQL Production TNS for Solaris: Production SQL Server 2000 - now at service pack 3
  • Section 7 - Pricing - More Detail Enterprise - more features than standard, often relating to managability and analytics for BI (business intelligence) SQL Server - Standard - one instance per license; Enterprise - as many instances on same server as you like Per Processor - flat fee, good for large number of users - compare to units pricing SQL Server - user and device CALs - cost is same per CAL To see SQL Server license type, use Query Analyzer (isql or wsql): select SERVERPROPERTY('LicenseType') select SERVERPROPERTY('NumLicenses')
  • FAT - file access table NTFS - NT file system Virtual Memory - 200 MB start, 400 MB max Source - Alexander Chigrik article
  • Windows 2003 Server - service pack 3 must be applied to SQL Server 2000 Analysis Services - 130 MB typical Source - Microsoft Web Pages
  • oradim.exe Create instance of the NT service svrmgrl / SQL*Plus To run our hand written DB script and run cat%.sql files to build dictionary. SQLNet Config Configure network connectivity and listener or Database Configuration Assistant (GUI) 1 Place binaries in ORACLE_HOME 2 Create 1 or more databases with script or GUI
  • Install is automated with wizard. Answer the questions to create database and instances. Wizard first creates “SQL Server 2000 Licensing Setup” on Settings-Control Panel Select PerSeat - enter # of CALs, or Processor - enter # of processors
  • 2 - redo logs on separate disks; RAID0 - striped, RAID 1 (mirror), RAID 10 mirrorred then striped, RAID0+1-striped then mirrored; control # rows in datablock 3 - Oracle Managed Files - automatically maintain tablespaces, redo logs, control files. Good for logical file systems - striped (RAID), and large, extensible files 4 - used for name and location of database in network structure. DB_NAME & DB_DOMAIN initialization parameters 5 - used at startup. Ex: spfile.ora - for Real Application Clusters - all instances use this
  • 6 - character set, alt char set, character superset if mult 7 - to include more time zones 8 - use rather than rollback segments; faster and managed for you User sys, system, create users 2 sets of privileges: sysdba - can create databases, be duplicate of sys user sysoper - everything but create databases, can’t see user data Startup/Shutdown;Alter database;Archivelog & Recovery;restricted session
  • Concept of Filegroup Be aware of SQL Server data striping. If you have two or more database files for a single file-group, SQL Server will automatically stipe data across these based on the percentage of free space with each data file. Tend to see very little IO activity around the master , msdb and model system databases. So place in one location. The tempdb database, used for temporary sort, group-by and other operations like the temp tablespace in Oracle, may need to be placed on its own array. The issue with the tempdb is its size and trying to justify its own disks (the minimum is typically 18Gb or 36Gb). A server with large amounts of RAM and very short transactions manipulating small amounts of data will rarely use the tempdb. As an example, Chris Kemper’s 2Gb production database with over 900 online users, 4Gb of RAM, sees the maximum tempdb of 800Mb.
  • 3 - Will you have named instance or default instance? 4 - As with Oracle installation under NT, the NT account you are using on installation is called the service account in which associated DBMS services and further installation and administrative tasks will occur under. In many cases (the quick and dirty method), the DBA will use the administrator account as it provides complete access to the server and its resources, reducing the possibility of any flow on issues related to the system privileges. Alternate way - create NT user, assign admin group priv, do install as new user, login as administrator, give new user exclusive rights to installed db, remove user’s admin group priv Windows 2000 - can set up encrypted file system for database and/or backup files
  • Authentication mode for the instance i. Mixed mode (windows and SQL Server authentication) ii. Windows authentication The Windows Authentication mode is the same as OPS$ (external Oracle authentication) only, and Mixed is both Database and Windows Authentication. Mixed mode will require you to enter the sa account password to complete mixed authentication, guard this login/password religiously, it is equivalent to the sys login with Oracle. The service account in which SQL Server is installed will be the Windows Authentication user, and you will be able to connect to the instance with no password (OS managed). The BUILTIN/Administrators SQL Server login will provide this seamless authentication via the equivalent OS group that can be removed to provide better security. I recommend Mixed Mode where possible with a complex SA password that is rarely used. This ensures that a DBA inadvertently locking themselves out when altering windows authentication privileges or server configuration is not a completely lost cause. To complete the installation, the setup will finally prompt you for the default server network (listener) properties and the supported network libraries that can be used. Thestandard libraries include named pipes and TCP/IP (a port of 0 equates to port 1433 or SQL Server will pick a random port on first ever connection and retain it). The named pipe will be \. pipeMSSQL[$]<instancename> . The server will not be hidden from the network.
  • In SQL Server, one of the biggest problems related to overall system performance and stability is the poor handling of transactions, especially long running ones. Remember that it is critically important for your OLTP systems under SQL Server to keep transactions as short as possible to ensure blocking and lock escalation is kept to an absolute minimum.
  • undo is optional in 9i, Release 2 - users can still choose to use rollback segments if they want to. Also, the underlying technology has not changed with the introduction of Undo - Undo is nothing other than the DB managing the rollback segments instead of the DBA. DBA's can choose to retain that responsibility if they think it would be more beneficial, simply by the setting in the parameter file Oracle moving away from rollback segments within a rollback segment tablespace, to an undo tablespace with automatic undo management . At the start of a transaction, the DBMS assigns it a rollback segment and records the current SCN (last completed commit point). As the transaction continues with any variety of DML, the DBMS uses the rollback segment to: store before image of altered (updated or deleted) data, store newly inserted data, assist the DBMS in constructing a read-consistent view of the database objects as at the start of the transaction (defined by SCN). To do this, the DBMS will look up existing and other rollback segments to construct a read-consistent view. Programmer can start a transaction, issue a commit or rollback on it. The Oracle 9i flashback option requires AUM. For redo management. Oracle utilises two or more redo log groups, consisting of one or more physical files (members) per redo group. The redo logs store all changes (there are some variations to this) made to blocks in the buffer cache and are key for recovering committed data that has yet to be written to the actual database files. Within the Oracle DBMS, a checkpoint is a database event that synchronises altered data blocks in the buffer cache with the physical data files. The DBWR process on certain conditions, such as every 3 seconds, on a redo log switch or how full the buffer cache is with committed dirty buffers, manages the write event. The CKPT process will update the control file and data files to indicate the last completed checkpoint with the SCN (system change number). Oracle DBA has a lot of control over this.
  • The key to rollback and redo for SQL Server is the transaction log that is present in each database within the instance. The transaction log is a serial record of all transactions (DML and DDL) executed against the database and is used to store:a) start of each transaction b) before and after changes made by the transaction c) allocation and de-allocation of pages and extents d) commit and rollback of transactions e) all DDL and DML The transaction log itself consists of one or more physical database files, the size of the first must be greater than or equal to 512Kb in size. SQL Server breaks down the physical file into 2 or more logical transaction logs. The size of the file and its auto-growth settings will influence the number of virtual logs and their size. The DBA cannot control the number of or sizing of virtual logs. The log writer thread manages the writing of records to the transaction log. When the database is using a full or bulk-logged recovery model, the non-active portion of the log will only become “free” (can be overwritten) when a full backup or transaction log (archived log backup in Oracle) backup is executed. This ensures that recovery is possible if need be via the backup and the DBMS can happily continue and overwrite the now free log space. If the database is using the simple recovery model at a database checkpoint, any committed (and check pointed) or rollback transactions log space will become immediately free for other records to use. Therefore, point in time recovery is impossible. The checkpoint process is key to completing the committed transactions and writing the dirty buffers back to disk. In relation to the transaction log, this will:a) write log entry for the start of the checkpoint b) write the start LSN (log seq #)for the checkpoint chain to the database book record for subsequent recovery on instance failure c) write list of active (outstanding) transactions d) write all dirty log and data pages to disk e) writes a log file record marking the end of the checkpoint DBA cannot control checkpoint, other than recovery interval and mode. Automatic checkpoints occur: based on the recovery interval parameter and the number of associated log entries to fulfil the parameters setting. Database transaction log becomes >=70% full , Result of a manual CHECKPOINT, Selected DBCC commands are run, Backup command issued, Instance shutdown, offline database, read-only the database. NT service stopped
  • SQL Server - the locks are taken out against the database,and also against the master and tempdb databases. See Next Page: Oracle never escalates locks. The SQL Server locking schemes are completely automatic in context with the isolation level, with lock escalation as needed be to fulfill the request Where possible, SQL Server will start at the lowest granularity of locking and in terms of exclusiveness, then use a variety of other lock types at higher levels to pre-empt future intentions and escalations on the underlying object.
  • Locks: INTENT (I) – future intention to acquire other locks SHARED (S) – allows many concurrent reads, blocks updates until share is released, there is always 1 shared lock on the DB for the connection. UPDATE (U) – prior to data modification, is upgraded to exclusive on change EXCLUSIVE (X) – complete lock of the resource SCHEMA (Sch-[M,S]) – Schema modifications, DDL, schema stability lock BULK UPDATE (BU) – Bulk copy of data (bcp) with TABLOCK hint RANGE[I]_[S,U,X,N] – Key range lock, used in serialized transactions, covers index keys and the ranges of the index rows. Resources: RID Row Identifier PAGE Page (data or index) EXT Extent (8 contiguous pages, data or index) TAB Table IDX Index FIL File KEY Key (row lock with index) DB Database Status against a resource: GRANT Lock obtained WAIT Blocking due to another process CNVRT In processes of being converted (escalation)
  • Oracle includes the following lock types (may not be definitive): a) DDL a. Protect the schema objects and their definition. b) DML a. Ensures only one row can be updated at any one time. b. Objects cant be dropped whilst transactions are pending c. Row or table level i. TX – row level lock 1. readers do not wait for writers for the same data 2. writers not wait for readers (for update excluded) 3. writers wait for other writers over the same row 4. table level shared lock is also taken. ii. TM – table level locks 1. RS (SS) – row share 2. RX (SX) – row exclusive 3. SRX – share row exclusive lock 4. X – exclusive c) Latches d) Distributed (OPS) e) PCM (parallel cache management) used in the shared server configuration. The SQL Server programmer can alter the databases default isolation level on connect (ADO, OLEDB, ODBC property), T-SQL or via a SQL hint.
  • KEY locks are shown when the table has a clustered index rather than showing rowlocks. For non-clustered indexes the KEY locks exist for the leaf nodes. Locks may be retained until the transaction is complete; this is especially the case with shared locks over a repeatable read isolation level.
  • Transactions operate against a database of nine tables. Transactions do update, insert, delete, and abort;primary and secondary key access. Response time requirement: 90% of each type of transaction must have a response time  5 seconds, except stock-level which is  20 seconds. Tests included to demonstrate ACID properties met. Atomicity -Verify that all changes within a transaction commit or abort. Consistency Isolation ANSI Repeatable reads for all but Stock-Level transactions. Committed reads for Stock-Level. Durability Must demonstrate recovery from Loss of power Loss of memory Loss of media (e.g., disk crash)
  • We don’t know whether Microsoft tests are for Access or SQL Server, don’t know what hardware / Windows OS We don’t know version(s) of Oracle and hardware / OS
  • These results were on on Jan 8, 2004 These configurations cost approx $5 million -multiply tpcC * cost per tpcC
  • The SQL Server 2000 configurations cost about $50K The Oracle configuration did not make the top ten for price / performance - it costs about $500K; no Oracle configurations shown were for Windows Operating Systems The real question is what configuration can an enterprise run on Vendors can choose to submit whatever configurations they want to TPC Organization The New-Order transaction response time set at 5 seconds. Therefore, for a 710 tpmC number, a system is generating 710 New-Order transactions per minute while fulfilling the rest of the TPC-C transaction mix workload. In general, TPC benchmarks are system-wide benchmarks, encompassing almost all cost dimensions of an entire system environment the user might purchase, including terminals, communications equipment, software (transaction monitors and database software), computer system or host, backup storage, and three years maintenance cost. Therefore, if the total system cost is $859,100 and the throughput is 1562 tpmC, the price/performance is derived by taking the price of the entire system ($859,100) divided by the performance (1562 tpmC), which equals $550 per tpmC.
  • Oracle Trace is a general-purpose data collection product and is part of the Oracle Enterprise Manager systems management product family. The Oracle server uses Oracle Trace to collect performance and resource utilization data, such as SQL Parse, Execute, Fetch statistics, and Wait statistics. UTLBSTAT,UTLESTAT,STATSPACK are PL/SQL routines and packages. You can use Oracle Trace to collect workload data for use in the Oracle Expert application While using Data Viewer, you can select one or more rows in the top portion of the Data View window to save to a file. When you choose SQL (SQL Analyze Format) from File/Save, a file containing query text is saved. You can then import this *. sql file into Oracle SQL Analyze for tuning of the selected statements. Oracle SQL Analyze can show you the execution plan for individual queries and let you experiment with various optimizer modes and hints. The Oracle server has been coded with Oracle Trace API calls to collect both SQL and Wait statistics with a minimum of overhead. Using the Oracle Trace Manager graphical user interface you can: Schedule collections. Filter collections by user. Filter collections by type of Wait event. Format collected data to database tables to preserve historical data. View SQL and Wait statistics using Oracle Trace Data Viewer.
  • Tracing database events and users sessions in SQL Server is done via the profiler utility. This is a powerful GUI tool that allows the DBA to: a) trace a range of database events a. including grouping of events and selectively picking data columns to be used b. apply filtering rules to further define the events you are after c. save output to a file (can set max size) or a database table (set max rows) and optionally enable trace stop time. b) edit and define trace templates c) replay saved traces (including break-points and stepping through a trace) d) scripting a trace e) running trace file results through the index wizard f) assist with auditing and of course performance tuning g) error tracing and blocking/locking detection
  • The SQL Trace facility and TKPROF let you accurately assess the efficiency of the SQL statements an application runs. For best results, use these tools with EXPLAIN PLAN rather than using EXPLAIN PLAN alone. Set Trace on through calls in PL/SQL. The EXPLAIN PLAN statement displays execution plans chosen by the Oracle optimizer for SELECT, UPDATE, INSERT, and DELETE statements. A statement's execution plan is the sequence of operations Oracle performs to run the statement. The row source tree is the core of the execution plan. It shows the following information: An ordering of the tables referenced by the statement An access method for each table mentioned in the statement A join method for tables affected by join operations in the statement Data operations like filter, sort, or aggregation In addition to the row source tree, the plan table contains information about the following: Optimization, such as the cost and cardinality of each operation Partitioning, such as the set of accessed partitions Parallel execution, such as the distribution method of join inputs
  • SQL Server automatically creates and updates query statistics on indexed columns (as long as automatic query statistic updating is not disabled). Additionally, statistics can be updated on nonindexed columns either manually, using SQL Server Query Analyzer or the UPDATE STATISTICS statement, or automatically, if the auto update statistics database option is set to true . Up-to-date statistics are not dependent upon date or time data. If no UPDATE operations have taken place, then the query statistics are still up-to-date. Microsoft SQL Server offers three ways to present information on how it navigates tables and uses indexes to access the data for a query: Graphically displaying the execution plan using SQL Server Query Analyzer In SQL Server Query Analyzer, click Query and select Display Execution Plan . After executing a query, you can select the Execution Plan tab to see a graphical representation of execution plan output. For more information, see "Graphically Displaying the Execution Plan Using SQL Server Query Analyzer" in this volume. SET SHOWPLAN_TEXT ON After this statement is executed, SQL Server returns the execution plan information for each query. For more information, see "SET SHOWPLAN_TEXT" in Microsoft SQL Server Transact-SQL and Utilities Reference . SET SHOWPLAN_ALL ON This statement is similar to SET SHOWPLAN_TEXT, except that the output is in a concise format. For more information, see "SET SHOWPLAN_ALL" in Microsoft SQL Server Transact-SQL and Utilities Reference .
  • On NT, use Microsoft’s Performance Monitor to examine CPU utilization - statistics on processor time, user time, privileged time, interrupt time, and DPC time. Performance Manager is part of Oracle Enterprise Manager Diagnostics Pack The Diagnostics Pack can automatically analyze this performance data, display it in a graphical interface, and use alerts to immediately direct you to any performance problems. You can be alerted automatically through email or page when a problem is detected. Oracle Enterprise Manager also includes an integrated diagnostics methodology that uses guided drilldowns and expert advice to help you quickly resolve performance issues
  • The DBA should take a “baseline” data collection using these counters. The interval may range from every five minutes to as little as every twenty seconds (ideally over a range of days). The collection is essential for ongoing performance monitoring, and performance tuning.
  • In SQL Server, we are somewhat restricted in terms of the types of indexes available when compared to Oracle, this may change over time but the time being we only have: a) Clustered indexes - Leaf nodes contain the actual row data pages b) Non-clustered indexes - Leaf nodes are pointers to row data pages, or, if the table also includes a clustered index then it will point to the clustered index leaf nodes (requires a bitmap lookup step in the execution plan). NOTE: If a table has a clustered index and non-clustered indexes, you must create clustered index first. Use clustered index for range queries, columns in order by and group by clauses, can only deframent online via clustered index c) Indexed Views - there are a number of restrictions for when a view can have an index
  • Clusters are groups of one or more tables that are physically stored together because they share common columns and usually are used together. Because related rows are physically stored together, disk access time improves. To create a cluster, use the CREATE CLUSTER statement. Create a clustered index for the entire cluster. Cluster tables that are accessed frequently by the application in join statements. Do not cluster tables if the application joins them only occasionally or modifies their common column values frequently. Do not cluster tables if the application often performs full table scans of only one of the tables. A full table scan of a clustered table can take longer than a full table scan of an unclustered table. Oracle is likely to read more blocks, because the tables are stored together. Cluster master-detail tables if you often select a master record and then the corresponding detail records. Detail records are stored in the same data block(s) as the master record, so they are likely still to be in memory when you select them, requiring Oracle to perform less I/O. Store a detail table alone in a cluster if you often select many detail records of the same master. This measure improves the performance of queries that select detail records of the same master, but does not decrease the performance of a full table scan on the master table. An alternative is to use an index organized table. Do not cluster tables if the data from all tables with the same cluster key value exceeds more than one or two Oracle blocks. To access a row in a clustered table, Oracle reads all blocks containing rows with that value. If these rows take up multiple blocks, then accessing a single row could require more reads than accessing the same row in an unclustered table. Do not cluster tables when the number of rows for each cluster key value varies significantly. This causes waste of space for the low cardinality key value; it causes collisions for the high cardinality key values. Collisions degrade performance.
  • Reverse Key Index Good for b-trees which have “hot” spots - An area where there are many insertions, tree becomes unbalanced. By reversing the keys of the index, the insertions become distributed across all leaf keys in the index. Using the reverse key arrangement eliminates the ability to run an index range scanning query on the index. Because lexically adjacent keys are not stored next to each other in a reverse-key index, only fetch-by-key or full-index (table) scans can be performed. Specify REVERSE in index creation command. Can later alter index to NOREVERSE.
  • Oracle supports the online creation or rebuilding of an index that works for partitioned or nonpartitioned B*-tree indexes, including index-organized tables. Since the table is not locked, DML operations and queries can execute on the base table while the index is being built. For Oracle: The ONLINE keyword may be specified on the CREATE INDEX or ALTER INDEX statement. The new COALESCE keyword may be specified to defragment the index
  • Don’t use with Rule-based optimizer Note: The cost-based optimizer is the one Oracle recommends You need statistics on the data in the tables to be gathered and stored in the data dictionary. Do this at regular intervals with DBMS_STATS. Statistics generated include the following: Table statistics Number of rows Number of blocks Average row length Column statistics Number of distinct values (NDV) in column Number of nulls in column Data distribution (histogram) Index statistics Number of leaf blocks Levels Clustering factor System statistics I/O performance and utilization CPU performance and utilization
  • Access the index-tuning wizard via query analyser. The wizard option is under the query menu option and is only available when a connection has been established to an instance and something has been entered into the query pane (even a space is enough), as the option remains greyed out until you do. The wizard works hand-in-hand with the traced output file from profiler or a manual trace via sp_trace. Select all tables, unless of you know for a fact that only a small number of the total tables in your schema are being used. The cool feature here is the projected column, in the example I have projected a growth of 80000 orders over the existing 830 currently in the table. On clicking Next the DBA is asked if the recommendations should be saved to disk and/or for them to be applied immediately or scheduled as a SQL*Agent job on the instance to be run later.
  • SQL Server Stored Procedures always keep record count when run. Can say SET NOCOUNT when in production for more speed. Extended stored procedures (DLL’s) are DLL’s written via the ODS (open data services) API (typically via C++). The associated stored procedure in the master database is a wrapper to the underlying DLL that is loaded and run in the same address space of SQL Server (the calling process). T-SQL does not have packages or concept of public and private routines
  • Real Application Clusters - Oracle Enterprise 9i: For Multiple Instance Systems. Some hardware architectures (for example, shared disk systems) enable multiple computers to share access to data, software, or peripheral devices. RAC takes advantage of such architecture by running multiple instances that share a single physical database. In most applications, Real Application Clusters enable access to a single database by users on multiple machines with increased performance. If you operate Oracle in ARCHIVELOG mode, then when a log file is full Oracle converts it to an archive log file before overwriting the log file with information. In Real Application Clusters, each instance automatically archives its own redo log files, or one or more instances can archive the redo log files for some or all of the instances in the cluster database. If you operate your database in NOARCHIVELOG mode, then you can only make offline backups. If you cannot afford data loss, then Oracle strongly recommends that you use ARCHIVELOG mode. A cluster database comprises two or more nodes that are linked by an interconnect. The interconnect serves as the communication path between each node in the cluster database. Each Oracle instance uses the interconnect for the messaging that synchronizes each instance's use of shared resources. Oracle also uses the interconnect to transmit data blocks that the multiple instances share. The primary type of shared resource is the datafiles that all the nodes access. The shared datafiles are on storage devices.
  • SQL Server 2000 Enterprise - Failover clustering is a process in which the operating system and application software work together to provide continuous availability in the event of an application failure, hardware failure, or operating-system error. Failover clustering provides hardware redundancy through a configuration in which other servers essentially act as clones of the main production system. Not meant for speed-up of the application. SQL Server 2000 is built on multiple instances , which allows SQL Server to simultaneously support up to 16 instances of SQL Server. SQL Server 2000 has extensive support for recovering from a failure of a node in the cluster. If a node fails it can be removed, reinstalled, and rejoined to the cluster. It is then a simple operation with SQL Server 2000 Setup to add the new server back into the virtual server definition. SQL Server 2000 running on Windows 2000 Datacenter Server supports up to four nodes in a cluster . Built on top of Windows Clustering of Windows 2000. Need heartbeat, external network, shared storeage devises. The heartbeat is a private network set up between the nodes of the cluster that checks to see if a server is up and running. This occurs at regular intervals known as time slices. If the heartbeat is not functioning, a failover is initiated and another node in the cluster will take over the services.
  • Federated Database - horizontally partition the data in a set of tables across multiple servers. The distributed partitioned view defined on Server1 is: CREATE VIEW Customers AS SELECT * FROM Customers_33 UNION ALL SELECT * FROM Server2.CustomerDB.dbo.Customers_66 UNION ALL SELECT * FROM Server3.CustomerDB.dbo.Customers_99 This view makes the actual location of the data transparent to an application. SQL Server 2000 partitioned views are updatable. This is crucial for distributing data so that the location of the data is transparent to the application. Updatable views support the full behavior of the original table; nonupdatable views are like read-only copies. The SQL Server 2000 query optimizer supports new optimizations that minimize the amount of distributed data that has to be transferred.
  • Each partition of a table or index must have the same logical attributes, such as column names, datatypes, and constraints, but each partition can have separate physical attributes such as pctfree, pctused, and tablespaces. Partitioning is useful for many different types of applications, particularly applications that manage large volumes of data. OLTP systems often benefit from improvements in manageability and availability, while data warehousing systems benefit from performance and manageability. CREATE TABLE sales_list (salesman_id NUMBER(5), salesman_name VARCHAR2(30), sales_state VARCHAR2(20), sales_amount NUMBER(10), sales_date DATE) PARTITION BY LIST(sales_state) ( PARTITION sales_west VALUES('California', 'Hawaii'), PARTITION sales_east VALUES ('New York', 'Virginia', 'Florida'), PARTITION sales_central VALUES('Texas', 'Illinois') PARTITION sales_other VALUES(DEFAULT) Improve processing speed, allow data to be operated on separately
  • In Oracle 9i, we see the release of the oracle redefinition PL/SQL package (DBMS_REDEFINITITION). The process basically allows the DBA to stage schema alterations, for the DBMS to track the changes and to cut them over to the “new” database structure with a simple command and very little downtime to the end-user (if any). This is a very powerful option that is covered in good detail in the article “Don't Shut Down That Database! Use Oracle 9i Online Object Redefinition Instead” There is no equivalent option in SQL Server.
  • With Oracle 9i, National Language Support is extended significantly, now called Oracle Globalisation Support. Previous NLS implementations could only support one national language and character set per database Now support many locales (languages, character sets, sort orders etc) loaded at runtime. This effectively means that single database instance implemented correctly can support error messages, sort orders, date/time, monetary, numeric and calendar conventions of any native language and locale, creating a truly “global” database. SQL Server 2000 has “Collation”. Each user login can be set to language. Collation can be set at database level, column level. Unicode. Can support multiple languages at once.
  • HOT - while database is running RMAN – Recovery Manager: no equivalent in SQL Server. Closest option is Database Maintenance Plans but these are simply wizards that generate scheduled jobs to make life much easier. RMAN is also in Oracle Enterprise Manager as a wizard Import/Export (full) – no equivalent. The best SQLServer has is database scripting (manually run) and BCP (bulk copy data). BCP - bulk copy utility Database Scripting - manual
  • Simple – transaction log (redo log) entries are truncated on completion of a checkpoint. Point in time recovery is not possible. Equivalent to non archived log mode in Oracle. Full – transaction log entries are retained and the log file will grow until the DBA backs up the transaction log and flushes the committed log data to disk (archived log mode in Oracle) Bulk Logged – as per full but selected commands are not fully logged (therefore not recoverable), these include select into, bcp and bulk insert, create index and indexed view creation, text and image operations (write and update text) . Do not alter recovery model properties for any system database. Set recovery model with SQL Server Enterprise Manager or SQL Statement For backups, SQL Server will create one media set per backup set. This means one physical disk file (media set) backup and inside it, a single log or full backup (backup set). It will NOT append backup sets to existing media. DATABASE MAINTENANCE PLAN wizard lets you set up the backup schedule Backup and restore history is stored in MSDB database. Remove old records periodically so a restore will run faster
  • It is important to understand the difference between a media set and a backup set . A physical backup device is the media set, within the media we can store one or more logical backup sets of one or more databases (typically its all the same database). In SQL Server, there is no single backup or recovery statement that will cover all databases within the instance. Consider doing the following: MASTER Full backups, nightly MSDB Full backups, nightly MODEL Full backups, nightly <User DB> Full backups, nightly
  • The differential backup will backup all extents modified since the last full backup , and NOT the last differential. This is very important to understand, especially during recovery. The last differential backup done must be used on recovery; they are not cumulative as log backups are. This helps speed recovery. But can’t recover to a specific time. All must be recovered. In SQL Server, the differential backup will backup any 64Kb extent that contains an altered page within the database. Remember this when viewing the backup size of the media set as you may be surprised. The tracking is managed by the SQL Server storage engine using the DCM (differential change map) page present in each non-log data file. In Oracle, differential backups are known as differential incremental backups that are supported within RMAN and it is also possible to do cumulative database exports. A differential backup is not supported in Database Maintenance Plans (should change in the next version of SQL Server), therefore the DBA needs to resort to writing their own scripts. In many cases, full and log backups will suffice, but can slow the recovery process when applying large numbers of archived log files. This is where differentials can be used to speed the recovery process.
  • Transaction log backups are the same as archived redo log backups in Oracle. Remember that a transaction log exists for each database within the SQL Server instance and is a mandatory requirement for the database to exist. The log backup is supported via Maintenance Plans, making it very simple for the DBA to quickly set up full backups with scheduled log backups. Remember that the databases transaction log will continue to fill as committed and non-committed transactions execute against the database. The backup transaction log will write (archive in Oracle) all committed transactions to your selected transaction log backup file (an archived log). Y ou cannot selectively truncate transactions in the log file, it’s all or nothing.
  • Both ORACLE and SQLServer have log shipping. SQL Server Enterprise Edition has Wizard to ship transaction logs to another server - “warm” backup. Write two DTS packages on the primary server, one to do a full backup and the other a log backups. Perform steps necessary to keep standby server in ready mode - instance duplication, detect when primary goes down, constant connection, etc. Oracle - DATA GUARD (logs can also be manually configured and managed by DBA) By default, broker management of the primary database resource object is enabled in the online state with the log shipping turned on ( READ-WRITE-XPTON state), a physical standby database resource object is enabled in the PHYSICAL-APPLY-ON state, and a logical standby database resource object is enabled in the LOGICAL-APPLY-ON state. You can change the state of the database resource using the ALTER RESOURCE command, but not when the resource or a configuration is disabled.
  • Recovery in Oracle is either: a) manual via svrmgrl / sqlplus b) via RMAN c) via 3rd party product d) Enterprise Manager In SQL Server, we use variety of methods: a) rebuildm.exe (from setup CD for rebuilding the system databases) b) Enterprise Manager and its GUI wizards c) Query Analyser (GUI or command line version) d) SQL Server Service Control Manager SQL Server: Kill off user connections If Restore can’t fit on disk: SQL Server wants to restore the database files to the same size as at the time when they were backed up. There is no option to alter the physical file size (i.e. shrink) during the restore.
  • SMP - symmetrical multi-processing SQL Server Standard - 1 license for each instance SQL Server Enterprise - as many instances of same server as you want under single license Also, SQL Server has Developer Edition, Personal Edition
  • Enterprise - all of Standard features, plus: (1) Scalability (2) Availability/uptime (3) Performance (4) Advanced analysis 64-bit: Intel Itanium-based servers Fail Over Clustering - 32-bit: 4 nodes; 64-bit: 8 nodes Indexed Views - indexes placed on views 40 different languages OLAP - Online Analytical Processing - large OLAP cubes System Area Network (SAN) - Compaq ServerNet II, GigaNet cLAN
  • CALs - cheaper than CPU if <= 25 CALs for standard, <= 75 CALs for enterprise CAL - legal document only, device - per machine, cheaper whenever not all users log in at once CPU license - need license for each CPU in operating system instance running SQL Server. Cost effective when not all processors of a server are activated, or when multiple instances of SQL Server will run on a server accessing same processors With CALs: Enterprise - $7449 for server; Std - $789 for server + $146 per CAL Pricing Discounts from these retail numbers Windows Server pricing - more complex than shown: Windows 2000 server - 1 license for each SQL Server copy installed Windows Server 2003 - 1 license for each server; SQL Server Pack 3 or later must be applied Editions for: Developer, Personal, Windows CE (must also have developer + CALs), Evaluation
  • Get new versions of software as part of the assurance program Software payments can be spread over term of volume license agreement Problem resolution for server software Technet Concierge Chat Extends support for your version of software up to 2 years after end date of official Microsoft support Windows Source Code, not application source code Corporate Error Reporting - collects statistics and error messages for company, sends them to Microsoft
  • Oracle Fail Safe Configures and verifies Windows clusters and automatically fails over Oracle databases and applications. Flashback Query Recovers from from mistakes by restoring data prior to an erroneous transaction. Oracle Enterprise Manager Comprehensive management framework supports multiple, heterogeneous environments; includes centralized console for single point of management, real-time monitoring, and distributed database management. Oracle Text Adds powerful text search and intelligent text management; indexes any document or textual content to add fast, accurate retrieval. Open System Gateways Transparent access to data stored in heterogeneous non-Oracle distributed environments via SQL. Mainframe Integration Gateways Integrates the major types of mainframe-based data into an Oracle environment. Also, Oracle Personal Edition, Oracle Lite
  • Oracle Data Guard Creates, configures, and manages standby databases. Oracle Transparent Application Failover Ensures applications and users are automatically & transparently reconnected, queries continue uninterrupted, and login context is maintained. Virtual Private Database Restricts data access at the row level; supports fine-grained access control on tables, views, and synonyms. Database Resource Manager Enables the prioritization of database operations by applying system resources according to business priorities defined by the administrator. Oracle Streams Enables propagation and management of data, transactions, and events in a data stream within a database, or from one database to another. Oracle Partitioning Enhanced data management environment for OLTP, datamart, and data warehouse applications; adds significant manageability, availability, and performance capabilities to large underlying database tables and indexes.
  • Named User - requires #users times number of CPUs 2 CPUs and 25 users requires license for 50 named users
  • Named user minimums apply to options, too Internet Application Server - 10 named user minimum
  • This came from Oracle Web Partner Price List. Named Processor Update Support Update Support Std1 $29.25 $13.65 $899.25 $419.85 Standard $45 $21 $2,250 $1,050 Enterprise $120 $56 $6,000 $2,800 One study said Oracle’s support was 15% of license fee per year, plus 7% for phone support. Looks like upgrade is about 15% of license fee, support is 7% of license fee. 5-user: $975 * .15 = $146 25-user 1-CPU: ($800 + 25 * $195) = $5,675 * 15% = $851 Oracle contract says support won’t increase more than 4% annually
  • Total Cost of Ownership - Sum the costs over desired time horizon - expected useful life of system - 3 or 5 year horizon The lowest total cost of ownership is the winner Sometimes downtime will be the biggest dollar amount, so you are projecting something that is not really known.
  • Used a 5-year horizon, many assumptions
  • This came from Oracle Web Page comparing Oracle Support to Microsoft Referenced Input Market Research, but the link no longer existed. Search of Input w/ google search engine - article not found No way to get back to original costs and assumptions Data is already over 1 year old - that is old in this industry Conclusion: Go through your own scenario to calculate TCO
  • Oct 2002 (a little old) DM - Ora has more data cleansing and reduction, has 2 major data models - star + constellation. MS has all 3 (snowflake,too) BSp - MS has built-in reports for some vertical and horizontal areas. Ora has no verticals, but more horizontals DMA - Ora has advanced data mining+predictive analysis methods.MS-basic analysis ID - Ora has more personalized info deliv, graphical outline in gif,png,and jpeg. Adapters to some ERP,CRM,procurement,SCM sys. Con - MS - everything on Windows platform and in db. Ora uses 3 products - database, 9iAS application server, e-business suite Int - MS - IIS web service, .NET adapter Ora - Apache web serv, adapters to bus apps JDE,Psoft,SAP,Siebel; EJB, Corba, JCA adapter; can store data in XML Arch - MS - written in C++, only runs on Windows,COM and .NET integration, fault tolerant at web and app server level but not at component and session level - server failures can interrupt users. Ora - written in Java, extremely robust and scalable, load balancing, runs on Solaris, HP-UX, Unix, Linix, Windows 2000/NT. Many levels of fault tolerance. Glo - MS - not all tools are localized Cost - MS - $26K for test, ave deal $50k. Ora - $80K for test
  • Prev page pricing: MS - US$26,196 for the configuration tested, including: US$19,999, SQL Server 2000 Enterprise Edition single CPU. US$5,199, SharePoint Portal Server single CPU plus 5 CALs. US$179, Data Analyzer single user. US$570, Office XP single user. US$249, MapPoint single user. Oracle - US$80,000, including the database, application server, development suite, add-on packs, and Oracle E-Business Suite components. FUTURE: Yukon - enhanced failover clustering, Database Mirror System - 3 SQL Server systems of Principal, Mirror (transaction logs updating), Arbiter of which is Principal if failover; Online Index Operations; Online Restore; DBCC enhancements, incl checksum of pages; T-SQL enhancements to make more compatible w/ SQL ANSI-99; Security Enhancements; XML data types; Varchar(max) to 2GB; Snapshot Isolation to minimize read/write blocking; new table partitioning scheme for very large databases Oracle 10g - Application Server has enhanced caching, wireless and web capabilities; database - grid computing; automated management;
  • New Developments: Consolidation of Database vendors (Sybase, Progress, Informix) Offshore Outsourcing Security Various mobile computing advances - radio-frequency chips for inventory Microsoft .NET Framework Get training and certifications IT Implementation Small-to-medium business - integrated solution without large cash outlay USA Today Nov 2003 - Microsoft sells full ERP suite for $15,000, phase out Great Plains, lowers fees for Mastercard transactions Large businesses - business process integration across companies Implementation
  • Twin Cities Oracle Users Group

    1. 1. Twin Cities Oracle Users Group A Comparison of SQL Server 2000 and Oracle 9i Databases Fred Potthoff, Adjunct Faculty Jerry Heath, Resident Faculty Metropolitan State Univ - MIS Dept January 15, 2004
    2. 2. Introduction <ul><li>Why Compare the databases? </li></ul><ul><ul><li>We often run both databases at one site </li></ul></ul><ul><ul><li>SQL Server is growing up - size / installs </li></ul></ul>
    3. 3. Introduction <ul><li>Who I am - </li></ul><ul><ul><li>Community Faculty - MIS Dept </li></ul></ul><ul><ul><li>MBA from UCLA - Computer Info Systems </li></ul></ul><ul><ul><li>20+ years with relational databases </li></ul></ul><ul><ul><ul><li>Developer and DBA </li></ul></ul></ul><ul><ul><ul><li>Ingres, Teradata/Sharebase, Oracle, SQL Server </li></ul></ul></ul><ul><li>Who I am - </li></ul><ul><ul><li>Resident Faculty, Associate Professor </li></ul></ul><ul><ul><li>Formerly at Univ of Washington and Hawaii </li></ul></ul><ul><ul><li>15+ years teaching </li></ul></ul><ul><ul><li>Set Up SQL Server and Oracle Databases </li></ul></ul>
    4. 4. Overview
    5. 5. Overview <ul><li>Oracle Had 11% increase in DB sales in 2003 </li></ul><ul><li>Microsoft had 18% increase in DB sales 2003 </li></ul>
    6. 6. Overview - 2002 ERP Apps <ul><li>% of Installations Oracle SQLServer </li></ul><ul><ul><li>SAP 76% 3% </li></ul></ul><ul><ul><li>PeopleSoft 72% 7% </li></ul></ul><ul><ul><li>Siebel 81% 4% </li></ul></ul><ul><li>ERP Market Share </li></ul><ul><li>2001 50% 21% </li></ul><ul><li>2002 54% 21% </li></ul>
    7. 7. Topics of Discussion <ul><li>1. Architecture </li></ul><ul><li>2. Installation </li></ul><ul><li>3. Transactions and Record Locking </li></ul><ul><li>4. Performance Tuning </li></ul><ul><li>5. Database Management </li></ul><ul><li>6. Backup and Recovery </li></ul><ul><li>7. Cost and Licensing Arrangements </li></ul>
    8. 8. 1 - Architecture <ul><li>Definition of Database / Instance </li></ul><ul><li>Memory Configuration </li></ul><ul><li>Threads </li></ul><ul><li>Background Processes </li></ul><ul><li>File Structure </li></ul>
    9. 9. 1a - Instances <ul><li>Details about this topic </li></ul><ul><li>Supporting information and examples </li></ul><ul><li>How it relates to your audience </li></ul>
    10. 10. 1a - Instances
    11. 11. 1b - Memory Configuration Oracle SQL Server
    12. 12. 1c - Oracle Memory and Processes
    13. 13. 1c - Threads
    14. 14. 1c - Threads
    15. 15. 1d - Background Processes Oracle
    16. 16. 1e - File Structure
    17. 17. 1e - File Structure SQL Server <ul><li>For Backup Information </li></ul>
    18. 18. 2 - Installation <ul><li>Release Notation </li></ul><ul><li>Product Types </li></ul><ul><li>Platforms </li></ul><ul><li>Install Comparison </li></ul><ul><ul><li>Oracle </li></ul></ul><ul><ul><li>SQL Server 2000 </li></ul></ul>
    19. 19. 2a - Release Notation <ul><li>Oracle </li></ul><ul><ul><li> </li></ul></ul><ul><ul><ul><li>Major release </li></ul></ul></ul><ul><ul><ul><li>Maintenance release </li></ul></ul></ul><ul><ul><ul><li>Application server release </li></ul></ul></ul><ul><ul><ul><li>Component specific release </li></ul></ul></ul><ul><ul><ul><li>Platform specific release </li></ul></ul></ul><ul><li>SQL Server 2000 </li></ul><ul><ul><li>8.0 </li></ul></ul><ul><ul><ul><li>Major release </li></ul></ul></ul><ul><ul><ul><li>Minor release </li></ul></ul></ul><ul><ul><li>Apply service packs - sp3a </li></ul></ul>
    20. 20. 2b - Product Types <ul><li>Enterprise </li></ul><ul><li>Standard </li></ul><ul><li>Licensing: </li></ul><ul><ul><li>Per Processor </li></ul></ul><ul><ul><li>Units </li></ul></ul><ul><ul><ul><li>Oracle - Named User </li></ul></ul></ul><ul><ul><ul><li>SQL Server 2000 - Client Access License </li></ul></ul></ul>
    21. 21. 2c - Oracle Platforms <ul><li>Operating System </li></ul><ul><ul><li>UNIX - IBM’s AIX, HP-UX, Sun Solaris </li></ul></ul><ul><ul><li>LINUX </li></ul></ul><ul><ul><li>Windows NT 4.0, service pack 5 </li></ul></ul><ul><ul><li>Windows 2000, service pack 1 </li></ul></ul><ul><ul><li>Windows 2003 </li></ul></ul><ul><ul><li>Windows XP </li></ul></ul><ul><li>Hardware - IBM, HP, Sun, + Intel </li></ul><ul><ul><li>Pentium 166 MHz or higher </li></ul></ul><ul><ul><li>128 MB RAM - 256 MB better </li></ul></ul><ul><ul><li>Hard Disk: 140 MB System </li></ul></ul><ul><ul><li>4.5 GB Home (FAT) </li></ul></ul><ul><ul><li>or 2.8 GB Home (NTFS) </li></ul></ul>
    22. 22. 2c - SQL Server 2000 Platforms <ul><li>Operating System </li></ul><ul><ul><li>Windows NT 4.0, service pack 5 </li></ul></ul><ul><ul><li>Windows 2000 Server </li></ul></ul><ul><ul><li>Windows 2003 Server </li></ul></ul><ul><li>Hardware </li></ul><ul><ul><li>Pentium 166 MHz or higher </li></ul></ul><ul><ul><li>64 MB RAM - 128 MB better </li></ul></ul><ul><ul><li>Hard Disk: 95-270 MB (250 usual) </li></ul></ul><ul><ul><li>50 MB min Analysis Serv </li></ul></ul><ul><ul><li>80 MB English Query </li></ul></ul>
    23. 23. 2d - Oracle DB Creation <ul><li>Oracle Command Line Script or GUI </li></ul><ul><li>Command Line Script on NT </li></ul><ul><ul><li>oradim.exe </li></ul></ul><ul><ul><li>SQL*Plus </li></ul></ul><ul><ul><li>SQLNet Config </li></ul></ul><ul><li>GUI </li></ul><ul><ul><li>Database Configuration Assistant </li></ul></ul>
    24. 24. 2d - SQL Server 2000 DB Creation <ul><li>Installation CD </li></ul><ul><li>Installation wizard on the CD </li></ul>
    25. 25. 2d - Oracle Steps <ul><li>1. Plan database tables, indexes, estimate space </li></ul><ul><li>2. Plan layout of OS files that make DB </li></ul><ul><li>3. Consider Oracle Managed Files </li></ul><ul><li>4. Select Global Database Name </li></ul><ul><li>5. Create / modify server parameter file(s) </li></ul>
    26. 26. 2d - Oracle Steps <ul><li>6. Select DB Character Set </li></ul><ul><li>7. Determine time zones supported </li></ul><ul><li>8. Set up undo tablespace </li></ul><ul><li>9. Develop backup / recovery strategy </li></ul><ul><li>10. Startup and shutdown databases </li></ul>
    27. 27. 2d - SQL Server 2000 Steps <ul><li>1. Plan database tables, indexes, estimate space </li></ul><ul><li>2. Plan layout of OS files that make DB </li></ul><ul><li>Possible Layout: </li></ul><ul><li>Drive RAID Contents </li></ul><ul><li> C: 1 OS+installed apps </li></ul><ul><li> E: 1or 10 System DB Files </li></ul><ul><li> F: 1 Filegroup “Data” Files </li></ul><ul><li> G: 1 Filegroup “Index” Files </li></ul><ul><li> H: 1 Transaction Log Files </li></ul>
    28. 28. 2d - SQL Server 2000 Steps <ul><li>3. Select Instance name or Default name </li></ul><ul><li>4. Set up account in which services run </li></ul><ul><li>5. Install Collation (language), sort order </li></ul><ul><li>6. Is Full Text Search and English Query Required? </li></ul>
    29. 29. 2d - SQL Server 2000 Steps <ul><li>7. Determine Authentication Mode </li></ul><ul><li>8. Set up Networking Services </li></ul><ul><li>9. Develop backup / recovery strategy </li></ul><ul><li>10. Startup and shutdown databases </li></ul><ul><li>11. Option - Install OLAP, Data Mining Analysis Services </li></ul>
    30. 30. 3 - Transactions / Record Locking <ul><li>Rollback Segments / Redo Logs </li></ul><ul><li>Record Locks </li></ul><ul><li>T-SQL vs SQL-Plus Transactions </li></ul>
    31. 31. 3a - Rollback Segments / Redo Logs <ul><li>Undo Tablespace in 9i </li></ul><ul><li>Redo Logs </li></ul><ul><li>Oracle </li></ul><ul><li>Note: DBA can still use Rollback Segments, if desired </li></ul>
    32. 32. 3a - Rollback Segments / Redo Logs <ul><li>SQL Server </li></ul><ul><li>Transaction Log is present in each Database of each Instance </li></ul><ul><li>Equivalent of Oracle undo and redo logs </li></ul>
    33. 33. 3b - Record Locks <ul><li>SQL Server more complex than Oracle </li></ul><ul><ul><li>Caused by lack of rollback segments </li></ul></ul><ul><ul><li>Additional isolation levels to maintain read consistency </li></ul></ul><ul><ul><li>Possible for writers to block readers </li></ul></ul><ul><ul><li>Increased possibility for: </li></ul></ul><ul><ul><ul><li>deadlocking </li></ul></ul></ul><ul><ul><ul><li>long-sustained blocking </li></ul></ul></ul><ul><ul><li>Keep transactions as short as possible </li></ul></ul><ul><li>Oracle never escalates locks </li></ul>
    34. 34. 3b - Record Locks <ul><li>INTENT (I) </li></ul><ul><li>SHARED (S) </li></ul><ul><li>UPDATE (U) </li></ul><ul><li>EXCLUSIVE (X) </li></ul><ul><li>SCHEMA (Sch-[M,S]) </li></ul><ul><li>BULK UPDATE (BU) </li></ul><ul><li>RANGE[I]_[S,U,X,N] </li></ul><ul><li>RID </li></ul><ul><li>PAGE </li></ul><ul><li>EXT </li></ul><ul><li>TAB </li></ul><ul><li>IDX </li></ul><ul><li>FIL </li></ul><ul><li>KEY </li></ul><ul><li>DB </li></ul><ul><li>GRANT </li></ul><ul><li>WAIT </li></ul><ul><li>CNVRT </li></ul>Lock Types Resources Status
    35. 35. 3b - Record Locks <ul><li>The transaction isolation levels are: </li></ul><ul><li>SQL Server Oracle </li></ul><ul><li>Read Uncommitted N/A </li></ul><ul><li>Read Committed (default) Read Committed (default) </li></ul><ul><li>Repeatable Read N/A </li></ul><ul><li>Serializable Serializable </li></ul><ul><li>N/A Read Only (ANSI) </li></ul>
    36. 36. 3c - T-SQL vs SQL-Plus Transactions <ul><li>T-SQL command: </li></ul><ul><li>SET TRANSACTION ISOLATION LEVEL </li></ul><ul><li>[ READ COMMITTED, READ UNCOMMITTED </li></ul><ul><li>REPEATABLE READ, SERIALIZABLE ] </li></ul><ul><li>You can view the isolation level via the command: DBCC USEROPTIONS </li></ul><ul><li>SQL-Plus command: </li></ul><ul><li>SET TRANSACTION ISOLATION LEVEL </li></ul><ul><li>[READ COMMITTED , SERIALIZABLE] </li></ul>
    37. 37. 3c - T-SQL vs SQL-Plus Transactions <ul><li>Example: </li></ul><ul><li>set transaction isolation level serializable </li></ul><ul><li>begin transaction </li></ul><ul><li>select * from mytable </li></ul><ul><li>exec sp_lock @@spid </li></ul><ul><li>commit transaction </li></ul>
    38. 38. 3c - T-SQL vs SQL-Plus Transactions
    39. 39. 3c - T-SQL vs SQL-Plus Transactions <ul><li>The key difference - inability for SQL Server to pause or re-start transactions as Oracle can </li></ul><ul><li>Can have savepoints like Oracle </li></ul>
    40. 40. 4 - Performance Tuning <ul><li>TPC Benchmarks </li></ul><ul><li>Trace </li></ul><ul><li>Explain Plan </li></ul><ul><li>Performance Monitor </li></ul><ul><li>Indexing </li></ul><ul><li>Index Tuning </li></ul><ul><li>Stored Procedures </li></ul>
    41. 41. 4 - TPC Benchmarks <ul><li>TPC - Transaction Processing Performance Council </li></ul><ul><li>TPC-C Benchmark - Order Entry </li></ul><ul><ul><li>Established in 1992 </li></ul></ul><ul><ul><li>5 transaction types </li></ul></ul><ul><ul><ul><li>New Order </li></ul></ul></ul><ul><ul><ul><li>Payment </li></ul></ul></ul><ul><ul><ul><li>Delivery </li></ul></ul></ul><ul><ul><ul><li>Order Status </li></ul></ul></ul><ul><ul><ul><li>Stock Level </li></ul></ul></ul>
    42. 42. 4 - TPC-C Results as of May 9, 1997
    43. 43. 4 - TPC-C Ver 5 Performance
    44. 44. 4 - TPC-C Ver 5 Price Performance
    45. 45. 4 - Oracle Trace PLUS: UTLBSTAT, UTLESTAT, STATSPACK
    46. 46. 4 - SQL Server Profiler <ul><li>GUI that allows you to trace: </li></ul><ul><ul><li>Cursors </li></ul></ul><ul><ul><li>Database - data and log file changes </li></ul></ul><ul><ul><li>Errors and Warnings </li></ul></ul><ul><ul><li>Locks </li></ul></ul><ul><ul><li>Performance </li></ul></ul><ul><ul><li>Security audit - like password changes </li></ul></ul><ul><ul><li>Stored Procedures </li></ul></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>T-SQL Commands </li></ul></ul>
    47. 47. 4 - Oracle Explain Plan <ul><li>Rows Execution Plan </li></ul><ul><li>-------- ---------------------------------------------------- </li></ul><ul><li>12 SORT AGGREGATE </li></ul><ul><li>2 SORT GROUP BY </li></ul><ul><li>76563 NESTED LOOPS </li></ul><ul><li>76575 NESTED LOOPS </li></ul><ul><li>19 TABLE ACCESS FULL CN_PAYRUNS_ALL </li></ul><ul><li>76570 TABLE ACCESS BY INDEX ROWID CN_POSTING_DETAILS_ALL </li></ul><ul><li>76570 INDEX RANGE SCAN (object id 178321) </li></ul><ul><li>76563 TABLE ACCESS BY INDEX ROWID CN_PAYMENT_WORKSHEETS_ALL </li></ul><ul><li>11432983 INDEX RANGE SCAN (object id 186024) </li></ul>
    48. 48. 4 - SQL Server Explain Plan
    49. 49. 4 - Oracle Performance Manager <ul><li>Different from NT Performance Monitor </li></ul>
    50. 50. 4 - Performance Monitor (perfmon.exe) <ul><li>Each SQL Server Instance installed has performance monitor counters </li></ul><ul><li>Statistics for: </li></ul><ul><ul><li>CPU Usage </li></ul></ul><ul><ul><li>CPU Context Switches </li></ul></ul><ul><ul><li>Disk I/O </li></ul></ul><ul><ul><li>Memory and Paging </li></ul></ul><ul><ul><li>SQL Server Cache, Buffer Manager, Trans/Sec, Page Splits, Full Scans, Wait Times </li></ul></ul>
    51. 51. 4 - SQL Clustered Index <ul><li>Table rows are sorted in same order as Index </li></ul><ul><li>A table can contain only one clustered index </li></ul><ul><li>UPDATE and DELETE operations are often accelerated </li></ul><ul><li>Creating and Modifying Index Values causes Table to be Reorganized on Disk </li></ul><ul><li>Good for: </li></ul><ul><ul><li>Retrieving many records at once from table </li></ul></ul><ul><ul><li>Getting a range of values </li></ul></ul><ul><ul><li>Columns with limited number of values </li></ul></ul>
    52. 52. 4 - Oracle Clusters
    53. 53. 4 - Oracle Reverse-Key Index <ul><li>Reverses the bytes of each column indexed (except the rowid) while keeping the column order </li></ul>
    54. 54. 4 - SQL Server Index and Table Fragmentation <ul><li>Database Console Commands to use in T-SQL: </li></ul><ul><li>DBCC SHOW_STATISTICS </li></ul><ul><li>DBCC </li></ul><ul><li>UPDATEUSAGE([DBNAME,TABLE,INDEX]) </li></ul><ul><li>DBCC </li></ul><ul><li>SHOWCONTIG([DBNAME,TABLE,INDEX]) </li></ul><ul><li>DBCC DBREINDEX </li></ul><ul><li>DBCC INDEXDEFRAG - run online </li></ul>
    55. 55. 4 - Oracle Index Tuning Wizard <ul><li>Use with Oracle cost-based optimizer </li></ul><ul><li>Part of Oracle Enterprise Manager Tuning Pack </li></ul><ul><li>Identifies tables in need of index changes </li></ul><ul><li>Presents its findings in reports </li></ul><ul><li>Allow you to automatically implement recommendations </li></ul>
    56. 56. 4 - SQL Server Index Tuning
    57. 57. 4 - Stored Procedures <ul><li>Compiled Stored Procedures </li></ul><ul><ul><li>Minimize Business Tier Activity </li></ul></ul><ul><li>SQLServer2000 - Extended stored procedures (DLL’s) </li></ul>
    58. 58. 5 - Database Management <ul><li>Oracle RAC </li></ul><ul><li>SQL Server 2000 Failover Clusters </li></ul><ul><li>SQL Server 2000 Federated Databases </li></ul><ul><li>Partitioned Tables </li></ul><ul><li>Online Object Redefinition </li></ul><ul><li>Globalization Services </li></ul><ul><li>SQL Loader / DTS </li></ul>
    59. 59. 5 - Oracle Real Application Clusters
    60. 60. 5 - SQL Server Failover Clustering
    61. 61. 5 - SQL Server Federated Databases <ul><li>Distributed Partitioned Views </li></ul><ul><li>Union All of distributed tables across DBs </li></ul>
    62. 62. 5 - Partitioned Tables
    63. 63. 5 - Oracle 9i Online Object Redefinition <ul><li>New in Oracle 9i: </li></ul><ul><li>oracle redefinition PL/SQL package DBMS_REDEFINITITION </li></ul>
    64. 64. 5 - Globalization Services <ul><li>Oracle 9i - Globalization Services </li></ul><ul><ul><li>Expanded National Language Support </li></ul></ul><ul><li>SQL Server 2000 Collation </li></ul>
    65. 65. 5 - SQL Loader / DTS <ul><li>Oracle SQL Loader - command line </li></ul><ul><li>SQL Server - use DTS Data Transformation Service Import / Export Wizard, or </li></ul><ul><li>bulk copy BCP command line tool </li></ul><ul><li>BULK INSERT DML command </li></ul>
    66. 66. 6 - Backup and Recovery <ul><li>Backup </li></ul><ul><ul><li>Hot / Online Backups </li></ul></ul><ul><ul><li>Differential Backups </li></ul></ul><ul><ul><li>Archived Log Backups </li></ul></ul><ul><ul><li>Log Shipping </li></ul></ul><ul><li>Recovery </li></ul>
    67. 67. 6a - Backup: Oracle vs SQL Server <ul><li>ORACLE SQL SERVER </li></ul><ul><li>Hot Backup All full backups are HOT </li></ul><ul><li>Full Backups HOT Full Backup </li></ul><ul><li>Differential Increment Same as Oracle </li></ul><ul><li>Backups </li></ul><ul><li>Archive Log Transaction Log </li></ul><ul><li>RMAN No Equivalent </li></ul><ul><li>Import/Export (full) Closest are: BCP </li></ul><ul><li> Database Scripting </li></ul>
    68. 68. 6a - SQL Server Recovery Models <ul><li>Simple </li></ul><ul><ul><li>MASTER </li></ul></ul><ul><ul><li>MODEL </li></ul></ul><ul><ul><li>MSDB </li></ul></ul><ul><ul><li>TEMPDB </li></ul></ul><ul><li>Full </li></ul><ul><li>Bulk Logged </li></ul>
    69. 69. 6a - SQL Server Media
    70. 70. 6a - Differential Backups <ul><li>SQL Server: </li></ul><ul><li>BACKUP DATABASE [mydb] </li></ul><ul><li>TO DISK = ‘e:dbbackupsmydb </li></ul><ul><li>mydb_20020624_full.bak’ </li></ul><ul><li>WITH DIFFERENTIAL , </li></ul><ul><li>INIT, </li></ul><ul><li>NAME = 'Differential Backup of MYDB on 06/24/2002’ </li></ul>
    71. 71. 6a - Archived Log Backups <ul><li>SQL Server - called Transaction Log </li></ul><ul><ul><li>1 Log for each database in an instance </li></ul></ul><ul><ul><li>Database must be set up to be full or bulk-logged recovery mode </li></ul></ul><ul><li>BACKUP LOG [mydb] WITH </li></ul><ul><li>TRUNCATE_ONLY </li></ul>
    72. 72. 6a - Log Shipping
    73. 73. 6b - Recovery <ul><li>Oracle </li></ul><ul><ul><li>manual via sqlplus </li></ul></ul><ul><ul><li>via RMAN </li></ul></ul><ul><ul><li>Enterprise Manager </li></ul></ul><ul><li>SQL Server </li></ul><ul><ul><li>rebuildm.exe </li></ul></ul><ul><ul><li>Enterprise Manager </li></ul></ul><ul><ul><li>Query Analyzer </li></ul></ul><ul><ul><li>SQL Server Service Control Manager </li></ul></ul>
    74. 74. 7 - Cost and Licensing <ul><li>Sql Server 2000 </li></ul><ul><ul><li>Standard Edition </li></ul></ul><ul><ul><li>Enterprise Edition </li></ul></ul><ul><ul><li>Cost </li></ul></ul><ul><li>Oracle 9i </li></ul><ul><ul><li>Standard Edition </li></ul></ul><ul><ul><li>Enterprise Edition </li></ul></ul><ul><ul><li>Cost </li></ul></ul><ul><li>Total Cost of Ownership </li></ul>
    75. 75. 7a - SQL Server Standard Edition <ul><li>SMP to 4 CPUs, 2GB of RAM </li></ul><ul><li>Core functionality of e-commerce, data warehousing, line-of-business solns </li></ul><ul><li>Data Transformation Services (DTS) </li></ul><ul><li>Replication - snapshot,transactional,merge </li></ul><ul><li>Full-text search </li></ul><ul><li>English Query </li></ul><ul><li>Stored Procedure development tools </li></ul><ul><li>SQL Profiling and Performance Analysis Tools </li></ul>
    76. 76. 7a - SQL Server Enterprise Edition <ul><li>Enterprise Edition - includes: </li></ul><ul><ul><li>32-bit: 32 CPUs and 64 GB RAM </li></ul></ul><ul><ul><li>64-bit: 64 CPUs and 512 GB RAM </li></ul></ul><ul><ul><li>Distributed Partitioned Views </li></ul></ul><ul><ul><li>Log Shipping </li></ul></ul><ul><ul><li>Fail over Clustering </li></ul></ul><ul><ul><li>Indexed Views </li></ul></ul><ul><ul><li>Multi-language Capability </li></ul></ul><ul><ul><li>OLAP </li></ul></ul><ul><ul><li>Direct SAN support </li></ul></ul>
    77. 77. 7a - SQL Server Pricing <ul><li>Client Access License $146 per device or user </li></ul><ul><li>CPU License (Windows Server O/S license required): </li></ul><ul><ul><li>Enterprise Edition $20,000 per processor </li></ul></ul><ul><ul><li>Standard Edition $5,000 per processor </li></ul></ul><ul><ul><li>SQL Windows </li></ul></ul><ul><ul><li>or Server 2003 Server </li></ul></ul><ul><li>Server License requiring CALs: O/S </li></ul><ul><ul><li>Enterprise w/ 25 CALs $11,099 $3,399 </li></ul></ul><ul><ul><li>Standard w/ 5 CALs $1,489 $999 </li></ul></ul><ul><ul><li>Standard w/ 10 CALs $2,249 $1,199 </li></ul></ul><ul><li>The above prices are full retail </li></ul>
    78. 78. 7a - SQL Server Support <ul><li>New Software Assurance Program </li></ul><ul><ul><li>Based on License price of product covered </li></ul></ul><ul><ul><ul><li>Costs 25% per year for each server product </li></ul></ul></ul><ul><ul><ul><li>Costs 29% per year for each desktop product </li></ul></ul></ul><ul><ul><li>Linked to your Microsoft Volume License Agreement </li></ul></ul>
    79. 79. 7a - SQL Server Support <ul><li>Features of Software Assurance Program </li></ul><ul><ul><li>New version rights </li></ul></ul><ul><ul><li>Spread payments </li></ul></ul><ul><ul><li>Problem resolution support </li></ul></ul><ul><ul><li>Extended lifecycle hotfix support </li></ul></ul><ul><ul><li>Enterprise source licensing program </li></ul></ul><ul><ul><li>Corporate Error Reporting </li></ul></ul><ul><ul><li>eLearning </li></ul></ul>
    80. 80. 7b - Oracle Standard DB <ul><li>Std One - 1 processor, min 5 named users </li></ul><ul><li>Standard - Up to 4 processors </li></ul><ul><li>Oracle Fail Safe </li></ul><ul><li>Flashback Query </li></ul><ul><li>Java, XML, Globalization Support </li></ul><ul><li>Oracle Enterprise Manager </li></ul><ul><li>Oracle Statistics Management </li></ul><ul><li>Oracle Analytic Functions </li></ul><ul><li>Oracle Text </li></ul><ul><li>Gateways to other systems / applications </li></ul>
    81. 81. 7b - Oracle Enterprise DB <ul><li>Minimum 25 named users + </li></ul><ul><li>Available Add-Ons: </li></ul><ul><li>Oracle Data Guard </li></ul><ul><li>Oracle Transparent Application Failover </li></ul><ul><li>Virtual Private Database </li></ul><ul><li>Database Resource Manager </li></ul><ul><li>Oracle Streams </li></ul><ul><li>Oracle Partitioning </li></ul><ul><li>Oracle Real Application Clusters </li></ul><ul><li>Oracle Diagnostics Pack </li></ul><ul><li>Oracle Tuning Pack </li></ul><ul><li>Oracle OLAP </li></ul><ul><li>Oracle Data Mining </li></ul>
    82. 82. 7b - Oracle 9i DB Pricing <ul><li>CPU License </li></ul><ul><ul><li>Enterprise Edition $40,000 per processor </li></ul></ul><ul><ul><li>Standard Edition $15,000 per proc (4 proc max) </li></ul></ul><ul><ul><li>Std Edition One $5,995 (1 processor only) </li></ul></ul><ul><li>Licensing by Named Users w/ 1 processor: </li></ul><ul><ul><li>Enterprise w/ min 25 NUs $20K ($800 * 25) </li></ul></ul><ul><ul><li>Standard w/ min 5 NUs $1,275 ($300 * 5) </li></ul></ul><ul><ul><li>Standard 1 w/ min 5 NUs $975 ($195 * 5) </li></ul></ul><ul><li>Named User Price varies by Edition </li></ul>
    83. 83. 7b - Oracle 9i DB Pricing <ul><li>Enterprise Edition Options (per processor) </li></ul><ul><ul><ul><li>Real Application Clusters $20,000 </li></ul></ul></ul><ul><ul><ul><li>OLAP $20,000 </li></ul></ul></ul><ul><ul><ul><li>Partitioning $10,000 </li></ul></ul></ul><ul><ul><ul><li>Data Mining $20,000 </li></ul></ul></ul><ul><li>Enterprise Manager Options </li></ul><ul><li>Development Tools </li></ul><ul><li>InterConnect Adapters </li></ul><ul><li>Application Server </li></ul>
    84. 84. 7b - Oracle 9i Support <ul><li>Upgrade - 15% of license </li></ul><ul><li>Support - 7% of license </li></ul><ul><li>Support won’t increase more than 4%/yr </li></ul>
    85. 85. 7c - Total Cost of Ownership <ul><li>Software Licensing and Support Costs </li></ul><ul><li>Hardware Purchase and Support Costs </li></ul><ul><li>Operations </li></ul><ul><li>Administration </li></ul><ul><li>Indirect Costs of </li></ul><ul><ul><li>End-User Operations </li></ul></ul><ul><ul><li>Downtime </li></ul></ul><ul><li>Affected by </li></ul><ul><ul><li>Assumptions made </li></ul></ul><ul><ul><li>Changing hardware / software mix </li></ul></ul>
    86. 86. 7c - Total Cost of Ownership <ul><li>Example 1 - Magic Market Research, 2002 </li></ul><ul><ul><li>Assumptions: </li></ul></ul><ul><ul><ul><li>4-processor system </li></ul></ul></ul><ul><ul><ul><li>Only factor in known costs </li></ul></ul></ul><ul><ul><ul><li>3 apps - Enterprise, Custom Web, and Business Intelligence </li></ul></ul></ul><ul><ul><li>DB2 had lowest TOC </li></ul></ul><ul><ul><ul><li>Then SQL Server 2000 </li></ul></ul></ul><ul><ul><ul><li>Then Oracle </li></ul></ul></ul>
    87. 87. 7c - Total Cost of Ownership <ul><li>Example 2 - Input Market Research 2002 </li></ul><ul><ul><li>Assumptions: </li></ul></ul><ul><ul><ul><li>Packaged application environment </li></ul></ul></ul><ul><ul><ul><li>SQL Server DBA serves 684 users </li></ul></ul></ul><ul><ul><ul><li>Oracle DBA serves 3000+ users </li></ul></ul></ul><ul><ul><li>Oracle had lower TOC per user </li></ul></ul><ul><li>Cost Item Oracle SQLServer </li></ul><ul><ul><li>License $29.54 $6.05 </li></ul></ul><ul><ul><li>Consult/Impl 2.64 9.23 </li></ul></ul><ul><ul><li>Support/Maint 34.51 102.43 </li></ul></ul><ul><ul><li>Total $66.69 $117.71 </li></ul></ul>
    88. 88. Forrester Comparison - BI SQL Server 2000 Enterprise vs Oracle 9i Business Intelligence SQL Server Oracle 9i
    89. 89. The Future <ul><li>New releases in 2004 </li></ul><ul><ul><li>Microsoft Yukon </li></ul></ul><ul><ul><li>Oracle 10g </li></ul></ul><ul><li>How you benefit </li></ul>
    90. 90. What This Means <ul><li>Stay aware of new developments </li></ul><ul><li>Be aware of strategic goals of your enterprise </li></ul><ul><li>Implement databases as part of entire IT integration strategy </li></ul>
    91. 91. Bibliography <ul><li>SQL Server 2000 for the Oracle DBA by Christopher Kempster, 2003, Perth, Western Australia </li></ul><ul><li>The Heterogeneous DBA by Chuck Sudowsky, 2003, Irvine, CA, Quest Software </li></ul><ul><li>Database Software Trends Webcast, Oct 28, 2003, Irvine, CA, Quest Software </li></ul><ul><li>Oracle 9i Database Release 2 New Features Oracle Whitepaper, May 2002 </li></ul><ul><li>Oracle 9i Database Release 2 on Windows: Development and Deployment, Oracle Whitepaper, May 2003 </li></ul><ul><li>Oracle 9I: Developing with Microsoft .NET, Oracle Whitepaper, April 2003 </li></ul><ul><li>DbForums - Oracle 9i vs MS SQL Server 2000 Technical Comparison by Kent Faulkner, USA, April 2003 (biased against MS) </li></ul><ul><li>Technical Comparison of Oracle 9i Database and SQL Server 2000: Focus on Performance, Oracle Whitepaper, June 2002 </li></ul><ul><li>Database Architecture: Federated vs Clustered, Oracle Whitepaper, March 2002 </li></ul><ul><li>Technical Comparison of Oracle 9i Database vs SQL Server 2000: Focus on Manageability, Oracle Whitepaper, Nov 2002 </li></ul><ul><li>SQL Server 2000 vs Oracle9i - Alexander Chigrik Mar 30, 2003 - see link </li></ul><ul><li>http://www. mssqlcity .com/Articles/Compare/ sql _server_ vs _oracle. htm </li></ul><ul><li>Oracle9i Database Compared to SQL Server.htm Written by Oracle. Biased to Oracle. </li></ul><ul><li>Forrester Scorecard of Oracle 9I vs MS Sql Server 2000 - BI - Nov 2003 </li></ul><ul><li>Microsoft SQL Server Web Pages - new features + pricing + Migrating Oracle Databases to SQL Server 2000 </li></ul><ul><li>Oracle Partner Info - Oracle pricing, partitioning by CPUs </li></ul><ul><li>Oracle Pricing from Oracle 9i Partner e-page </li></ul><ul><li>SearchWin2000Info directory - June 2002 interview with Oracle vp: 9i vs SQL Server </li></ul><ul><li> + Interview with Microsoft vp: Oracle Isn’t All That Bad </li></ul><ul><li>TPC benchmarks - </li></ul>
    92. 92. Questions and Answers <ul><li>Architecture </li></ul><ul><li>Installation </li></ul><ul><li>Transactions and Record Locking </li></ul><ul><li>Performance Tuning </li></ul><ul><li>Database Management </li></ul><ul><li>Backup and Recovery </li></ul><ul><li>Cost and Licensing Arrangements </li></ul>