Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sve moguce sifre:
- VIRTUALKA: administrator / Passw0rd$
- ORACLE ADMIN USERS: sys, system / Manager1
- HOST LOGIN: administrator / Passw0rd$ ili mozda Passw0rd
- Global DB name: orcl/Manager1
- Ulaz u bazu: https://localhost:1158/em
- User:sys Pass: Manager1 SYSDBA
- ISHOD 6
- 1. – korisniku test1 dati admin privilegije da se moze prijaviti u Ent.Manager (Vjezba 2, stranica 8)
- 1. Pritisnite Setup u desnom-gornjem kutu na Database Home stranici.
- 2. Pritisnite na Administrators tab u lijevom izborniku. Prikazat će se lista Administratora.
- Pritisnite Create za dodavanje upravljačkih prava postojećem database korisniku . Stranica
- Create Administrator Properties će se prikazati.
- 3. U ovom karaku će mo dodijeliti prava administratiora OEM-a postojećem HR korisniku.
- Unesite vijednosti: Name: HR Email: ostavite prazan
- Napomena: Možete pritisnuti flashlight ikonu nakon polja Name za odabir nekog postojećeg
- database korinika kroz pop-up prozor. Pritisnite Review.
- 4. Create Administrator: Review page će se pojaviti. Pritisnite Finish.
- 5. Novo pridodani korisnik OEM-a će se pojaviti na Administrators stranici.
- 2. – U Ent. Manager pohrani kao preferred credentials za Oracle instancu kor. Ime i pass za ORACLE korisnike „sys“ i „system“ i za WINDOWS korisnika „Administrator“. Provjeri da je ispravno (Vjezba 2, stranica 15)
- Možete postaviti preferiranog korisnika za pristup Enterprise Manageru koji će se automatski
- koristiti za prijavu za obavljanje upravljačkih poslova na instanci kao što su backup i recovery.
- Radi sigurnosti, Oracle preferira spremanja vjerodajnice u šifriranom modu. Možete postaviti
- željenu vjerodajnice Enterprise Manager-a obavljanjem sljedećih koraka:
- 1. Pritisni Preferences na vrhu početne stranice.
- 2. Pojavit će se stranica Preferences. Pritisnite Preferred Credentials u lijevom tabu.
- 3. Pojavit će se stranica Preferred Credentials. Pritisnte ikonu Set Credentials za the Database
- Instance Target Type.
- 4. Pojavit će se stranica Database Preferred Credentials page. Unesite tražene username i
- password za pristup kao tip usera normal, SYSDBA usera i serverskog usera. Pritisnite Test.
- 5. Dobit će te poruku o uspješnosti testa i vaše vjerodajnice su verificirane. Pritisnite Apply za
- spremanje preferiranih vjerodajnica.
- 3. – Kreiraj blackout s parametrima: (Vjezba 2, stranica 11)
- a) Name: Poslovi odrzavanja
- b) Comments: Spustanje baze radi odrzavanja
- c) Reason: DB: Database Cloud Backup
- d) Omogućite izvršavanje job-ova za vrijeme blackouta
- e) Target je Oracle database instance orcl
- f) Blackout se postavlja jednokratno, pocinje sa sutrasnjim datumom u 10 sati prije podne i traje 5 sati
- Kad planirate spuštanje bazu podataka zbog održavanja, možete naznačiti da ne želite da
- OBAVIJESTI o tome bude poslana administratorima OEM-a, tako da definirate Blackout razdoblje. To
- će vam omogućiti vam da se suspendira praćenje rada baze od strane OEM agenta kako bi se
- obavljati i druge operacije održavanja. Možete odrediti vrijeme Blackout-a kroz Enterprise Manager
- izvođenjem sljedećih koraka:
- 1. Pritisnite Setup u desnom-gornjem kutu na Database Home stranici, i pritisnite Blackouts u
- lijevom tabu.
- 4. Kada se pojavi Blackouts stranica pritisnite Create za pokretanje Create Blackout wizarda.
- Unesite naziv vašeg blackout-a u za to predviđeno polje. Možete i dodati komentar, no to polje
- nije obavezno za unos. Odaberite razlog za definirani BLACKOUT, npr DB Database Patch…
- Odaberite Database Instancu u drop-down izborniku od dostupnih Targeta. Pritisnite NEXT.
- 3. Pojavit će se Create Blackout: Schedule page. Unesite početno vrijeme kada planirate
- blackout, ili odaberite immediately ako želite odmah spustiti odabranu instancu. Odaberite
- vrijeme trajanja ili postavite indefinite, ili unesite vrijeme do kada će trajati vaš blackout. Za
- Repeating prihvatite predloženu vrijednost "Do Not Repeat" ili odaberite frekvenciju
- ponavljanja. Pritisnite Next.
- 4. Pojavit će se Create Blackout: Review page. Provjerite unesene podatke i ako je sve
- uneseno točno pritisnite Finish. Možete se i vratiti ukoliko želite promijeniti neke postavke
- vašeg BLACKOUT-a.
- 5. Kada je BLACKOUT kreiran dobit će te potvrdnu poruku.
- ISHOD 7
- 1. – Konfiguriraj Local Service Naming pomocu Oracle Net Manager s parametrima:
- a) Net Service Name: testorcl
- b) TCP/IP (Internet protocol)
- c) Host Name: localhost
- d) Port Number: 1521
- e) Service Name: orcl
- Testiraj konfig. tako da se prijavis u bazu kao korisnik system. Kod izlaska sacuvaj promjene.
- (Vjezba 3, stranica 6)
- Configuring Local Naming Using Net Manager
- You must configure a client machine so it can connect to an Oracle database. You must first install Oracle
- Database client software, which includes Oracle Net software. Once you have installed Oracle Net, you can use
- Oracle Net Manager to configure a net service name using the local naming method as follows:
- 1. On UNIX or Linux, invoke Oracle Net Manager by entering netmgrat the command line.
- The Welcome window appears. On Windows invoke Oracle Net Manager by
- Start Menu->Programs->Oracle->OraDb11g_home1->Configuration and Migration Tools->Net Manager
- 2. Expand Local and select Service Naming. Click the (plus) + on the left hand side of the page.
- 3. Click Edit > Create.
- 4. The Net Service Welcome window appears. Enter a net service name. Click Next.
- 5. Select the protocol to use to connect to your database. You can accept the default TCP/IP (Internet
- Protocol). The database listener must be configured to use the same network protocol. Click Next
- 6. Enter the host name of the database machine. Click Next.
- 7. Enter the database service name. In addition, select a Connection Type, either Shared or Dedicated. If
- you are not unsure or would like to use the default database connection type, select Database Default.
- Click Next.
- 8. The last window of the wizard enables you to test the connection using the information you entered.
- Click Test.
- 9. By default, the user named SCOTT is used for the test. If this account is locked as shown in the example,
- you can change the default login by clicking Change Login and entering a different username and password.
- Click Change Login.
- 10. Enter a username and password to test the connection. You can use system with the password of oracle.
- Click OK.
- 11. Click Test.
- The wizard tells you if the connection test succeed or not. Click Close. Click Finish.
- The new service appears under the Service Naming folder. You can view or modify the configuration for the
- highlighted service under Service Identification and Address Configuration.
- Save your changes and exit out of Oracle Net Manager window by clicking File -> Save Network
- Configuration and then File -> Exit.
- 2. – Pronađi i ispisi nazive redo log datoteka orcl baze i direktorija u kojem se nalaze (Vjezba 5, stranica 2-7)
- …stranica 7 => …Return to the Server page by clicking
- the database link at the top of the page.
- 5. Click Redo Log Groups on the Server page to access the Redo Log Groups
- property page. The Redo Log Groups page shows the attributes of the redo log
- groups for your database.
- 3. – Kreiraj tablespace tstest u bazi orcl i dodajte mu datoteku tstest01.dbf velicine 5MB. Omogucite autoextend za tu datoteku s inkrementom od 300KB. (Vjezba 5, stranica 9)
- In this section you will learn how to create a new tablespace for your database.
- Perform the steps listed below to create the FSDATAtablespace. This tablespace
- will be used to store
- the tables of your database. Repeat these steps to create the FSINDEX tablespace
- which will be used for storage of the indexes in your database.
- 1. Click Tablespaces on the Server page to access the Tablespaces property page.
- Click Create.
- 2. The Create Tablespace page appears. Enter FSDATA in the Name field. Select
- Locally Managed under the Extent Management heading. Select Permanent
- under the Type heading. Select Read Write under the Status heading. Click Add in
- the Datafiles region of the page.
- 3. The Add Datafile page appears. Enter a file name in the File Name field on the
- Add Datafiles page. Accept the defaults for the File Directory and File Size or enter
- new values. Select the option Reuse Existing File. Select Automatically extend
- datafile when full (AUTOEXTEND) and specify an amount in the Increment field
- by which you want to extend the datafile each time it fills. Click Continue.
- 4. You are returned to the Create Tablespace General page. Click the Storage tab.
- 5. The Storage page appears. Accept all of the defaults on the Storage page. Click
- OK to create your tablespace.
- 6. You are returned to the Tablespaces page where you receive a confirmation of
- the creation of the tablespace. You can view your new tablespace in the Results
- region.
- 7. Repeat steps 2 through 6 to create the FSINDEX tablespace. This tablespace will
- be used to store the indexes in your database. Return to the Server page by clicking
- the database link at the top of the page.
- 4. – Pronađite i napisite velicinu undo tablespace u bazi orcl i koliki je undo retention. (Vjezba 5, stranica 2)
- Using the Undo Advisor The undo tablespace is set to auto-extend by default when
- you use DBCA to configure your database. If your undo tablespace is not auto-
- extensible, you may need to extend the tablespace. You can use the undo advisor to
- obtain advise on the undo tablespace size. You can access the undo advisor as
- follows:
- 1. Click Automatic Undo Management in the Database Configuration region
- to access the Automatic Undo Management page.
- 2. The Automatic Undo Management page is displayed. Scroll down the page
- to the Undo Advisor section. Click on the Analysis Time Period drop-down
- menu and select Last One Day. Click Run Analysis.
- 3. The Analysis Results are displayed. Click Show Graph to view a graphical
- representation.
- 4. The tablespace size required to meet your specifications is displayed in the
- Analysis section as well as a graphical representation of this information.
- ISHOD 8
- 1. – Kreirajte pomocu Enterprise Managera korisnika u orcl bazi sa sljedecim parametrima:
- a) Username: orausr1
- b) Password: 2daydba
- c) Profile: ispit
- d) Default tablespace: ts1
- e) Temporary Tablespace: temp
- f) Status: unlocked
- (Vjezba 6, stranica 1 )
- Follow the steps below to create the FSOWNER user:
- 1. Log in to Enterprise Manager Database Console by opening your browser and specifying the SYS username
- and password.
- Click Login.
- 2. Navigate to the Server page. Click Users in the Security section.
- 3. The Users property page appears. Click Create.
- 4. The Create User General page appears. Enter the following values in the fields:
- Username: FSOWNER
- Password: FSOWNER
- Default tablespace: FSDATA
- Temporary tablespace: TEMP
- Status: Unlocked
- Click OK.
- 5. The Users property page is displayed with an Update message confirming the creation of your user.
- You can also see the new user by scrolling down the page. Click the Database link to return to the Server page.
- 2. – Kreirajte pomocu Enterprise Managera korisnika u orcl bazi sa sljedecim parametrima:
- a) osobni_broj number(6)
- b) ime varchar2(30)
- c) prezime varchar2(30)
- d) datum_rodj date
- e) mjesto_rodj varchar2(30)
- f) post_broj number (5)
- g) ulica varchar2(40)
- h) kucni_broj number(4)
- (Vjezba 7, stranica 8)
- Creating a New Table
- In this section you will create three new tables for your database: EMPLOYEES, CUSTOMERS, and ORDERS.
- 1. Click Create on the Tables property page.
- 2. The Create Table: Table Organization page appears. Select Standard, Heap Organized and click Continue.
- 3. The Create Table page appears. Enter employees in the Name field. Enter fsowner in the Schema field.
- Enter fsdata in the Tablespace field. Define the columns as follows and click Add 5 Table Columns.
- Name: EMPLOYEE_ID, Data Type: NUMBER, Size: 6
- Name: FIRST_NAME, Data Type: VARCHAR2, Size: 20
- Name: LAST_NAME, Data Type: VARCHAR2, Size: 25
- Name: EMAIL_ADDRESS, Data Type: VARCHAR2, Size: 25
- Name: PHONE_NUMBER, Data Type: VARCHAR2, Size: 20
- 4. Enter the remaining columns as follows:
- HIRE_DATE DATE
- JOB_ID VARCHAR2(10)
- SALARY NUMBER(8)
- MANAGER_ID NUMBER(6)
- Click Constraints.
- 5. The Constraints page appears. Select PRIMARY from the drop‐down list and click Add.
- 6. The Add PRIMARY Constraint page appears. Enter emp_id_pkin the Name field. Select EMPLOYEE_ID in the
- Available Columns list. Click Move to select it. Click Continue.
- 7. The Create Table page appears. Click OK.
- 8. The Tables page appears with an Update message indicating your table has been created.
- 9. Repeat steps 2 through 8 to create the CUSTOMERS and ORDERS tables in the FSOWNER schema as defined
- below. Name the primary key for the Customers table, CUST_ID_PK, and for the Orders table, ORD_PK_ID.
- 3. – Dodijeli korisniku Oracle baze orausr1 neogranicenu kvotu diskovnog prostora u tablespace ts3
- (Vjezba 6 , stranica 5)
- Changing User Attributes
- In this section you will learn how to change user attributes. The FSOWNER user will create objects in the
- database and needs to have quota on the FSDATA tablespace to create objects in it.
- Perform the steps listed below to enable the FSOWNER user to create objects in the FSDATA tablespace:
- 1. Click Users in the Security section on the Server page to access the Users property page. Select FSOWNER in
- the results list and click Edit.
- 2. The Edit User General page is displayed. Click Quotas to display the Quotas page.
- 3. Select Unlimited from the Quota drop‐down menu for the FSDATA tablespace. Click Apply.
- 4. The Edit User page appears with an Update message confirming your change. Note the quota value of ‐1
- indicating Unlimited.
- Click the Users link to return to the Users property page.
- 4. – Kreirajte pogled nad tablicom osobe u shemi test2 u bazi sa sljedecom select naredbom:
- select ime, prezime from osobe where post_broj=10000(Vjezba 7, stranica 26 )
- Creating a New View
- Perform the steps listed below to create a new view:
- 1. Click Create on the Views property page.
- 2. Enter the following information and click OK.
- View name: CLERK10_ORDS
- Schema: FSOWNER
- Query text:
- SELECT order_id, customer_id, order_total FROM orders WHERE sales_clerk_id = 10
- 3. The Views page is displayed confirming the creation of your view.
- Click the Database Instance link to return to the Schema page.
- ISHOD 9
- 1. – U Oracle bazi konfigurirajte flash recovery area velicine 1GB koji se nalazi u direktoriju c:\Oracle\fast_recovery_area
- (Vjezba 8, stranica 2)
- 1. At the operating system prompt, increase the size for the backup and recovery areas. Execute the
- following commands:
- sqlplus system/oracle
- alter system set db_recovery_file_dest_size=8G scope=both;
- exit
- 2. At the operating system prompt, create a directory for the flash recovery area. Execute the following
- commands:
- cd $ORACLE_BASE
- mkdir flash_rec_area
- 3. Log in to Enterprise Manager Database Console by opening your browser and specifying the SYS
- username and password as SYSDBA. Click Login.
- 4. Click Availability on your Oracle Database Home page.
- 5. Select Recovery Settings in the Backup/Recovery Settings section. You can use the Recovery
- Settings page to configure the settings for the recovery utility, including the Flash Recovery Area.
- 6. The Recovery Settings page appears. Scroll to the Flash Recovery section. If the flash recovery area
- is not enabled for your database, configure the flash recovery area by entering the following values in
- the appropriate fields:
- Flash Recovery Area Location: <directory you created in step 1>
- Flash Recovery Area Size: 8 GB
- 7. Scroll up to the top of the window. Check ARCHIVELOG Mode to configure ARCHIVELOG
- mode for your database. Click Apply.
- 8. The Verify Flash Recovery Area Location: Specify Host Credentials window appears. Enter the host
- credentials to ensure appropriate access has been granted. Click Continue.
- 9. A message confirming your changes is displayed. To complete the configuration of ARCHIVELOG
- mode, the database instance must be shut down. Click Yes to shut down the instance and restart it.
- 10.The Restart Database:Specify Host and Target Database Credentials page is displayed. Enter your
- host credentials and database credentials. Click OK.
- 11.The Restart Database:Confirmation page is displayed. Click Yes to shut down the instance and restart
- it.
- 12.The Restart Database:Activity Information page is displayed. Click Refresh to log in to Enterprise
- Manager Database Control and log back into Enterprise Manager once the database has been
- restarted.
- 2. – Postavite backup postavke za bazu sa sljedecim vrijednostima parametara:
- a) Parallelism:2
- b) Disk Backup Location: flash recovery podrucje
- c) Disk Backup type: Image Copy
- d) Automatically backup control file i server parameter file
- e) Retain backups: 20 dana
- (Vjezba 8, stranica 8)
- You can configure a number of settings and policies that determine how backups are stored, which data is
- backed up, how backups perform, and how long backups are retained before being purged from the
- recovery area. You can also configure features to improve backup performance.
- 12.The Restart Database:Activity Information page is displayed. Click Refresh to log in to Enterprise
- Manager Database Control and log back into Enterprise Manager once the database has been
- restarted.
- 1.Click Availability on your Oracle Database Home page.
- 2.Select Backup Settings in the Backup/Recovery Setup section.
- 3.Scroll to the Host Credentials region on the Backup Settings page. Enter the operating system
- username and password. Scroll up to the Disk Settings section.
- 4.Accept the value of 1 in the Parallelism field. The Disk Backup Location field is set to null so that the
- flash recovery area will be used for backups. Select Backup Set for Disk Backup Type. Click Test
- Disk Backup.
- 5.A message is displayed indicating the disk settings backup test was successful. Now you will
- configure backup policy settings. Click Policy to access the Policy page.
- 6.Select Automatically backup the control file and server parameter file (SPFILE) with every
- backup and database structural change. Select Optimize the whole database backup by
- skipping unchanged files such as read-only and offline datafiles that have been backed up.
- Select Enable block change tracking for faster incremental backups. Enter a file name for the
- Block Change Tracking file. Then scroll down to the Retention Policy section.
- 7.Select Retain backups that are necessary for a recovery to any time within the specified number
- of days (point-in-time recovery) and accept the default of 31 days. Under the Archivelog Deletion
- Policy, select Delete archivelogs after it has specified number of backups and accept the default
- of 1 backup. Click OK. You are returned to the Availability page.
- 3. – Pronadji u bazi vrijednosti za db_unique_name i dbid i napisite ih
- (Vjezba 8, stranica 11)
- 1.Click the Server tab. Click Initialization Parameters in the Database Configuration region.
- 2.The Current property page appears. Enter db_unique_name in the Name field and click Go.
- 3.The resulting page displays a row with db_unique_name in the Name column, and the
- db_unique_name value for your database in the Value column.
- Record this value so that you will have it should you need it in the future for a recovery operation.
- Click the Database Instance link to return to the Server page.
- Perform the steps below to determine your DBID:
- 1.Click Control Files in the Storage region of the Server page.
- 2.The Control Files property page appears. Select the Advanced property page.
- 3.The Database ID field contains the DBID value. (Note: Your machine will have a different value).
- Record this value so that you will have it should you need it in the future for a recovery operation.
- Click the Database Instance link to return to the Server page.
- 4. – Omogucite row movement za tablicu bonus kojoj je vlasnik korisnik test2
- (Vjezba 8, stranica 27)
- You must enable row movement on a table in order to perform a flashback table operation on the table. In
- this section you enable row movement on the HR.EMPLOYEES table.
- 1.Click the Schema tab.
- 2.Select Tables in the Database Objects section.
- 3.The Tables page appears. Enter HR in the Schema field and REGIONS in the Object Name field.
- Click Go.
- 4.The REGIONS table is displayed in the Results section. Click Edit.
- 5.The Edit Table page appears. Click the Options tab.
- 6.Select Yes from the Enable Row Movement list. Click Apply.
- 7.You receive a message indicating your table has been successfully modified. Click the Tables
- breadcrumb.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement