Lab 1 architecture Lab Question Oracle Database Architecture I Simulate the situation a DBA will ?nd himself herself in many times he she has been asked to take on management of a database that he she has not seen before and for which the documentation is

Lab Question Oracle Database Architecture I Simulate the situation a DBA will ?nd himself herself in many times he she has been asked to take on management of a database that he she has not seen before and for which the documentation is woefully inadequate Using either SQL Developer or SQL Plus write a series of queries that will begin to document the system Following are some of the views that will help describe each view and then query the relevant columns To see the views it will be necessary to connect as a user with high privileges such as user SYSTEM ? V DATABASE On what operating system is the database running ? V CONTROLFILE Where is the control ?le Is it multiplexed ? V LOG V LOGFILE How many online log ?le groups are there How many members are in each group and what are they called How big are they ? V TABLESPACE V DATAFILE DBADATAFILES What tablespaces exist in the database What data ?les are assigned to each tablespace What are they called and how big are they Give the creation time CII Opérations sur les Tablespaces Taper la commande sqlplus pour lister tous les tablespaces disponibles et leurs statuts Créer un tablespace TBSEXEMPLE dont le data ?le est DATA DBF de M avec la possibilité de s ? étendre Exemple create tablespace nomTableSpace data ?le ? Chemin nomFichier DBF ? size G autoextend on Avec 'Chemin nomFichier DBF ? l ? emplacement du ?chier Véri ?er que votre tablespace a été ajouté à la liste des tablespaces Ajouter un autre ?chier physique DATA DBF de M à votre tablespace TBSEXEMPLE Exemple alter tablespace nomTablesPace add data ?le 'cheminFichier ?chier dbf' ? ? Lister tous les tablespaces avec leurs ?chiers physiques associés Véri ?er à l ? emplacement physique si les ?chiers existent CModi ?cation d ? un tablespace Drop tablespace TablespaceName ?? Drop tablespace TBS Alter tablespace TablespaceName rename to TablespaceNewName ?? alter tablespace tbs rename to TBSEXEMPLE alter tablespace TablespaceName drop data ?le ? chemin du data ?le ? ?? alter tablespace tbsexemple drop data ?le 'C data dbf' alter database data ?le 'Chemin' resize taille entier M G T ?? alter database data ?le 'C data dbf' resize M Libération de la mémoire select sum Bytes from dbafreespace where tablespace name 'SYSTEM' Cette commande donne la somme des trous sur le tablespace Pour récupérer l ? espace libre d ? un segment a Alter table nomTable DEALLOCATE UNUSED Un utilisateur ayant le privilège d ? admin peut créer des objets sur tous les tablespaces Exemple create table Table id int primary key nom varchar tablespace TBSEXEMPLE C

  • 27
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise
Partager
  • Détails
  • Publié le Jan 12, 2022
  • Catégorie Health / Santé
  • Langue French
  • Taille du fichier 33.4kB