You are on page 1of 20

Mini Projet dOracle

Redaction
Josue KOUKA et Bartel LATZOO 3eme annee Bachelor of Computer Science

Partie I : Contexte et Pr-requis


1. 2. 3. 4. 5. 6. Les Paquets Utiles Parametrage des Utilisateurs et Groupes Oracle Creation des Repertoires dInstallation Configuration du Noyau Creation du fichier /etc/redhat-release Configuration de lEnvironement de lUtilisateur Oracle

Partie II : LInstallation Silencieuse


1. 2. 3. 4. Quest ce quune Silent Install Response File Edition dun Response File Installation via un Response File (Silent Install)

Partie II : Creation Manuelle dune Base de Donnees


1. 2. 3. 4. 5. 6. 7. 8. 9. Specification du Oracle_SID Choix de la methode dauthentification Creation des fichiers de parametres initiaux Connexion a linstance Creation des fichiers de parametres sevreurs Demarage de linstance Creation de la Base de Donnees Creation des tablespaces Additionnels Creations des Vue du Dictionnaire de Donnees

Partie III : Authentification avec un Utilisateur Systeme


1. Creation dun USER

2. Affectation de Mot de Passe 3. Authentification 4. Duplication de luser OS dans la base

Partie I : Contexte et Pr-requis


1- Les Paquets Utilies Linstallation de notre serveur Oracle (10.2.0 g)se fera sur un systeme Linux (Ubuntu 10.10) . Sur les systemes unix/linux la creation dun environement propice a linstallation Oracle simpose . Pour ce faire , il suffit dinstaller les paquest presents dans la commande qui suit :
# aptitude install gcc make binutils libmotif3 lesstif2 rpm libaio1 zip build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm libstdc++5

2. Parametrage des Utilisateurs et Groupes Oracle

# addgroup oinstall # addgroup dba # addgroup nobody # useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle # usermod -g nobody nobody

3. Creation des repertoires dinstallation Nous creerons les repertoires selon la norme OFA (Oracle Flexible Architecture)
# mkdir -p /u01/app/oracle # chown -R oracle:dba /u01 # chmod -R 775 /u01 # mkdir /etc/rc.d # for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done

4. Configuration du noyau

* Ajouter au fichier /etc/sysctl.conf les parametres suivants :


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 = 1048576 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 262144

Taper la commande qui suit pour prendre en compte les modifications effectuees dans le fichier ci dessus :
# sysctl -p

* Ajouter a la fin du fichier /etc/security/limits.conf les parametres suivants afin de changer le nombre de process et le nombre de fichiers a ouvrir
* * * * soft nproc 2407 hard nproc 16384 soft nofile 1024 hard nofile 65536

* Ajouter au fichier /etc/pam.d/login les lignes qui suivent afin de valider les paramtres intgrs au niveau de /etc/security/limits.conf:
session required /lib/security/pam_limits.so session required pam_limits.so

5. Creation du fichier /etc/redhat-release Le fichier /etc/redhat-release contient les informations sur la version Red-hat du systeme . Sil nexiste pas ou contient des informations incorrectes , linstallation dOracle ne pourra etre effectuee . Creer donc ce fichier et y ecrire la ligne suivante

Red Hat Enterprise Linux AS release 3 (Taroon)

6. Configuration de lenvirnoment de lutilisateur Oracle Ajouter les lignes suivantes au fichier /home/oracle/.bashrc pour configurer lenvirnoment de lutilisateur Oracle

umask 022 PATH=${PATH}:/u01/app/oracle/oracle/product/10.2.0/db_1/bin/ ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1/ ORACLE_SID=nom_base ORATAB=/etc/oratab ORACLE_HOME_LISTNER=$ORACLE_BASE ORACLE_BASE=$ORACLE_HOME export ORACLE_BASE ORACLE_SID ORATAB ORACLE_HOME ORACLE_HOME_LISTNER

Partie II :

Installation Silencieuse

1. Quest ce quune Silent Install La Silent Install est une methode dinstallation qui consiste a installer Oracle en proccurant les informations utiles ( a linstallation ) contenu dans un fichier appele response file qui sera passe en argument a lOracle Universal Installer . Cette methode est une alternative a linstallation utilisant un GUI . 2. Response File Un response file est un fichier dextension .rsp qui contient les informations que nous rentrons generelament lors dune installation normale ( mode GUI) . Comme exemple dinformation nous avons le ORACLE_HOME , le nom group DBA ... .Ce fichier peut etre utilise plusieurs fois , cependant chaque installation nutilise quun seul response file . Des templates de response file (custom.rsp , entreprise.rsp , standard.rsp ...) sont

presents dans le dossier response ou stage/response de votre instaleur . 3. Edtion dun reponse file Nous nous baserons sur le fichier custom.rsp pour realiser notre installation . * Copier et renomer le template
$ cp response/custom.rsp . $ mv custom.rsp myrsp.rsp

* Editer le fichier myrsp.rsp , seulement les sections qui suivent La section specifiant le groupe dinstallation : #-----------------------------------------------------------------------------#Name : UNIX_GROUP_NAME #Datatype : String #Description: Unix group to be set for the inventory directory. #Example : UNIX_GROUP_NAME = "install" #-----------------------------------------------------------------------------UNIX_GROUP_NAME=oinstall

La section specifiant le dossier de production des fichiers xml generes #-----------------------------------------------------------------------------#Name : FROM_LOCATION #Datatype : String #Description: Complete path to the products.xml. #Example : FROM_LOCATION = "../stage/products.xml" #-----------------------------------------------------------------------------FROM_LOCATION="./stage/myproducts.xml" La section specifiant le ORACLE_HOME #-----------------------------------------------------------------------------#Name : ORACLE_HOME #Datatype : String #Description: Complete path of the Oracle Home.

#Example : ORACLE_HOME = "/product/10.2.0/db_1" #-----------------------------------------------------------------------------ORACLE_HOME=/u01/oracle/oracle/product/10.2.0/db_1/ La section specifiant le ORACLE_HOME_NAME #-----------------------------------------------------------------------------#Name : ORACLE_HOME_NAME #Datatype : String #Description: Oracle Home Name. Used in creating folders and services. #Example : ORACLE_HOME_NAME = "OraDbHome1" #-----------------------------------------------------------------------------ORACLE_HOME_NAME=db_1 La section specifiant le redemarage du systeme apres installation #-----------------------------------------------------------------------------#Name : RESTART_SYSTEM #Datatype : Boolean #Description: Set to true to allow automatic restart of the system, if set to # false then installer will exit without restarting, no exit # confirmation dialog is shown #Example : RESTART_SYSTEM = false #-----------------------------------------------------------------------------RESTART_SYSTEM="false" La section specifiant le redemarage du systeme distant apres installation #-----------------------------------------------------------------------------#Name : RESTART_REMOTE_SYSTEM #Datatype : Boolean #Description: Set to true to allow automatic restart of the remote systems, if # set to false then installer will not restart the remote systems, # no exit confirmation dialog is shown #Example : RESTART_REMOTE_SYSTEM = false #-----------------------------------------------------------------------------RESTART_REMOTE_SYSTEM="false" La section specifiant le HOSTNAME (LOKING = hostname de notre machine cobaye) #------------------------------------------------------------------------------

#Name : ORACLE_HOSTNAME #Datatype : String #Description: This variable holds the hostname of the system as set by the # user. # # It can be used to force the installation to use an alternative # hostname rather than using the first hostname found on the # system (e.g., for systems with multiple hostnames and network # interfaces). # #Example : ORACLE_HOSTNAME = #-----------------------------------------------------------------------------ORACLE_HOSTNAME="LOKING" La section sepecifiant le language #-----------------------------------------------------------------------------#Name : COMPONENT_LANGUAGES #Datatype : StringList #Description: Languages in which the components will be installed. # # The following choices are available. The value should contain # only one of these choices. # en, : English # fr, : French # ar, : Arabic # bn, : Bengali # pt_BR,: Brazilian Portuguese # bg, : Bulgarian # fr_CA,: Canadian French # ca, : Catalan # hr, : Croatian # cs, : Czech # da, : Danish # nl, : Dutch # ar_EG,: Egyptian # en_GB,: English (United Kingdom) # et, : Estonian # fi, : Finnish # de, : German # el, : Greek # iw, : Hebrew # hu, : Hungarian # is, : Icelandic

# in, : Indonesian # it, : Italian # ja, : Japanese # ko, : Korean # es, : Latin American Spanish # lv, : Latvian # lt, : Lithuanian # ms, : Malay # es_MX,: Mexican Spanish # no, : Norwegian # pl, : Polish # pt, : Portuguese # ro, : Romanian # ru, : Russian # zh_CN,: Simplified Chinese # sk, : Slovak # sl, : Slovenian # es_ES,: Spanish # sv, : Swedish # th, : Thai # zh_TW,: Traditional Chinese # tr, : Turkish # uk, : Ukrainian # vi, : Vietnamese # #Example : COMPONENT_LANGUAGES = {"en"} #-----------------------------------------------------------------------------COMPONENT_LANGUAGES={"fr"} La section precisant le type dinstallation #-----------------------------------------------------------------------------#Name : INSTALL_TYPE #Datatype : String #Description: Installation type of the component. # # The following choices are available. The value should contain # only one of these choices. # EE : Enterprise Edition # SE : Standard Edition # Custom : Custom #Example : INSTALL_TYPE = "Custom" #-----------------------------------------------------------------------------INSTALL_TYPE="Enterprise Edition"

La section precisant le groupe DBA #-----------------------------------------------------------------------------# Name : s_nameForDBAGrp # Datatype : String # Description: The OS group to be granted OSDBA privileges # # Pre-requsites for setting this variable: # "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST # # Example : s_nameForDBAGrp = "dba" #-----------------------------------------------------------------------------s_nameForDBAGrp=<Value Required> La section specifiant la configuration a realiser #-----------------------------------------------------------------------------# Name : varSelect # Datatype : Number # Description: Determines the type of configuration to perform for the session. # # This entry should be specified as an number. The valid values # that you can use map to the following options: # 1 - Create a Database # 2 - Configure an ASM instance # 3 - Install Software Only # # Pre-requsites for setting this variable: # "oracle.rdbms:10.2.0.1.0" is listed as part of oracle.server:DEPENDENCY_LIST # # Example : varSelect=1 #-----------------------------------------------------------------------------varSelect=3 4. Linstallation Notre response file edite , nous pouvons proceder a linstallation en tapant la commande suivante : ./runInstaller -silent -responseFile /home/user/database/myrsp.rsp

voila le resultat :

yosuke@LOKING:~/database$ ./runInstaller -silent -responseFile /home/yosuke/ database/myrsp.rsp Starting Oracle Universal Installer... Checking installer requirements... Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux1.0, asianux-1 or asianux-2 Passed

All installer requirements met. Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-20_04-3421PM. Please wait ...[1]+ Done emacs /home/yosuke/.bashrc yosuke@LOKING:~/database$ Oracle Universal Installer, Version 10.2.0.1.0 Production Copyright (C) 1999, 2005, Oracle. All rights reserved. You can find a log of this install session at: /u01/oracle/oracle/product/10.2.0/db_1/oraInventory/logs/installActions2011-0520_04-34-21PM.log .................................................................................................... 100% Done.

Loading Product Information ................................................................................................................... 100% Done.

Analyzing dependencies ......................................................................... Starting execution of Prerequisites... Total No of checks: 11 Performing check for CertifiedVersions Checking operating system requirements ... Expected result: One of redhat-3,redhat-4,SuSE-9,asianux-1,asianux-2 Actual Result: redhat-3 Check complete. The overall result of this check is: Passed

Check complete: Passed

================================================================= ====== Performing check for Packages Checking operating system package requirements ... .......................................... 100% Done.

----------------------------------------------------------------------------Summary Global Settings Source: /home/yosuke/database/stage/products.xml Oracle Home: /u01/app/oracle/oracle/product/10.2.0/db_1 (db_1) Installation Type: Enterprise Edition Product Languages English Space Requirements / Required 1.36GB (includes 108MB temporary) : Available 10.56GB New Installations (107 products) Oracle Database 10g 10.2.0.1.0 Enterprise Edition Options 10.2.0.1.0 Oracle Partitioning 10.2.0.1.0 Oracle Spatial 10.2.0.1.0 Oracle OLAP 10.2.0.1.0 Oracle Enterprise Manager Console DB 10.2.0.1.0 Oracle Net Services 10.2.0.1.0 Oracle Database 10g 10.2.0.1.0 Oracle Net Listener 10.2.0.1.0 HAS Files for DB 10.2.0.1.0 Oracle Internet Directory Client 10.2.0.1.0 Oracle Call Interface (OCI) 10.2.0.1.0 Oracle Programmer 10.2.0.1.0 Oracle interMedia 10.2.0.1.0 Enterprise Manager Agent Core 10.2.0.1.0 Oracle JVM 10.2.0.1.0 Database Configuration and Upgrade Assistants 10.2.0.1.0 Oracle interMedia Locator 10.2.0.1.0 Oracle XML Development Kit 10.2.0.1.0 Oracle Text 10.2.0.1.0 Oracle Database Utilities 10.2.0.1.0 Generic Connectivity Common Files 10.2.0.1.0 Oracle Advanced Security 10.2.0.1.0 Enterprise Manager Repository Core 10.2.0.1.0 PL/SQL 10.2.0.1.0 Oracle Net 10.2.0.1.0 Assistant Common Files 10.2.0.1.0 Enterprise Manager plugin Common Files 10.2.0.1.0 Beta

Buildtools Common Files 10.2.0.1.0 Installation Common Files 10.2.0.1.0 Oracle LDAP administration 10.2.0.1.0 Oracle Java Client 10.2.0.1.0 Precompiler Common Files 10.2.0.1.0 Oracle Recovery Manager 10.2.0.1.0 SQL*Plus 10.2.0.1.0 iSQL*Plus 10.2.0.1.0 Enterprise Manager plugin Common Files 10.2.0.1.0 HAS Common Files 10.2.0.1.0 Oracle Clusterware RDBMS Files 10.2.0.1.0 Oracle Wallet Manager 10.2.0.1.0 Enterprise Manager Minimal Integration 10.2.0.1.0 Oracle Database User Interface 2.2.13.0.0 Secure Socket Layer 10.2.0.1.0 Oracle ODBC Driver 10.2.0.1.0 Required Support Files 10.2.0.1.0 Database SQL Scripts 10.2.0.1.0 OLAP SQL Scripts 10.2.0.1.0 PL/SQL Embedded Gateway 10.2.0.1.0 Oracle Globalization Support 10.2.0.1.0 Character Set Migration Utility 10.2.0.1.0 LDAP Required Support Files 10.2.0.1.0 Oracle Help for the Web 1.1.10.0.0 Oracle JDBC Thin Driver for JDK 1.4 10.2.0.1.0 Oracle JDBC Thin Driver for JDK 1.2 10.2.0.1.0 Oracle interMedia Client Option 10.2.0.1.0 Oracle Notification Service 10.1.0.3.0 Oracle Code Editor 1.2.1.0.0I Perl Interpreter 5.8.3.0.2 JDBC Common Files 10.2.0.1.0 Oracle Locale Builder 10.2.0.1.0 Oracle Containers for Java 10.2.0.1.0 Database Workspace Manager 10.2.0.1.0 Oracle Core Required Support Files 10.2.0.1.0 Platform Required Support Files 10.2.0.1.0 Oracle interMedia Locator RDBMS Files 10.2.0.1.0 Oracle JDBC/OCI Instant Client 10.2.0.1.0 Oracle interMedia Annotator 10.2.0.1.0 SQLJ Runtime 10.2.0.1.0 Oracle interMedia Java Advanced Imaging 10.2.0.1.0 Oracle Database 10g interMedia Files 10.2.0.1.0 Oracle Data Mining RDBMS Files 10.2.0.1.0 Enterprise Manager Baseline 10.2.0.1.0 Oracle Help For Java 4.2.6.1.0 Oracle UIX 2.1.22.0.0

XML Parser for Java 10.2.0.1.0 Precompiler Required Support Files 10.2.0.1.0 XML Parser for Oracle JVM 10.2.0.1.0 Oracle Message Gateway Common Files 10.2.0.1.0 Oracle Starter Database 10.2.0.1.0 Sample Schema Data 10.2.0.1.0 Parser Generator Required Support Files 10.2.0.1.0 Agent Required Support Files 10.2.0.1.0 Oracle RAC Required Support Files-HAS 10.2.0.1.0 RDBMS Required Support Files 10.2.0.1.0 RDBMS Required Support Files for Instant Client 10.2.0.1.0 XDK Required Support Files 10.2.0.1.0 Oracle OLAP API 10.2.0.1.0 Oracle OLAP RDBMS Files 10.2.0.1.0 DBJAVA Required Support Files 10.2.0.1.0 SQL*Plus Required Support Files 10.2.0.1.0 Oracle JFC Extended Windowing Toolkit 4.2.33.0.0 Oracle Ice Browser 5.2.3.6.0 Oracle Display Fonts 9.0.2.0.0 Oracle Extended Windowing Toolkit 3.4.38.0.0 Enterprise Manager Common Files 10.2.0.1.0 Enterprise Manager Agent DB 10.2.0.1.0 Oracle Net Required Support Files 10.2.0.1.0 Enterprise Manager Repository DB 10.2.0.1.0 SSL Required Support Files for InstantClient 10.2.0.1.0 regexp 2.1.9.0.0 Bali Share 1.1.18.0.0 Oracle Universal Installer 10.2.0.1.0 Oracle One-Off Patch Installer 10.2.0.1.0 Installer SDK Component 10.2.0.1.0 Java Runtime Environment 1.4.2.8.0 Sun JDK 1.4.2.0.8 Sun JDK extensions 10.1.2.0.0 -----------------------------------------------------------------------------

Installation in progress (Fri May 20 16:34:36 GMT 2011) ............................................................... 11% Done. ............................................................... 23% Done. ............................................................... 35% Done. ............................................................... 47% Done. ........................................... 55% Done. Install successful Linking in progress (Fri May 20 16:36:42 GMT 2011) . 55% Done.

Link successful Setup in progress (Fri May 20 16:37:50 GMT 2011) .................... 100% Done. Setup successful End of install phases.(Fri May 20 16:37:56 GMT 2011) Starting to execute configuration assistants Configuration assistant "Oracle Net Configuration Assistant" succeeded Configuration assistant "Oracle Database Configuration Assistant" failed SEVERE:OUI-10104:Some of the configuration assistants failed. It is strongly recommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured. Select the failed assistants and click the 'Retry' button to retry them. -------------------------------------The "/u01/app/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/ configToolFailedCommands" script contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same. The "/u01/app/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/configToolAllCommands" script contains all commands to be executed by the configuration assistants. This file may be used to run the configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same. -------------------------------------WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system. To register the new inventory please run the script '/u01/oracle/oracle/product/10.2.0/ db_1/oraInventory/orainstRoot.sh' with root privileges. If you do not register the inventory, you may not be able to update or patch the products you installed. The following configuration scripts /u01/app/oracle/oracle/product/10.2.0/db_1/root.sh need to be executed as root for configuring the system. If you skip the execution of the configuration tools, the configuration will not be complete and the product wont function properly. In order to get the product to function properly, you will be required to execute the scripts and the configuration tools after exiting the OUI. The installation of Oracle Database 10g was successful, but some optional configuration assistants failed, were cancelled or skipped. Please check '/u01/oracle/oracle/product/10.2.0/db_1/oraInventory/logs/ silentInstall2011-05-20_04-34-21PM.log' for more details.

Voila fait notre Silent Install .

Partie III : CREATION MANUELLE DUNE BASE DE DONNEES


ORACLE

Notre Serveur Oracle etant , nous pouvons passer a la creation de notre Base de Donnees.
1. Spcification du Oracle SID

# ORACLE_SID=TEST # export ORACLE_SID

2. Choix de la methode dauthentification Pour pouvoir creer une Base de Donnees Oracle , il faut sauthentifier mais aussi avoir les privilges systme . Deux methode dauthentification peuvent etre definie : Lauthentification par un Fichier de Mot de Passe : Elle consiste a definir un fichier de mot de passe . Pour le creer taper dans sqlplus : # orapwd FILE=orapworcl ENTRIES=30

Lauthentification via le Systeme dExploitation

Pour cela il suffit de se connecter sur lhote avec un compte dont lutilisateur appartient au groupe approprie . Exemple dans les systemes Unix/Linux ce serait le groupe dba . 3. Creation des Fichiers de Parametres Initiaux

Linstance Oracle lit les parametres initiaux a son demarage , ceux-ci stockes soit dans un fichier texte pouvant etre editer appele pfile , soit dans u fichier binaire qui est parcontre statique nomme spfile. Dans le cas dune creation manuelle de base de donnees un fichier modifiable sera utilise . Exemple de pfile initiale (init.ora) :

############################################################################## # Example INIT.ORA file # # This file is provided by Oracle Corporation to help you start by providing # a starting point to customize your RDBMS installation for your site. # # NOTE: The values that are used in this file are only intended to be used # as a starting point. You may want to adjust/tune those values to your # specific hardware and needs. You may also consider using Database # Configuration Assistant tool (DBCA) to create INIT file and to size your # initial set of tablespaces based on the user input. ###############################################################################
# $ORACLE_HOME/dbs/init<sid>.ora control_files =/u01/app/oracle/oradata/TEST/control01.ctl,/u01/app/oracle/oradata/ TEST/control02.ctl,/u01/app/oracle/oradata/TEST/control03.ctl undo_management = AUTO db_name = TEST db_block_size = 8192 sga_max_size = 1073741824 #one gig sga_target = 1073741824 #one gig db_create_file_dest = /u01/app/oracle/oradata/ #OMF db_create_online_log_dest_1 = /u01/app/oracle/oradata/TEST/ #OMF db_create_online_log_dest_2 = /u01/app/oracle/oradata/TEST/ #OMF db_recovery_file_dest = /u01/app/oracle/flash_recovery_area/TEST #OMF #note its a good idea to also have background_dump_dest, user_dump_dest, and core_dump_dest here as well

4. Connexion a linstance

$ sqlplus SQL> connect sys as sysdba

Connected to an idle instance.

5. Creation Fichier de Parametres Serveur

SQL> create spfile from pfile ;

6. Demarrage de lInstance

SQL> startup nomount

On peut se demander pourquoi le nomount ? La reponse a la question est toute simple , vu que dans le processus de demarrage dune instance oracle , il ya en gros , la lecture des parametres initiaux , le montage de la base (mount) et enfin louverture de la base . Or vu quil nexiste encore aucune BDD sur notre serveur , nous ne pouvons donc pas en monter .

7. Creation de la Base de Donnees Lexemple qui suit , montre comment creer manuellement une base de donnee TEST . Le nom de cette base de donnees correspond au nom donne dans le parametre DB_NAME . Le repertoire /u01/app/oracle/oradata/TEST existe . Le fichier de parameter initiale definie le nombre et le chemin des fichiers de controles grace au parametre CONTROL_FILES .
CREATE DATABASE TEST USER SYS IDENTIFIED BY sys_password USER SYSTEM IDENTIFIED BY system_password LOGFILE GROUP 1 ('/u01/app/oracle/oradata/TEST/redo01.log') SIZE 100M,

GROUP 2 ('/u01/app/oracle/oradata/TEST/redo02.log') SIZE 100M, GROUP 3 ('/u01/app/oracle/oradata/TEST/redo03.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 EXTENT MANAGEMENT LOCAL DATAFILE '/u01/app/oracle/oradata/TEST/system01.dbf' SIZE 325M REUSE SYSAUX DATAFILE '/u01/app/oracle/oradata/TEST/sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE users DATAFILE '/u01/app/oracle/oradata/TEST/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/u01/app/oracle/oradata/TEST/temp01.dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE '/u01/app/oracle/oradata/TEST/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

8. Creation de Tablespaces additionnels


Les tablespaces suivant permettent de rendre la base de donnees fonctionnelle CREATE TABLESPACE apps_tbs LOGGING DATAFILE '/u01/app/oracle/oradata/TEST/apps01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL; CREATE TABLESPACE indx_tbs LOGGING DATAFILE '/u01/app/oracle/oradata/TEST/indx01.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;

9. Creation des Vues du Dictionnaire de Donnees

SQL>sqlplus?/rdbms/admin/catalog.sql SQL>sqlplus?/rdbms/admin/catproc.sql SQL>sqlplus?/sqlplus/admin/pupbld.sql

Le point dinterrogation (?) indique le chemin du repertoire ORACLE_HOME . A la suite des differentes etapes effectuees ci-dessus , nous avons une base de donnes oprationnelle .

PARTIE IV : CREATION AUTHENTIFICATION USER A PARTIR DE OS


1- Creer un user en mode console # useradd kouka_lat

2. Affecter un nouveau password a cet user # passwd kouka_lat

3. Authentification # sqlplus SQL> show parameter os_authent_prefix NAME TYPE VALUE ------------------------------------ ----------- -----------------------------os_authent_prefix string ops$

ops$ est la valeur par defaut 4. creer un //user ayant un id de la forme ops$user_name suivit de la clause identified externally et lui affecte le droit de creer une session SQL> create user ops$kouka_lat identified externally ; SQL> grant create session to ops$jkouka_lat ;

A partir de la tout user se connectant a lOS en tant que kouka_lat pourra se connecter directement a la base en tapant sqlplus / sur le terminal

You might also like