Oracle DBA FAQs and Tips - 400 Questions/Tutorials
This is a collection of FAQ and tips for Oracle DBA and developers. The clear answers and sample scripts provided can be used as learning tutorials or interview preparation guides.
It doesn't matter whether you are a beginner or an experienced Oracle DBA or developer, browse through our Oracle DBA FAQ and tips. They will always help you to improve your skills and find some good ideas to solve problems in your daily tasks.
So far, Our Oracle developers have written 400 questions and answers to share with you. Each one of them answers one commonly asked Oracle question with a short, but precise and clear SQL script. More questions will be available soon. Please come back to visit this page again.
This is a collection of 17 FAQs for Oracle DBA on fundamental concepts. The clear answers and sample scripts provided can be used as learning tutorials or interview preparation guides.
- What Is Oracle?
- What Is an Oracle Database?
- What Is an Oracle Instance?
- What Is a Parameter File?
- What Is a Server Parameter File?
- What Is an Initialization Parameter File?
- What Is System Global Area (SGA)?
- What Is Program Global Area (PGA)?
- What Is a User Account?
- What Is the Relation of a User Account and a Schema?
- What Is a User Role?
- What Is a Database Schema?
- What Is a Database Table?
- What Is a Table Index?
- What Is an Oracle Tablespace?
- What Is an Oracle Data File?
- What Is a Static Data Dictionary?
- What Is a Dynamic Performance View?
- What Is a Recycle Bin?
- What Is SQL*Plus?
- What Is Transport Network Substrate (TNS)?
- What Is Open Database Communication (ODBC)?
This is a collection of 21 FAQs for Oracle DBA on Oracle 10g Express Edition with installation and basic introduction. The clear answers and sample scripts provided can be used as learning tutorials or interview preparation guides.
- What Is Oracle Database 10g Express Edition?
- What Are the Limitations of Oracle Database 10g XE?
- What Operating Systems Are Supported by Oracle Database 10g XE?
- How To Download Oracle Database 10g XE?
- How To Install Oracle Database 10g XE?
- How To Check Your Oracle Database 10g XE Installation?
- How To Shutdown Your 10g XE Server?
- How To Start Your 10g XE Server?
- How Much Memory Your 10g XE Server Is Using?
- How To Start Your 10g XE Server from Command Line?
- How To Shutdown Your 10g XE Server from Command Line?
- How To Unlock the Sample User Account?
- How To Change System Global Area (SGA)?
- How To Change Program Global Area (PGA)?
- What Happens If You Set the SGA Too Low?
- What To Do If the StartDB.bat Failed to Start the XE Instance?
- How To Login to the Server without an Instance?
- How To Use "startup" Command to Start Default Instance?
- Where Are the Settings Stored for Each Instance?
- What To Do If the Binary SPFile Is Wrong for the Default Instance?
- How To Check the Server Version?
A collection of 25 FAQs on Oracle command-line SQL*Plus client tool. Clear answers are provided with tutorial exercises on creating tnsnames.ora and connecting to Oracle servers; SQL*Plus settings and environment variables; saving query output to files; getting query performance reports.
- What Is SQL*Plus?
- How To Start the Command-Line SQL*Plus?
- How To Get Help at the SQL Prompt?
- What Information Is Needed to Connect SQL*Plus an Oracle Server?
- What Is a Connect Identifier?
- How To Connect a SQL*Plus Session to an Oracle Server?
- What Happens If You Use a Wrong Connect Identifier?
- What To Do If DBA Lost the SYSTEM Password?
- What Types of Commands Can Be Executed in SQL*Plus?
- How To Run SQL Commands in SQL*Plus?
- How To Run PL/SQL Statements in SQL*Plus?
- How To Change SQL*Plus System Settings?
- How To Look at the Current SQL*Plus System Settings?
- What Are SQL*Plus Environment Variables?
- How To Generate Query Output in HTML Format?
- What Is Output Spooling in SQL*Plus?
- How To Save Query Output to a Local File?
- What Is Input Buffer in SQL*Plus?
- How To Revise and Re-Run the Last SQL Command?
- How Run SQL*Plus Commands That Are Stored in a Local File?
- How To Use SQL*Plus Built-in Timers?
- What Is Oracle Server Autotrace?
- How To Set Up Autotrace for a User Account?
- How To Get Execution Path Reports on Query Statements?
- How To Get Execution Statistics Reports on Query Statements?
A collection of 28 FAQs on Oracle SQL language basics. Clear answers are provided with tutorial exercises on data types, data literals, date and time values, data and time intervals, converting to dates and times, NULL values, pattern matches.
- What Is SQL Standard?
- How Many Categories of Data Types?
- What Are the Oracle Built-in Data Types?
- What Are the Differences between CHAR and NCHAR?
- What Are the Differences between CHAR and VARCHAR2?
- What Are the Differences between NUMBER and BINARY_FLOAT?
- What Are the Differences between DATE and TIMESTAMP?
- What Are the Differences between INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND?
- What Are the Differences between BLOB and CLOB?
- What Are the ANSI Data Types Supported in Oracle?
- How To Write Text Literals?
- How To Write Numeric Literals?
- How To Write Date and Time Literals?
- How To Write Date and Time Interval Literals?
- How To Convert Numbers to Character Strings?
- How To Convert Characters to Numbers?
- How To Convert Dates to Characters?
- How To Convert Character Strings to Dates?
- How To Convert Times to Character Strings?
- How To Convert Character Strings to Times?
- What Is NULL Value?
- How To Use NULL as Conditions?
- How To Concatenate Two Text Values?
- How To Increment Dates by 1?
- How To Calculate Date and Time Differences?
- How To Use IN Conditions?
- How To Use LIKE Conditions?
- How To Use Regular Expression in Pattern Match Conditions?
A collection of 11 FAQs on Oracle SQL DDL statements. Clear answers are provided with tutorial exercises on creating, altering and dropping tables, indexes, and views.
- What Are DDL Statements?
- How To Create a New Table?
- How To Create a New Table by Selecting Rows from Another Table?
- How To Add a New Column to an Existing Table?
- How To Delete a Column in an Existing Table?
- How To Drop an Existing Table?
- How To Create a Table Index?
- How To Rename an Index?
- How To Drop an Existing Index?
- How To Create a New View?
- How To Drop an Existing View?
A collection of 15 FAQs on Oracle SQL DML statements. Clear answers are provided with tutorial exercises on inserting, updating and deleting rows from database tables.
- What Are DML Statements?
- How To Create a Testing Table?
- How To Set Up SQL*Plus Output Format?
- How To Insert a New Row into a Table?
- How To Specify Default Values in INSERT Statement?
- How To Omit Columns with Default Values in INSERT Statement?
- How To Insert Multiple Rows with One INSERT Statement?
- How To Update Values in a Table?
- How To Update Values on Multiple Rows?
- How To Use Existing Values in UPDATE Statements?
- How To Use Values from Other Tables in UPDATE Statements?
- What Happens If the UPDATE Subquery Returns Multiple Rows?
- How To Delete an Existing Row from a Table?
- How To Delete Multiple Rows from a Table?
- How To Delete All Rows from a Table?
A collection of 33 FAQs on Oracle SQL SELECT query statements. Clear answers are provided with tutorial exercises on selecting rows and columns from tables and views, sorting and counting query outputs, grouping outputs and applying group functions, joining tables, using subqueries.
- What Is a SELECT Query Statement?
- How To Select All Columns of All Rows from a Table?
- How To Select Some Columns from a Table?
- How To Select Some Rows from a Table?
- How To Sort the Query Output?
- Can the Query Output Be Sorted by Multiple Columns?
- How To Sort Query Output in Descending Order?
- How To Use SELECT Statement to Count the Number of Rows?
- Can SELECT Statements Be Used on Views?
- How To Filter Out Duplications in Returning Rows?
- What Are Group Functions?
- How To Use Group Functions in the SELECT Clause?
- Can Group Functions Be Mixed with Non-group Selection Fields?
- How To Divide Query Output into Groups?
- How To Apply Filtering Criteria at Group Level?
- How To Count Duplicated Values in a Column?
- Can Multiple Columns Be Used in GROUP BY?
- Can Group Functions Be Used in the ORDER BY Clause?
- How To Join Two Tables in a Single Query?
- How To Write a Query with an Inner Join?
- How To Define and Use Table Alias Names?
- How To Write a Query with a Left Outer Join?
- How To Write a Query with a Right Outer Join?
- How To Write a Query with a Full Outer Join?
- How To Write an Inner Join with the WHERE Clause?
- How To Write a Left Outer Join with the WHERE Clause?
- How To Name Query Output Columns?
- What Is a Subquery?
- How To Use Subqueries with the IN Operator?
- How To Use Subqueries with the EXISTS Operator?
- How To Use Subqueries in the FROM Clause?
- How To Count Groups Returned with the GROUP BY Clause?
- How To Return Top 5 Rows?
A collection of 22 FAQs on Oracle SQL transaction management. Clear answers are provided with tutorial exercises on starting and ending transactions, committing and rolling back transactions, transaction/statement-level read consistency, read committed isolation level, locks and dead locks.
- What Is a Transaction?
- How To Start a New Transaction?
- How To End the Current Transaction?
- How To Create a Test Table for Transaction Testing?
- How To Commit the Current Transaction?
- How To Rollback the Current Transaction?
- What Happens to the Current Transaction If a DDL Statement Is Executed?
- What Happens to the Current Transaction If the Session Is Ended?
- What Happens to the Current Transaction If the Session Is Killed?
- How Does Oracle Handle Read Consistency?
- What Is a READ WRITE Transaction?
- What Is a READ ONLY Transaction?
- How To Set a Transaction To Be READ ONLY?
- What Are the Restrictions in a READ ONLY Transaction?
- What Are the General Rules on Data Consistency?
- What Are Transaction Isolation Levels Supported by Oracle?
- What Is a Data Lock?
- How Data Locks Are Respected?
- How To Experiment a Data Lock?
- How To View Existing Locks on the Database?
- What Is a Dead Lock?
- How Oracle Handles Dead Locks?
A collection of 23 FAQs on Oracle user account, schema and privileges. Clear answers are provided with tutorial exercises on creating user accounts, granting privileges for session connections, granting privileges for creating tables and inserting rows.
- What Is a User Account?
- What Is the Relation of a User Account and a Schema?
- What Is a User Role?
- What Are the System Predefined User Roles?
- What Are Internal User Account?
- How To Connect to the Server with User Account: SYS?
- How To Use Windows User to Connect to the Server?
- How To List All User Accounts?
- How To Create a New User Account?
- How To Change User Password?
- How To Delete a User Account?
- What Privilege Is Needed for a User to Connect to Oracle Server?
- How To Grant CREATE SESSION Privilege to a User?
- How To Revoke CREATE SESSION Privilege from a User?
- How To Lock and Unlock a User Account?
- What Privilege Is Needed for a User to Create Tables?
- How To Assign a Tablespace to a Users?
- What Privilege Is Needed for a User to Create Views?
- What Privilege Is Needed for a User to Create Indexes?
- What Privilege Is Needed for a User to Query Tables in Another Schema?
- What Privilege Is Needed for a User to Insert Rows to Tables in Another Schema?
- What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema?
- How To Find Out What Privileges a User Currently Has?
A collection of 18 FAQs on database tables for DBA and developers. Clear answers are provided together with tutorial exercises to help beginners on creating, altering and removing tables, adding, altering and removing columns, and working with recycle bin.
- What Is a Database Table?
- How Many Types of Tables Supported by Oracle?
- How To Create a New Table in Your Schema?
- How To Create a New Table by Selecting Rows from Another Table?
- How To Rename an Existing Table?
- How To Drop an Existing Table?
- How To Add a New Column to an Existing Table?
- How To Add a New Column to an Existing Table with a Default Value?
- How To Rename a Column in an Existing Table?
- How To Delete a Column in an Existing Table?
- How To View All Columns in an Existing Table?
- How To Recover a Dropped Table?
- What Is Recycle Bin?
- How To Turn On or Off Recycle Bin for the Instance?
- How To View the Dropped Tables in Your Recycle Bin?
- How To Empty Your Recycle Bin?
- How To Turn On or Off Recycle Bin for the Session?
- How To List All Tables in Your Schema?
This is a collection of 14 FAQs for Oracle DBA on creating, dropping, rebuilding and managing indexes. The clear answers and sample scripts provided can be used as learning tutorials or interview preparation guides.
- What Is an Index?
- How To Run SQL Statements through the Web Interface?
- How To Create a Table Index?
- How To List All Indexes in Your Schema?
- What Is an Index Associated with a Constraint?
- How To Rename an Index?
- How To Drop an Index?
- Can You Drop an Index Associated with a Unique or Primary Key Constraint?
- What Happens to Indexes If You Drop a Table?
- How To Recover a Dropped Index?
- What Happens to the Indexes If a Table Is Recovered?
- How To Rebuild an Index?
- How To See the Table Columns Used in an Index?
- How To Create a Single Index for Multiple Columns?
A collection of 19 FAQs on creating and managing tablespaces and data files. Clear answers are provided with tutorial exercises on creating and dropping tablespaces; listing available tablespaces; creating and dropping data files; setting tablespaces and data files offline; removing corrupted data files.
- What Is an Oracle Tablespace?
- What Is an Oracle Data File?
- How a Tablespace Is Related to Data Files?
- How a Database Is Related to Tablespaces?
- How To View Tablespaces in the Current Database?
- What Are the Predefined Tablespaces in a Database?
- How To View Data Files in the Current Database?
- How To Create a New Oracle Data File?
- How To Create a New Tablespace?
- How To Rename a Tablespace?
- How To Drop a Tablespace?
- What Happens to Data Files If a Tablespace Is Dropped?
- How To Create a Table in a Specific Tablespace?
- How To See Free Space of Each Tablespace?
- How To Bring a Tablespace Offline?
- How To Bring a Tablespace Online?
- How To Add Another Datafile to a Tablespace?
- What Happens If You Lost a Data File?
- How Remove Data Files before Opening a Database?
This is a collection of 15 FAQs for Oracle DBA on creating Oracle database instances manually using CREATE DATABASE statement. Items in this FAQ collection are organized together to form a complete tutorial guide on creating a new database instance manually.
- How To Create an Oracle Database?
- How To Create an Oracle Database Manually?
- How To Select an Oracle System ID (SID)?
- How To Establish Administrator Authentication to the Server?
- How To Create an Initialization Parameter File?
- How To Connect the Oracle Server as SYSDBA?
- How To Create a Server Parameter File?
- How To Start an Oracle Instance?
- How To Start a Specific Oracle Instance?
- How To Start Instance with a Minimal Initialization Parameter File?
- How To Run CREATE DATABASE Statement?
- How To Do Clean Up If CREATE DATABASE Failed?
- How To Run CREATE DATABASE Statement Again?
- How To Create Additional Tablespaces for an New Database?
- How To Build Data Dictionary View of an New Database?
A collection of 17 FAQs to introduce PL/SQL language for DBA and developers. This FAQ can also be used as learning tutorials on creating procedures, executing procedures, using local variables, controlling execution flows, passing parameters and defining nested procedures.
- What Is PL/SQL?
- What Are the Types PL/SQL Code Blocks?
- How To Define an Anonymous Block?
- How Many Anonymous Blocks Can Be Defined?
- How To Run the Anonymous Block Again?
- What Is a Stored Program Unit?
- How To Create a Stored Program Unit?
- How To Execute a Stored Program Unit?
- How Many Data Types Are Supported?
- What Are the Execution Flow Control Statements?
- How To Use SQL Statements in PL/SQL?
- How To Process Query Result in PL/SQL?
- How To Create an Array in PL/SQL?
- How To Manage Transaction Isolation Level?
- How To Pass Parameters to Procedures?
- How To Define a Procedure inside Another Procedure?
- What Do You Think about PL/SQL?
A collection of 29 FAQs to introduce Oracle SQL Developer, the new free GUI client for DBA and developers. This FAQ can also be used as learning tutorials on SQL statement execution, data objects management, system views and reports, stored procedure debugging.
- What Is Oracle SQL Developer?
- What Operating Systems Are Supported by Oracle SQL Developer?
- How To Download Oracle SQL Developer?
- How To Install Oracle SQL Developer?
- How To Start Oracle SQL Developer?
- Is Oracel SQL Developer written in Java?
- How To Connect to a Local Oracle 10g XE Server?
- How To Connect to a Remote Server?
- How To Run SQL Statements with Oracle SQL Developer?
- How To Export Your Connection Information to a File?
- How To Run SQL*Plus Commands in SQL Developer?
- How To Work with Data Objects Interactively?
- How To Get a CREATE Statement for an Existing Table?
- How To Create a Table Interactively?
- How To Enter a New Row into a Table Interactively?
- What Is the Reports View in Oracle SQL Developer?
- How To Get a List of All Tables in the Database?
- How To Get a List of All User Accounts in the Database?
- How To Get a List of All Background Sessions in the Database?
- How To Create Your Own Reports in SQL Developer?
- How Many File Formats Are Supported to Export Data?
- How To Export Data to a CSV File?
- How To Export Data to an XML File?
- How To Create a Procedure Interactively?
- How To Run a Stored Procedure Interactively?
- How To Run Stored Procedures in Debug Mode?
- How To Assign Debug Privileges to a User?
- How To Set Up Breakpoints in Debug Mode?
- What Do You Think about Oracle SQL Developer?
A collection of 22 FAQs on PL/SQL language basics or DBA and developers. It can also be used as learning tutorials on defining variables, assigning values, using "loop" statements, setting "if" conditions, and working with null values.
- Is PL/SQL Language Case Sensitive?
- How To Enter Comments in PL/SQL?
- What Are the Types of PL/SQL Code Blocks?
- What Is an Anonymous Block?
- What Is a Named Program Unit?
- What Is a Procedure?
- What Is a Function?
- How To Declare a Local Variable?
- How To Initialize Variables with Default Values?
- How To Assign Values to Variables?
- What Are the Arithmetic Operations?
- What Are the Numeric Comparison Operations?
- What Are the Logical Operations?
- How Many Categories of Data Types?
- How Many Scalar Data Types Are Supported in PL/SQL?
- How To Convert Character Types to Numeric Types?
- What Are the Execution Control Statements?
- How To Use "IF" Statements on Multiple Conditions?
- How To Use "WHILE" Loop Statements?
- How To Use "FOR" Loop Statements?
- What Is NULL in PL/SQL?
- How To Test NULL Values?
A collection of 26 FAQs on PL/SQL managing our own procedures. It can also be used as learning tutorials on creating procedures and functions, executing and dropping procedures, passing actual parameters to formal parameters, making optional parameters.
- What Is a Procedure?
- What Is a Function?
- How To Define an Anonymous Procedure without Variables?
- How To Define an Anonymous Procedure with Variables?
- How To Create a Stored Procedure?
- How To Execute a Stored Procedure?
- How To Drop a Stored Procedure?
- How To Pass Parameters to Procedures?
- How To Create a Stored Function?
- How To Call a Stored Function?
- How To Drop a Stored Function?
- How To Call a Stored Function with Parameters?
- How To Define a Sub Procedure?
- How To Call a Sub Procedure?
- How To Define a Sub Function?
- Can Sub Procedure/Function Be Called Recursively?
- What Happens If Recursive Calls Get Out of Control?
- What Is the Order of Defining Local Variables and Sub Procedures/Functions?
- What Is the Difference between Formal Parameters and Actual Parameters?
- What Are the Parameter Modes Supported by PL/SQL?
- How To Use "IN" Parameter Properly?
- How To Use "OUT" Parameter Properly?
- How To Use "IN OUT" Parameter Properly?
- How To Define Default Values for Formal Parameters?
- What Are Named Parameters?
- What Is the Scope of a Local Variable?
A collection of 23 FAQs on working with database objects in PL/SQL. Clear answers are provided with tutorial exercises on running DML statements, assign table data to variables, using the implicit cursor, defining and using RECORDs with table rows.
- Can DML Statements Be Used in PL/SQL?
- Can DDL Statements Be Used in PL/SQL?
- Can Variables Be Used in SQL Statements?
- What Happens If Variable Names Collide with Table/Column Names?
- How To Resolve Name Conflicts between Variables and Columns?
- How To Assign Query Results to Variables?
- Can You Assign Multiple Query Result Rows To a Variable?
- How To Invoke Built-in Functions in PL/SQL?
- How To Retrieve the Count of Updated Rows?
- What Is the Implicit Cursor?
- How To Assign Data of the Deleted Row to Variables?
- What Is a RECORD in PL/SQL?
- How To Define a Specific RECORD Type?
- How To Define a Variable of a Specific RECORD Type?
- How To Assign Values to Data Fields in RECORD Variables?
- How To Retrieve Values from Data Fields in RECORD Variables?
- How To Define a Data Field as NOT NULL?
- How To Define a RECORD Variable to Store a Table Row?
- How To Assign a Table Row to a RECORD Variable?
- How To Insert a RECORD into a Table?
- How To Update a Table Row with a RECORD?
- How To Define a Variable to Match a Table Column Data Type?
A collection of 19 FAQs on working with database objects in PL/SQL. Clear answers are provided with tutorial exercises on defining, opening, and closing cursors, looping through cursors, defining and using cursor variables.
- What Is a Cursor?
- How Many Types of Cursors Supported in PL/SQL?
- What Is the Implicit Cursor?
- How To Use Attributes of the Implicit Cursor?
- How To Loop through Data Rows in the Implicit Curosr?
- How To Define an Explicit Cursor?
- How To Open and Close an Explicit Cursor?
- How To Retrieve Data from an Explicit Cursor?
- How To Retrieve Data from a Cursor to a RECORD?
- How To Use FETCH Statement in a Loop?
- How To Use an Explicit Cursor without OPEN Statements?
- Can Multiple Cursors Being Opened at the Same Time?
- How To Pass a Parameter to a Cursor?
- What Is a Cursor Variable?
- How To Define a Cursor Variable?
- How To Open a Cursor Variable?
- How To Loop through a Cursor Variable?
- How To Pass a Cursor Variable to a Procedure?
- Why Cursor Variables Are Easier to Use than Cursors?
A collection of 27 FAQs on Oracle loading data and exporting data. Clear answers are provided with tutorial exercises on saving data as flat files, loading data from flat, exporting and importing database, schema and tables, creating external tables.
- What Is the Simplest Tool to Run Commands on Oracle Servers?
- What Is the Quickest Way to Export a Table to a Flat File?
- How To Export Data with a Field Delimiter?
- What Is SQL*Loader?
- What Is a SQL*Loader Control File?
- How To Load Data with SQL*Loader?
- What Is an External Table?
- How To Load Data through External Tables?
- What Are the Restrictions on External Table Columns?
- What Is a Directory Object?
- How To Define an External Table in a Text File?
- How To Run Queries on External Tables?
- How To Load Data from External Tables to Regular Tables?
- What Is the Data Pump Export Utility?
- What Is the Data Pump Import Utility?
- How To Invoke the Data Pump Export Utility?
- How To Invoke the Data Pump Import Utility?
- What Are Data Pump Export and Import Modes?
- How To Estimate Disk Space Needed for an Export Job?
- How To Do a Full Database Export?
- Where Is the Export Dump File Located?
- How To Export Your Own Schema?
- How To Export Several Tables Together?
- What Happens If the Imported Table Already Exists?
- How To Import One Table Back from a Dump File?
- What Are the Original Export and Import Utilities?
- How To Invoke Original Export/Import Utilities?
A collection of 9 FAQs on Oracle ODBC drivers and connections. Clear answers are provided with tutorial exercises on installing Oracle ODBC drivers; TNS settings; defining DSN entries; connecting MS Access or ASP pages to Oracle servers.
- What Is Open Database Communication (ODBC)?
- How To Install Oracle ODBC Drivers?
- How To Find Out What Oracle ODBC Drivers Are Installed?
- How Can Windows Applications Connect to Oracle Servers?
- How To Create Tables for ODBC Connection Testing?
- How To Verify Oracle TNS Settings?
- How To Define a Data Source Name (DSN) in ODBC Manager?
- How To Connect MS Access to Oracle Servers?
- How To Connect ASP Pages to Oracle Servers?