Sie sind auf Seite 1von 3

Chapter 8, importing TennisDB.

dmp into Oracle DB 11g


1) Download the TennisDB.7z file and extract to C:\Tennisdb.dmp or whatever location you want. 2) Tennisdb.dmp was created by using the exp command, so it needs to be imported using the imp command. 3) Tennisdb.dmp is a full export, thus a. You do not need to run DDL first to create tables; the import process will do it for you. b. Tennisdb.dmp contains information about the original Tablespace, the User, and the Password, and it till be looking for them in the target database. Therefore, you want to create them in your database prior to importing the file. i. Tablespace = DW_DATA ii. User = DW_OWNER iii. Password = Tennis01 4) Create Tablespace DW_DATA in your database. Connect to Oracle DB as SYSTEM and run the following script: create tablespace DW_DATA datafile 'DW_DATA_01.dbf' size 1000M extent management local autoallocate segment space management auto; 5) Create User DW_OWNER with Password Tennis01 in your database. Connect to Oracle DB as SYSTEM and run the following script: CREATE USER DW_OWNER IDENTIFIED BY Tennis01 default tablespace DW_DATA; grant dba TO DW_OWNER with admin option; grant all privileges TO DW_OWNER with admin option; NOTE: for learning purposes, I am granting DBA and All Privileges with admin options (last 2 lines) to this user to avoid any possible permission issues. If you are in the work environment, consider giving restricted privileges sufficient to create objects and import data (i.e., grant connect, resource, create materialized view to DW_OWNER;) 6) Import TennisDB.dmp. Open the Command Prompt on the Oracle DB box and type the following in a single line: c:\>imp DW_OWNER/Tennis01@orcl file=c:\TennisDB.dmp log=c:\tennis_imp.log rows=y full=y;

NOTE: @orcl specifies the default service name/sid for Oracle DB. If yours is different, change it. Also, change the path to TennisDB.dmp file if you extracted it to a different location. 7) Following the instructions above, you should not have errors. If you do, refer to the log file you specified in the import command. If no errors, the last line of the log should read: Import terminated successfully without warnings and the log file should look like this:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Export file created by EXPORT:V11.02.00 via conventional path Warning: the objects were exported by SYSTEM, not by you import done in AL32UTF8 character set and AL16UTF16 NCHAR character set export client uses WE8MSWIN1252 character set (possible charset conversion) . importing SYSTEM's objects into DW_OWNER . . importing table "MVW_MATCH_STATS" 335481 rows imported . . importing table "MVW_PLAYER_AGG" 34937 rows imported . . importing table "MVW_PLAYER_TOURNAMENT_AGG" 519174 rows imported . . importing table "MVW_TOURNAMENT_AGG" 12785 rows imported . . importing table "MVW_UT_AGG1" 8 rows imported . . importing table "TMP_CATEGORY_ATP" 29999 rows imported . . importing table "TMP_CATEGORY_WTA" 29999 rows imported . . importing table "TMP_IMPORT_STATS_PLAYER1" 32578 rows imported . . importing table "TMP_MATCH_COURT_TYPE" 335562 rows imported . . importing table "TMP_PLAYER_ATP" 47070 rows imported . . importing table "TMP_RESULT_COMBINATIONS" 16889 rows imported . . importing table "TMP_STADIA" 852 rows imported . . importing table "TMP_TOUR_ATP" 16762 rows imported . . importing table "TMP_TOUR_STADIA" 5222 rows imported . . importing table "TMP_TOUR_WTA" 9000 rows imported . . importing table "W_COURT_TYPE_D" 7 rows imported . . importing table "W_DATE_D" 22330 rows imported . . importing table "W_MATCH_D" 506408 rows imported . . importing table "W_MATCH_F" 1012812 rows imported . . importing table "W_MINUTE_D" 1440 rows imported . . importing table "W_PLAYER_D" 35305 rows imported . . importing table "W_PLAYER_D_F" 23538 rows imported . . importing table "W_PLAYER_D_M" 45804 rows imported . . importing table "W_ROUND_D" 19 rows imported . . importing table "W_STADIUM_D" 428 rows imported . . importing table "W_TOURNAMENT_D" 12882 rows imported . . importing table "W_TOURNAMENT_F" 433111 rows imported . . importing table "W_USAGE_TRACKING" 854 rows imported . . importing table "W_USER" 8 rows imported About to enable constraints... Import terminated successfully without warnings.

8) If you get errors, I suggest dropping and recreating the user before you repeat the import process after resolving the errors. This wil ensure clean import. Repeat as many times as needed until the import runs clean. 9) The above process may not be the best practice or even 100% correct, but it worked for me.

Chapter 8, Import Metadata, connecting to Tennis database in Oracle DB


1. Install Oracle Client on the OBIEE server. Select either Runtime or Administrator. Do not select Instant Client. 2. If you are running a 32-bit Administration Tool, you must install the 32-bit Oracle Database Client. If you are running a 64-bit Administration Tool, you must install the 64bit Oracle Database Client. 3. After installing the Oracle Database Client on OBIEE server, copy the tnsnames.ora file from \NETWORK\ADMIN\ of Oracle Database Home on the ODB server to \NETWORK\ADMIN\ of Oracle Client Home on the OBIEE server, Oracle BI Home on the OBIEE server, and Oracle Common on the OBIEE server. Default locations are listed below. a. Oracle Database Home default location on ODB server is c:\app\username\product\11.2.0\dbhome_1 b. Oracle Client Home default location on OBIEE server is c:\app\username\product\11.2.0\client_1 c. Oracle BI Home default location on OBIEE server is c:\OBI\Oracle_BI1 d. Oracle Common default location on OBIEE server is c:\OBI\oracle_common 4. Create environment variables: a. ORACLE_HOME and set it to the Oracle Client Home location (see above). b. TNS_ADMIN and set it to %ORACLE_HOME%\network\admin (the location of the TNSNAMES.ORA file). 5. To connect to Oracle DB from the BI Administration use the following parameters a. Connection Type: OCI 10G/11G b. Data Source Name: orcl NOTE: orcl is the default connection name as identified in tnsnames.ora file. Your connection name may be different. Look in tnsnames.ora file and find a section that looks like below where red xs point to your Oracle databse. The name of that section (first line) is your Data Source Name.
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxxxx)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = xxxxxxxxxxxx) ) )

c. User Name: DW_OWNER d. Password: Tennis01

Das könnte Ihnen auch gefallen