Oracle 面试宝典 - 2

1. How would you determine the time zone under which a database was operating?

SELECT dbtimezone FROM DUAL;

2. Explain the use of setting GLOBAL_NAMES equal to TRUE.

It ensure the use of consistent naming conventions for databases and links in a networked environment.

3. What command would you use to encrypt a PL/SQL application?

WRAP

4. Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

They are all named PL/SQL blocks.
Function must return a value. Can be called inside a query.
Procedure may or may not return value.
Package is the collection of functions, procedures, variables which can be logically grouped together.

5. Explain the use of table functions.

6. Name three advisory statistics you can collect.

7. Where in the Oracle directory tree structure are audit traces placed?

8. Explain materialized views and how they are used.

9. When a user process fails, what background process cleans up after it?

PMON

10. What background process refreshes materialized views?

Job Queue Process (CJQ)

11. How would you determine what sessions are connected and what resources they are waiting for?

v$session,v$session_wait

12. Describe what redo logs are.

13. How would you force a log switch?

alter system switch logfile;

14. Give two methods you could use to determine what DDL changes have been made.

15. What does coalescing a tablespace do?

Coalesce simply takes contigous free extents and makes them into a single bigger free extent.

16. What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

TEMP tablespace gets cleared once the transaction is done where as PERMANENT tablespace retails the data.

17. Name a tablespace automatically created when you create a database.

SYSTEM

18. When creating a user, what permissions must you grant to allow them to connect to the database?

Grant create session to username;

19. How do you add a data file to a tablespace?

alter tablespace USERS add datafile ‘/ora01/oradata/users02.dbf‘ size 50M;

20. How do you resize a data file?

alter database datafile ‘/ora01/oradata/users02.dbf‘ resize 100M;

21. What view would you use to look at the size of a data file?

dba_data_files

22. What view would you use to determine free space in a tablespace?

dba_free_space

23. How would you determine who has added a row to a table?

By implementing an INSERT trigger for logging details during each INSERT operation on the table

24. How can you rebuild an index?

ALTER INDEX index_name REBUILD;

25. Explain what partitioning is and what its benefit is.

A table partition is also a table segment, and by using partitioning technique we can enhance performance of table access.

26. You have just compiled a PL/SQL package but got errors, how would you view the errors?

show errors

27. How can you gather statistics on a table?

exec dbms_stats.gather_table_stats
Also, remember to analyze all associated indexes on that table using dbms_stats.gather_index_stats

28. How can you enable a trace for a session?

alter session set sql_trace=‘TRUE‘;

29. What is the difference between the SQL*Loader and IMPORT utilities?

SQL*LOADER loads external data which is in OS files to oracle database tables while IMPORT utility imports data only which is exported by EXPORT utility of oracle database.

30. Name two files used for network connection to a database.

TNSNAMES.ORA and SQLNET.ORA

from http://www.orafaq.com/wiki/Interview_Questions

时间: 2024-10-02 11:39:17

Oracle 面试宝典 - 2的相关文章

Oracle 面试宝典 - 3

1. Describe the difference between a procedure, function and anonymous pl/sql block.  Candidate should mention use of DECLARE statement, a function must return a value while a procedure doesn't have to. 2. What is a mutating table error and how can y

Oracle 面试宝典 - 1

1. Explain the difference between a hot backup and a cold backup and the benefits associated with each. A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is ta

Oracle 面试宝典 - 5

1. Give one method for transferring a table from one schema to another: There are several possible methods, export-import, CREATE TABLE... AS SELECT, or COPY. 2. What is the purpose of the IMPORT option IGNORE? What is it?s default setting The IMPORT

Oracle 面试宝典 - 6

1. How can variables be passed to a SQL routine By use of the & symbol. For passing in variables the numbers 1-8 can be used (&1, &2,...,&8) to pass the values after the command into the SQLPLUS session. To be prompted for a specific varia

Oracle 面试宝典 - 4

1. A tablespace has a table with 30 extents in it. Is this bad? Why or why not. Multiple extents in and of themselves aren?t bad. However if you also have chained rows this can hurt performance. 2. How do you set up tablespaces during an Oracle insta

Oracle 面试宝典 - 7

1. What is a CO-RELATED SUBQUERY A CO-RELATED SUBQUERY is one that has a correlation name as table or view designator in the FROM clause of the outer query and the same correlation name as a qualifier of a search condition in the WHERE clause of the

Oracle 面试宝典 - 8

1. What is a pseudo column. Give some examples It is a column that is not an actual column in the table. eg USER, UID, SYSDATE, ROWNUM, ROWID, NULL, AND LEVEL. Suppose customer table is there having different columns like customer no, payments.What w

Oracle 面试宝典 - General Questions

转自 http://www.orafaq.com/wiki/Interview_Questions Tell us about yourself/ your background. What are the three major characteristics that you bring to the job market? What motivates you to do a good job? What two or three things are most important to

Java面试宝典2013版(超长版)

一. Java基础部分......................................................................................................2 1.一个".java"源文件里能否够包含多个类(不是内部类)?有什么限制?.....2 2.Java有没有goto?........................................................................