Posts tagged ‘oracle’

Protected: 2009.0108 Oracle db2 Trace dumping / problem / crash

This post is password protected. To view it please enter your password below:


Protected: oracle problem 0105 – db4 掛點

This post is password protected. To view it please enter your password below:


Protected: oracle problem 0104 – stream 無法啟動

This post is password protected. To view it please enter your password below:


Protected: [memo] data

This post is password protected. To view it please enter your password below:


install oracle 11g steps

記錄一下, 方便查詢

ORACLE URL : Installing Oracle Database 11g Release 1 on Enterprise Linux 5 (32- and 64-bit)
- http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html?rssid=rss_otn_articles

ORACLE wiki : http://wiki.oracle.com/

step-by-step screenshots : http://www.thegeekstuff.com/2008/10/oracle-11g-step-by-step-installation-guide-with-screenshots/

Install Oracle 11g on CentOS with VMware ( Mac )
- http://wiki.oracle.com/page/Installing+Oracle+11g+on+CentOS+under+VMWare+on+a+Macbook

Oracle 11g R1 Enterprise安裝研究(CentOS 5.2) : http://forum.icst.org.tw/phpbb/viewtopic.php?f=21&t=16411&start=0&sid=866700eee479d130d126967c3160e7f4

Oracle 11g R2 Enterprise (CentOS 5.3 x86_64) 安裝筆記 : http://hans0713.blogspot.com/2009/10/oracle-11g-r2-enterprise-centos-53.html

Oracle 9i Streams 安裝步驟 – http://www.oracle-base.com/articles/9i/Streams9i.php

Oracle 11g Release 2 RAC On Linux Using VMware Server 2 -
http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVMwareServer2.php

筆記一下網上看到的:

Linux OS 下這些調整 sysctl

fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

http://forum.icst.org.tw/phpbb/viewtopic.php?f=21&t=16411&start=0&sid=866700eee479d130d126967c3160e7f4

oracle default password

scott / tiger

sys / oracle ( sysdba )

Protected: 2009.0914 經典名言

This post is password protected. To view it please enter your password below:


Protected: [轉貼] optimize query statement oracle

This post is password protected. To view it please enter your password below:


Protected: oracle standby loading burst

This post is password protected. To view it please enter your password below:


debian / ubuntu 裝 oracle instant client / sqlplus / oci8 / apache2 config / steps by steps

2011.0530 整理的 install step by step:
OS : uname -a
Linux ubuntu 2.6.38-8-server #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Oracle client : 11.2 R1

google "oracle instant client download"
到 oracle 網頁找 Instant Client for Linux x86-64 / Version 11.2.0.1.0 (PS: Version 11.2.0.2.0 這版有問題)
download 這兩個
oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.rpm (47,811,007 bytes)
oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64.rpm (606,343 bytes)
用 alien 裝起來
  102  alien -i *basic*
  103  alien -i *devel*

新增這個檔 /etc/ld.so.conf.d/oracle.conf , 內容:
/usr/lib/oracle/11.2/client64/lib/

  104  cat /etc/ld.so.conf.d/oracle.conf
  105  ls -l /usr/lib/oracle/
  106  ls -l /usr/lib/oracle/11.2/client64/lib/

安裝 LAMP :
  108  export http_proxy="http://172.30.1.123:8080"
  109  apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql

安裝 libaio 套件
  138  apt-get install libaio1

安裝 pear 套件
  112  apt-get install php-pear

安裝 pecl 的 oci8 套件
pear config-set http_proxy http://172.30.1.123:8080/

  114  pecl update-channels
  115  pecl install oci8

  117  find /etc -name php.ini
這兩個檔要加入 oci8 的 extentsion
/etc/php5/cli/php.ini
/etc/php5/apache2/php.ini

install ok: channel://pecl.php.net/oci8-1.4.5
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini <------ 加這行

跑看看測試code:

$conn = oci_connect('oracle_user', 'oracle_pass', 'ip_address/instant_id');

$stid = oci_parse($conn, "select to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') from dual" );
oci_execute($stid);

$row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS);
print_r( $row );

oci_close( $conn );

// ——————————–
以下是 2011.5.25 修改

   69  find / -name sqlplus -print
   70  /usr/lib/oracle/11.2/client64/bin/sqlplus
   71  cat > /etc/ld.so.conf.d/oracle.conf

   73  ls -l /usr/lib/oracle/11.2/client64/lib/

   76  vi /etc/ld.so.conf.d/oracle.conf
   77  apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql

   86  apt-get install php-pear

   91  pear config-set http_proxy http://172.30.1.123:8080/
   92  pecl update-channels

   95  pecl install oci8

2010.0630 : 今天又在 debian 裝一次 發現, 這個版本沒辦法裝 oracle-instantclient11.2.* , 所以繼續用 instantclient11.1.*

Ubuntu 安裝 RPM 要用 alien …
sudo apt-get install alien

Ref. https://help.ubuntu.com/community/HowToBuildToraWithOracle

先去 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

download 這幾個 files (rpm)

Instant Client Package – Basic Lite
oracle-instantclient11.1-basiclite-11.1.0.7.0-1.i386.rpm

Instant Client Package – SQL*Plus
oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm

Instant Client Package – SDK
oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm

下 alien 指令安裝 rpm

alien -i oracle-instantclient11.1-basiclite-11.1.0.7.0-1.i386.rpm
alien -i oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
alien -i oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm

裝好後用 sqlplus 聯看看 , 因為我得到一個 lib error

所以我要裝 apt-get install libaio1

在 /etc/ld.so.conf.d 加一個檔 cat > /etc/ld.so.conf.d/oracle.conf

內容是 oracle lib 的 path /usr/lib/oracle/11.1/client/lib

然後

apt-get install php5

apt-get install php5-dev

因為 oci8 是由 pecl 來安裝的, 所以要 apt-get install php-pear

再來裝 oci8 : pecl install oci8

在 /etc/php5/conf.d 下建一個 oci8.ini 檔 , cat > /etc/php5/conf.d/oci8.ini 內容是

extension=oci8.so

重新啟動 apache2 :

service apache2 restart

看看 phpinfo 有沒有出現 oci8 等字樣就 ok 了

53420fcc8f6596bc2b6cd3511eae7d84
cebcda336140c38e51b889ec7f9319c3

加一個 virtual host :

在 /etc/apache2/sites-enabled 增加一個 xxx.conf 檔

CodeIgniter 需要用 rewrite module :

ls -sf /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled

Protected: Oracle down time / problem records / 經典

This post is password protected. To view it please enter your password below:


Database administrator

A database administrator (DBA) is a person who is responsible for the environmental aspects of a database. The role of a database administrator has changed according to the technology of database management systems (DBMSs) as well as the needs of the owners of the databases. For example, although logical and physical database design are traditionally the duties of a database analyst or database designer, a DBA may be tasked to perform those duties.

Duties

The duties of a database administrator vary and depend on the job description, corporate and Information Technology (IT) policies and the technical features and capabilities of the DBMS being administered. They nearly always include disaster recovery (backups and testing of backups), performance analysis and tuning, data dictionary maintenance, and some database design.

Some of the roles of the DBA may include

  • Installation of new software — It is primarily the job of the DBA to install new versions of DBMS software, application software, and other software related to DBMS administration. It is important that the DBA or other IS staff members test this new software before it is moved into a production environment.
  • Configuration of hardware and software with the system administrator — In many cases the system software can only be accessed by the system administrator. In this case, the DBA must work closely with the system administrator to perform software installations, and to configure hardware and software so that it functions optimally with the DBMS.
  • Security administration — One of the main duties of the DBA is to monitor and administer DBMS security. This involves adding and removing users, administering quotas, auditing, and checking for security problems.
  • Data analysis — The DBA will frequently be called on to analyze the data stored in the database and to make recommendations relating to performance and efficiency of that data storage. This might relate to the more effective use of indexes, enabling "Parallel Query" execution, or other DBMS specific features.
  • Database design (preliminary) — The DBA is often involved at the preliminary database-design stages. Through the involvement of the DBA, many problems that might occur can be eliminated. The DBA knows the DBMS and system, can point out potential problems, and can help the development team with special performance considerations.
  • Data modeling and optimization — By modeling the data, it is possible to optimize the system layouts to take the most advantage of the I/O subsystem.
  • Responsible for the administration of existing enterprise databases and the analysis, design, and creation of new databases.
    • Data modeling, database optimization, understanding and implementation of schemas, and the ability to interpret and write complex Structured Query Language (SQL) queries
    • Proactively monitor systems for optimum performance and capacity constraints
    • Establish standards and best practices for SQL
    • Interact with and coach developers in SQL scripting

 

http://metalink.oracle.com/

在 gentoo 裝 oracle sqlplus package

5a7d294f8002b7cbcefa422e9598e2cf

去 Oracle 那邊 download
05a6575d78ea1ec511646bd57e002b71

那個 instantclient-sqlplus-linux32-11.1.0.7.zip
放到 /usr/portage/distfiles

下 emerge -av dev-db/oracle-instantclient-sqlplus

Protected: Question about Oracle schema

This post is password protected. To view it please enter your password below:


Oracle documentation library

Protected: ★★★ Oracle streams standby architecture 架構圖 – 很多值得參考的範例

This post is password protected. To view it please enter your password below:


Manage Oracle Streams Advanced Queuing – DBMS_AQADM

 

官網資料 : http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_aqadm.htm#i1015375

The DBMS_AQADM package provides procedures to manage Oracle Streams Advanced Queuing (AQ) configuration and administration information.

See Also:

This chapter contains the following topics:

Oracle Applications DBA Field Guide

看看它的各章節, 也許可以知道 DBA 的工作是什麼

http://www.amazon.com/Oracle-Applications-Field-Guide-Experts/dp/1590596447/ref=sr_1_1?ie=UTF8&s=books&qid=1244462254&sr=1-1

Ch1. Components and Architecture of Oracle Applications
Ch2. Configuration
Ch3. Monitoring and Troubleshooting
Ch4. Performance Tuning
Ch5. Patching
Ch6. Toolkit
Ch7. Resources

另外, 這邊有一位真正的 Oracle DBA : http://blog.xuite.net/charley_ocp/mydba01

Protected: 最近遇上的 Oracle 問題, 2009.0608 心得

This post is password protected. To view it please enter your password below:


Protected: Oracle’s V$ Views

This post is password protected. To view it please enter your password below: