Oracle9i for Dummies FAQ

Oracle9i for Dummies FAQ

See also: Oracle9i for Dummies CORRECTIONS for book page images and their corrections.

Question: The link shown in the book (www.dummies.com/extras/oracle9i) is no longer available. Where can I download the sample tables?

Answer: Dummies Press was purchased by Wiley, and the new page is found here.

Question: The tree structure in my Enterprise Manager is different from screen shots in the book. For example, under Schema, I have a list of schemas, and not folders for different objects. Why are my screens different?

Answer: The screen shots are different because I used the earlier version of 9i and you have the later version (9i release 2). The first problem (seeing schemas instead of object types) can be fixed easily: In the console: Click on Navigator in the top menu and then select Navigator Preferences. A window appears. Click the radio button for "First by object type then by schema" and click OK. Your display will now match the book's images.

Question: Some of the menu items are different in my console than what�s mentioned in the book. What am I missing?

Answer: This was caused by a change between release 1 and 2 of 9i. I attempted to reshoot the screens that changes, but I did not get them all. Just explore a little and you should find similar menu selections in most cases. If you get to one that stumps you, send me an email.

Question: What other books have you written?

Answer: I have written 9 books about Oracle over the last 6 years.

 I coauthored Oracle9i DBA Bible with Jonathan Gennick and Gerrit-Jan Linker. The book is an excellent one for Database Administrators at all levels because it features the latest Oracle tools and techniques for database backups, recoveries, maintenance, and design.

The previous edition of this Dummies series, Oracle8i For Dummies, Second Edition , covers the latest features of Oracle8i.

Question: I have installed Oracle9i and created the ORCL default database duringthe installation. What happens when I want to create two databases -- one for Billing and one for Employees. Must I create another database?

Answer: Your question is quite common when a person has been using a database like Access and then starts working with Oracle.

When you install the software, (oracle.exe etc) you have started to create a database server, but techically, the db server is not the software, but is the database files (as defined above) plus the database instance. When you start up the Oracle database service on your Windows 2000 machine, you are starting an instance. An Oracle instance consists of the background processes started for the Oracle database service and the memory allocated for the SGA.

If you define a Billing database, in Oracle terms, this is called a Schema. This is a key difference between Access-like databases and Oracle which you must understand.

One database can contain many schemas! So, the database instance you are running will be the only one you run on that server, regardless of how many schemas you define (such as Billing, Sales, Employee, and so on). The instance always has one SGA.

Here is the definition of a Schema: schema -The collection of database objects created by one user, such as a table, index, user-defined attribute, an integrity constraint, or a procedure. A schema has the same name as the user who created the objects.

Your database can grow (to provide room for more schemas) by adding new tablespaces or by adding datafiles to an existing tablespace, or by enlarging the size of an existing datafile. Here is the definition of tablespace:

tablespace -A logical data storage space that maps directly to one or more datafiles. The storage capacity of a tablespace is the sum of the size of all the datafiles assigned to that tablespace.

There is NO direct correlation between a datafile and a schema, although it may seem that way if you define one tablespace for everything in the Billing schema and define one datafile for that tablespace. In other words, you cannot copy, for example, the datafile that contains the Employee schema tables and use it alone as its own database. The only way to reach the schema's tables is through the database instance, which handles reading and writing to all the datafiles belonging to the database.

Another note: While it is possible to create multiple instances on one computer, this is usually not done except in larger organizations. As an example of a valid use of two instances on one computer, you might have a test computer that contains one database (and instance) that is a copy of your production database and instance. A second database and instance is used for development of new prototypes. The first instance is used for testing minor application changes prior to porting the application to production. The second instance is strictly for research or development. There are many more permutations. However, the configuration of one instance, one database, and one software installation all on one computer is the most common.

Question: NT Provides a Tool for changing Oracle Parameters (DB_BUFFER_SIZE, etc.) but when I use it, I get an error of "Insufficient Privileges". How do I assign SYSDBA privileges to SYS user when I log on?

Answer: You should log in with the AS SYSDBA parameter: sqlplus sys/manager@yourdb AS SYSDBA If you are using a tool like SQL*Plus worksheet, there is a box where you select "Normal" "Connect as SYSDBA" or "Connect as SYSOPER" , you should select "Connect as SYSDBA" when you log in with the SYS user because this is the only mode in which you acquire SYSDBA privileges.

Question: How might I change my default Medium size Oracle Database into a Large size database?

Answer: The difference between a Medium and Large size database is in the initialization parameters. You can find the differences by looking at the comments found in the init.ora file. (if your database's name is ORATEST, then the file name is initORATEST.ora). This file is found in or under the ADMIN directory under the oracle home directory. There are settings shown for small, medium and large databases. They are displayed as comments with the # sign at the beginning of the line. Uncomment the desired settings, and change the current settings into a comment by adding the # sign to the line.

Question: I want to automate a process that we have at the end of each month that copies old records into a prior_months table and deletes these old records from the current_month table. How might I do this?

Answer: I suggest using Oracle Enterprise Manager, running in Enterprise Management Server mode, which allows you to set up jobs that are executed at pre-determined times. You can set it up to run a job at the end of each month at midnight, for example. 1

Hosted by www.Geocities.ws