background preloader


Facebook Twitter

Mai-20105bea.pdf (application/pdf Object) Oracle 11g Installation auf Ubuntu 10.04 LTS ohne X-Windows  « © Michael H.G. Schmidt ( Wer schon mal eine Oracle Datenbank auf Linux installiert hat kennt das Problem: Es gibt eine Menge Linux Distributionen aber Oracle unterstützt im wesentlichen nur 2: RHEL (RedHat Enterprise Linux ©) und SLES (SuSE Linux Enterprise Server ©). Dies sind jedoch Server Versionen – der Support von aktueller Notebook/Desktop Hardware (WLAN, Sound etc. pp. ist unter diesen Linuxen verständlicherweise eher gering bis nicht vorhanden).

Entwickler, Admins und enthusiastische Hobbyisten möchten jedoch Oracle manchmal auch auf “ihrem” OS (z.B.: Ubuntu) installieren. Dies ist oft nicht ganz einfach (meistens wegen Problemen beim Verlinken der Oracle Binärdateien mit Betriebssystembibliotheken). Das nächste Ärgernis beim installieren von Oracle RDBMS ist, daß Oracle seit einigen Jahren (und zwar seit Version 8i) ein funktionierendes X-Windows für die Installation von Oracle erwartet. Das folgende HOWTO soll dabei helfen diese Probleme zu umschiffen. Editor. Deadlocks. If session 1 is locking row 1, session 2 locks row 2, then session 1 attempts to lock row 2 (which will block since session 2 has the lock on that row), and then session 2 attempts to lock row 1 (which will block since session 1 has the lock on that row), then session 1 is waiting for session 2, and session 2 is waiting on session 1, which of course will never be resolved.

Here's an actual Oracle example. First of all, setup the environment : SQL> CREATE TABLE t ( a varchar2(10) ); Table created. SQL> insert into t values ( 'x' ); 1 row created. Now, session 1 attempts to delete row 'x', but doesn't commit : SESS1> delete from t where a = 'x'; 1 row deleted. Okay, now session 2 attempts to delete row 'y', again, not committing : SESS2> delete from t where a = 'y'; 1 row deleted. Now, since session 2 has not committed the delete against row 'y', session 1 can still "see" it (and attempt to delete it) : SESS1> delete from t where a = 'y'; SESS2> delete from t where a = 'x'; Configuring Shared Server. We have recently configured shared server in some of our databases.

Steps to follow to enable shared server are below. The following configuration is on Enterprise Edition The numbers used in the settings shown are only examples. We are running an OLTP system with about 2000 concurrent users with these parameters without any problem. The parameters you need to set for the shared server and their default values are: NAME VALUE------------------------------ ----------circuits 0dispatchersmax_dispatchers 5max_shared_servers 20mts_circuits 0mts_dispatchersmts_max_dispatchers 5shared_server_sessions 0shared_servers 0The ones starting with mts are for backward compatibility, setting circuits, dispatchers and max_dispatchers or mts_circuits, mts_dispatchers and mts_max_dispatchers is the same and is up to you. If we go over these parameters one by one: Circuits: This is a static parameter and it defaults to the sessions parameter when the shared server is used.

The steps we followed were:


ASM. Rman. Installation. Licences. Sql. Tablespaces. DBMS FGA. DBMS_FGA is a PL/SQL package used to define FGA (Fine Grain Auditing) on objects. Define a simple policy called DUP_ACCESS: Another example: Define policy named FGA_EMP to audit the DBA's (oracle user) attempts to access to salary (emp.sal column) information: SQL> exec DBMS_FGA.ADD_POLICY( - > object_schema => 'SCOTT', - > object_name => 'EMP', - > policy_name => 'FGA_EMP', - > audit_column => 'SAL', - > audit_condition => 'SYS_CONTEXT(USERENV,OS_USER) = oracle ', - > statement_types => 'SELECT', - > audit_trail => DBMS_FGA.DB); PL/SQL procedure successfully completed.

Sample select to violate the policy: SQL> SELECT sal FROM EMP WHERE rownum < 1; no rows selected Query audit trail: SQL> SELECT policy_name, object_name, statement_type, os_user, db_user FROM dba_fga_audit_trail; POLICY_NAM OBJECT_NAM STATEME OS_USER DB_USER ---------- ---------- ------- ---------- ---------- FGA_EMP EMP SELECT oracle SCOTT Remove FGA policy: Clear FGA audit trail: SQL> TRUNCATE TABLE fga_log$; Table truncated. ORACLE HOME. Oracle Shell Scripting. This article presents some basic techniques for creating Windows batch files and UNIX/Linux shell scripts that connect to SQL*Plus and RMAN. Windows To run an SQL script using SQL*Plus, place the SQL along with any SQL*Plus commands in a file and save it on your operating system. For example, save the following script in a file called "C:\emp.sql". CONNECT scott/tiger SPOOL C:\emp.lst SET LINESIZE 100 SET PAGESIZE 50 SELECT * FROM emp; SPOOL OFF EXIT; Next, create a batch file called "C:\get_emp.bat" containing the following command. sqlplus /nolog @C:\emp.sql The resulting batch file can be run manually, by double-clicking on it, or scheduled using the Scheduled Tasks Wizard (Start > Programs > Accessories > System Tools > Scheduled Tasks) or the AT scheduler.

The method is very similar when using Recovery Manager (RMAN). Next create a batch file called "C:\backup.bat" containing the following command. rman target=/ @cmdfile.txt UNIX and Linux (Method 1) #! Chmod u+x /u01/get_emp.ksh #! #! #! #! Oracle Data Pump. Archive log files reaches maxloghistory. Oracle | Hardware and Software, Engineered to Work Together. Database Appliance.