Sie sind auf Seite 1von 3

TECH Notes

Date: Product(s): Number: Subject: October 2000 (last revised: 11/14/2000) Open AdStream 5.0 2000/10-0001 Oracle Database Setup Notes This Tech Note expands upon the Oracle Appendix that appears in the Installation Guide.

ORACLE DATABASE NOTES


You should have already installed Oracle Server. Before you begin the OAS 5.0 installation process, you must decide how you want to use the Oracle Database. You can create a separate database for OAS or you can use one Oracle database for everything.

SEPARATE ORACLE DATABASE FOR OAS DATA


If you choose to use a separate Oracle database for your OAS data, then you need to do the following: 1) Create a database for OAS. 2) Create a database user (example: oasadmin) that has full privileges on the database. --create user oasadmin identified by password; --grant dba to oasadmin; --create tablespace OAS datafile '/fullpath/oas.ora' size 1000m; --alter user oasadmin default tablespace OAS; --alter user oasadmin temporary tablespace OAS_temp; 3) Copy the tnsnames.ora file from Oracle to the following directory: [OAS Path]/RealMedia/ads/OpenAd 4) Modify the tnsnames.ora file to work with OAS. There is a sample file in: [OAS Path]/RealMedia/ads/OpenAd/Data/config

ONE ORACLE DATABASE FOR EVERYTHING


If you choose to use a specific account under the current database for your OAS data, then you need to do the following: 1) Create a database user (example: oasadmin) that has full privileges on the existing database. 2) Copy the tnsnames.ora file from Oracle to the following directory: [OAS Path]/RealMedia/ads/OpenAd 3) Modify the tnsnames.ora file to work with OAS. There is a sample file in: [OAS Path]/RealMedia/ads/OpenAd/Data/config

2000-11-14 REV B

T E C H

N O T E :

2 0 0 0 / 1 0 - 0 0 1 5

Oracle

Setup

TABLESPACE
The database user(s) you create must have enough space to import the report data every night. You do this by setting the appropriate tablespace quotas. When you assign tablespace to the database user (ex: oasadmin), assign the users corresponding tablespace quotas according the volume of data your site accumulates. If your site accumulates a large volume of data on a daily basis, then you must assign the database user a large tablespace. If your database user does not have a sufficient tablespace, then you will experience problems when you import the data nightly. For example, the system will give you an error message saying that it cannot create or expand a particular Index or Table. If this error occurs, you must increase the users tablespace and re-run the nightly import. If your sites traffic is relatively small, a single tablespace is fine. If you are expecting a large number of ad deliveries (> 1,000,000 ad views per day), it would be wise to set up multiple tablespaces. If it is a large site, send them the fort.realmedia.com:/tmp/Create_Tables.sql and /tmp/create_Index.sql files, which assume the creation of four tablespaces for speed: RMDATA, RMRPT, RMDATA_INDX, and RMRPT_INDX.

CREATING MULTIPLE TABLESPACES


1) Create tablespaces RMDATA,RMRPT,RMRPT_INDX,RMDATA_INDX 2) Grant privileges using developer_role.sql (You will need dba privileges for this!) create role developer_role; grant create session,alter session,create table,create procedure to developer_role; 3) Create a user using add_user.sql [modify user/pass<temp> as desired] (You will need dba privileges for this!) drop user oasadmin; create user oasadmin identified by mypw default tablespace RMDATA temporary tablespace <temp>; alter user oasadmin quota unlimited on RMRPT; alter user oasadmin quota unlimited on RMDATA; alter user oasadmin quota unlimited on RMRPT_INDX; alter user oasadmin quota unlimited on RMDATA_INDX; grant developer_role to oasadmin; 4) Create Tables using the following sql scripts: Create_Tables.sql Create_index.sql 5) If Oracle is installed on a remote server, install the net8 client (or an Oracle client which will include the net8 client) on the OAS box which will connect to the DB. 6) From the OpenAd directory edit iodbc.ini, using user/pass from step 3 above; specify the correct path for the driver, e.g. [d:]/RealMedia/ads/OpenAd/<Oracle ODBC driver>. A sample tnsnames.ora file is provided in the [OAS Path]/OpenAd/Data/Config directory for your reference. Run the dbImport steps from preload.sh to input data in the tables. Please note, do not run preload.sh UNALTERED since that will drop the tables that we have created and create it in the default tablespace. See the section Other Oracle Notes. Edit preload.sh, go to the end of the file, and comment out the second of the two dbTool commands, i.e. dbTool -bR.

1 1 / 2 0 0 0

R E A L

M E D I A ,

I N C .

P A G E

T E C H

N O T E :

2 0 0 0 / 1 0 - 0 0 1 5

Oracle

Setup

OTHER ORACLE NOTES


Before executing ./preload.sh, make sure that Oracle does not have two users, as MySQL does (oasuser & oasadmin.) We need to have just an 'oasadmin' user. You MUST modify the [oracle] section at the bottom of iodbc.ini to have only the one user/pass combination in both sections: User UserPassword Admin AdminPassword = = = = oasadmin mypw oasadmin mypw

If you are using one tablespace for everything, continue on and execute ./preload.sh >preload.out (assuming that dbTool works). If you have four tablespaces, as described above, the two sql files will have created the tables already and we do not want preload.sh to destroy them, hence the second command, ./dbTool -b, is the only possible switch. The other method is, ./dbTool -bR, which would obliterate the structure you already created. [The -R has since been removed in Patch*c, and after.] For dbTool connectivity: $ORACLE_HOME should be set for the user environment. Hence, if you are trying to connect as nobody you will need to edit the .profile as such: ORACLE_HOME=/opt/oracle/products/816_2 (or whatever the ORACLE_HOME is on that box) export ORACLE_HOME For webserver connectivity: You will need to make the above changes to the root profile also since the webserver will have to grab these values off the environment when it starts up if it has to be able to connect to the DB (to run the front interface). To do that, in httpd.conf (for Apache) you will have to add the following line: PassEnv ORACLE_HOME (anywhere in the configuration file would do, if they are running virtual servers then set it so that it is globally available)

Please note that at this time, we have no information on how to Pass this environment variable in Netscape.

1 1 / 2 0 0 0

R E A L

M E D I A ,

I N C .

P A G E

Das könnte Ihnen auch gefallen