How to Create an Oracle 9I Database Using a Command Line

Creating an Oracle 9i database through the command line can be accomplished in the Windows DOS prompt. There are several configurations necessary when creating the new database that need to be considered. The database needs a directory for file storage and a place for logs. Once these options have been decided, creating an Oracle database is only a few statements typed into the command line.

Instructions

    • 1

      Start the command line with the "create database" statement. This line creates the database name. The syntax is below:
      create database myNewDB

    • 2

      Specify the log file size and location on the hard drive. You can configure one or multiple log files. In the following example, a 10 megabyte log file is created. Log files are used to rollback procedures in case of corruption or loss of data.
      create database myNewDB
      logfile group 1 ('/myLogs/myNewDBLog1.dbf','/myLogs/myNewDBLog2.dbf' ) size 10M

    • 3

      Create the data file. This file is where Oracle saves the data. The example below creates a file that starts with 350 megabytes. Oracle manages file sizes as the database grows.
      create database myNewDB
      logfile group 1 ('/myLogs/myNewDBLog1.dbf','/myLogs/myNewDBLog2.dbf' ) size 10M
      datafile '/myData/myDBData.dbf' size 350M

    • 4

      Set the database for local management and specify the character code. UTF8 is the standard code for English character sets.
      create database myNewDB
      logfile group 1 ('/myLogs/myNewDBLog1.dbf','/myLogs/myNewDBLog2.dbf' ) size 10M
      datafile '/myData/myDBData.dbf' size 350M
      character set WE8ISO8859P1 national character set utf8
      extent management local

    • 5

      Set the rollback table data file. This file is where data is saved in case a command fails and Oracle needs to reverse the transaction.
      create database myNewDB
      logfile group 1 ('/myLogs/myNewDBLog1.dbf','/myLogs/myNewDBLog2.dbf' ) size 10M
      datafile '/myData/myDBData.dbf' size 350M
      character set WE8ISO8859P1 national character set utf8
      extent management local
      undo tablespace myUndoTable datafile '/myUndo/myUndoTable.dbf' size 25M

    • 6

      Set the temporary table. This table is used to hold transactions that are waiting in the queue for processing.
      create database myNewDB
      logfile group 1 ('/myLogs/myNewDBLog1.dbf','/myLogs/myNewDBLog2.dbf' ) size 10M
      datafile '/myData/myDBData.dbf' size 350M
      character set WE8ISO8859P1 national character set utf8
      extent management local
      undo tablespace myUndoTable datafile '/myUndo/myUndoTable.dbf' size 25M
      default temporary tablespace myTempTable tempfile '/myTempTable/myTemporaryTable.dbf' size 100M autoextend on next 100M maxsize 250M;

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured