Hendry's "Oracle and SQL Server DBA Stuff"

Oracle and SQL Server Database Solutions for DBA's please visit http://hendrydba.com for the latest posts. Thanks

CREATING AN ORACLE11GR2 DATABASE WITH FEW COMMANDS IN WINDOWS

Posted by Hendry chinnapparaj on February 14, 2012

G:\Hendry Scripts>oradim -new -sid HENDRY
Instance created.

G:\Hendry Scripts>edit initHENDRY.ora

db_name=HENDRY

G:\HENDRY~1>set ORACLE_SID=HENDRY

G:\HENDRY~1>sqlplus “/ as sysdba”

SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 14 14:45:52 2012

Copyright (c) 1982, 2010, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount pfile=initHENDRY.ora
ORACLE instance started.

Total System Global Area 146472960 bytes
Fixed Size 1373152 bytes
Variable Size 92277792 bytes
Database Buffers 50331648 bytes
Redo Buffers 2490368 bytes
SQL> create database;

Database created.

SQL> select ts#, name from v$tablespace;

TS# NAME
———- ——————————
0 SYSTEM
1 SYSAUX
2 SYS_UNDOTS

SQL> column name format a60
SQL> select ts#, name from v$datafile;

TS# NAME
———- ————————————————————
0 G:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\DBS1HENDRY.ORA

1 G:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\SYX1HENDRY.ORA

2 G:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\UND1HENDRY.ORA
SQL> column member format a60
SQL> select group#, member from v$logfile;

GROUP# MEMBER
———- ————————————————————
1 G:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\LOG1HENDRY.ORA

2 G:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\LOG2HENDRY.ORA
SQL> column name format a60
SQL> select name from v$controlfile;

NAME
————————————————————
G:\APP\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABASE\CTL1HENDRY.ORA
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount exclusive restrict pfile=initHENDRY.ora
ORACLE instance started.

Total System Global Area 146472960 bytes
Fixed Size 1373152 bytes
Variable Size 92277792 bytes
Database Buffers 50331648 bytes
Redo Buffers 2490368 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Release 11.2.0.1.0 – Production
SQL> exit

G:\HENDRY~1>oradim -delete -sid HENDRY
Instance deleted.

Shalom

H

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: