Home » Infrastructure » Linux » cannot create db in linux
cannot create db in linux [message #135744] Fri, 02 September 2005 06:45 Go to next message
nookersatya
Messages: 7
Registered: September 2005
Junior Member
hello,
i'm very new to linux and oracle, i'm having problem in creating the schema of mksample.sql which is in "oracle/product/9.2.0/demo/schema"
what i did was
sql>sqlplus /nolog
sql>connect /as sysdba
sql>shutdown abort
sql>startup nomount
sql>@mksample.sql
giving the error
SP2-0641: "EXECUTE" requires connection to server
SP2-0640: Not connected
-------
------
ORA-01033: ORACLE initialization or shutdown in progress
----
ORA-01219: database not open: queries allowed on fixed tables/views only

Re: cannot create db in linux [message #135746 is a reply to message #135744] Fri, 02 September 2005 06:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Your database is not available for usage.
It is still in nomount stage.
after startup nomount
use
alter database mount
alter database open
then execute your script.
Re: cannot create db in linux [message #135756 is a reply to message #135746] Fri, 02 September 2005 07:53 Go to previous messageGo to next message
nookersatya
Messages: 7
Registered: September 2005
Junior Member
hello sir,
thanks for the reply,
when i excute the command
sql>alter database mount
i got the error
ORA-00205: error in identifying controlfile, check alert log for more info

Re: cannot create db in linux [message #135759 is a reply to message #135756] Fri, 02 September 2005 07:57 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>ORA-00205: error in identifying controlfile, check alert log for more info

Did you create a database?
if so, seems it is corrupted / control files has issues.
So restore the database if you have a backup.
Else if this a test database you are playing with, just startover.
create a new database.

Re: cannot create db in linux [message #135765 is a reply to message #135759] Fri, 02 September 2005 08:10 Go to previous messageGo to next message
nookersatya
Messages: 7
Registered: September 2005
Junior Member
hello sir,

% su - oracle
% cd admin/ORA920/create
% ./RUN_CRDB.sh

this what i did to create database in refrence to http://www.idevelopment.info/data/Oracle/DBA_tips/Linux/LINUX_8.shtml

but i could not see any output for long time,

the code in RUN_CRDB.sh

#!/bin/ksh
./crdb.sh > crdb.log 2>&1



and the code in crdb.sh
#!/bin/sh

echo "+---------------------------+"
echo "| Staring crdb920... |"
echo "+---------------------------+"

ORACLE_SID=ORA920
export ORACLE_SID

ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_HOME

echo "+---------------------------------------------------+"
echo "| NOTE: No need to alter any parameters below here! |"
echo "+---------------------------------------------------+"

rm $ORACLE_HOME/dbs/orapw$ORACLE_SID
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=change_on_install entries=50

ln -s $ORACLE_BASE/admin/$ORACLE_SID/pfile/init$ORACLE_SID.ora $ORACLE_HOME/dbs/init$ORACLE_SID.ora

echo "+---------------------------+"
echo "| Creating Directories... |"
echo "+---------------------------+"

mkdir -p /u03/app/oradata/$ORACLE_SID
mkdir -p /u03/app/oradata/$ORACLE_SID/export
mkdir -p /u04/app/oradata/$ORACLE_SID
mkdir -p /u05/app/oradata/$ORACLE_SID
mkdir -p /u06/app/oradata/$ORACLE_SID
mkdir -p /u06/app/oradata/$ORACLE_SID/archive


echo "+---------------------------+"
echo "| Creating Database... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @create_database.sql


echo "+---------------------------+"
echo "| Installing Java... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @JServer.sql


echo "+---------------------------+"
echo "| Installing ordinst... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @ordinst.sql


echo "+---------------------------+"
echo "| Installing interMedia.sql |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @interMedia.sql


echo "+---------------------------+"
echo "| Installing context... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @context.sql


echo "+---------------------------+"
echo "| Installing xdb protocol.. |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @xdb_protocol.sql


echo "+---------------------------+"
echo "| Installing spatial... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @spatial.sql


echo "+---------------------------+"
echo "| Installing ultraSearch... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @ultraSearch.sql


echo "+---------------------------+"
echo "| Installing odm... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @odm.sql


echo "+---------------------------+"
echo "| Installing cwmlite... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @cwmlite.sql


echo "+---------------------------+"
echo "| Installing demoSchemas... |"
echo "+---------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @demoSchemas.sql


echo "+------------------------------+"
echo "| Installing postDBCreation... |"
echo "+------------------------------+"

$ORACLE_HOME/bin/sqlplus /nolog @postDBCreation.sql


echo "+-------------------+"
echo "| Ending crdb920... |"
echo "+-------------------+"

exit

thanks in advance for the reply
Re: cannot create db in linux [message #135771 is a reply to message #135765] Fri, 02 September 2005 08:32 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
why not create a database with DBCA ( database configuration assistant)?. It is a GUI tool.
Set your DISPLAY.
Call dbca.
Jeff Hunter's excellent tips are for creating database manually.
FOr that you need to understand a lot about what you are doing?
Based on this,
>> i'm very new to linux and oracle,
You will be in need to spend a lot of time to undertand things.
For a beginner, dbca is way.

Re: cannot create db in linux [message #135773 is a reply to message #135771] Fri, 02 September 2005 08:49 Go to previous messageGo to next message
nookersatya
Messages: 7
Registered: September 2005
Junior Member
yes sir, i even used dbca for creating database, but the same old error when i try
sql>alter database mount
ORA-00205: error in identifying controlfile, check alert log for more info
Re: cannot create db in linux [message #135784 is a reply to message #135773] Fri, 02 September 2005 09:21 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Did you do all pre-installation properly?
OS user account, groups, mount points etc?
did you set ORACLE_SID,ORACLE_BASE, ORACLE_HOME etc?

Your process is not identifying the control file location.
Are you using OMF ( oracle managed files)?

first, initsid.ora or spfile is read.
these files identify the location of control files through CONTROL_FILES parameter.
You are having problems with this.

For a simple demostration on how startup works, please look here.

http://www.orafaq.com/forum/mv/msg/50087/131885/42800/
Re: cannot create db in linux [message #135785 is a reply to message #135771] Fri, 02 September 2005 09:39 Go to previous messageGo to next message
nookersatya
Messages: 7
Registered: September 2005
Junior Member
sir,
when i execute the following to create database i got the error
ORA-12909: TEMPORARY keyword expected

CREATE DATABASE DEFAULT
CONTROLFILE REUSE
LOGFILE
GROUP 1 ('diskx:log1.log', 'disky:log1.log') SIZE 50K,
GROUP 2 ('diskx:log2.log', 'disky:log2.log') SIZE 50K
MAXLOGFILES 5
MAXLOGHISTORY 100
MAXDATAFILES 10
MAXINSTANCES 2
ARCHIVELOG
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
DATAFILE
'disk1:df1.dbf' AUTOEXTEND ON,
'disk2:df2.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE temp_ts
UNDO TABLESPACE undo_ts
SET TIME_ZONE = '+02:00';
Re: cannot create db in linux [message #135788 is a reply to message #135785] Fri, 02 September 2005 09:56 Go to previous message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You are missing your temp tablespace specification.
Look into documentation.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/create.htm#1000691

Step 6 gives a sample create database script.
Previous Topic: Oracle10g (10.2.0.1) ASM database installation on RHEL AS 4
Next Topic: font seting for DS10g on linux
Goto Forum:
  


Current Time: Mon Nov 29 23:29:44 CST 2021