This forum is currently locked. You can't register or post questions at this time. (read more)

bash_profile

All posts relating to Oracle database administration.

Moderator: Tim...

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Fri Jan 11, 2013 3:19 pm

Hi.

It looks like you have empty lines in your script. This is a problem. Remove them and it may well work.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Sat Jan 12, 2013 3:16 pm

no sir i just want to see what's the error at the second line which i posted in previous posts... After i am typing the whole scripts in the method its giving the error in the line 2.. I want you to look at that

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Sat Jan 12, 2013 6:26 pm

Hi.

The point is if you have empty lines in the file that is a syntax mistake. The text you posted has an extra newline before the data files clause. That is a mistake. You posted this,

Code: Select all

create database demo

datafile '/demo/system.dbf' size 300m
sysaux datafile '/demo/sysaux.dbf' size 300m
default tablespace userdata datafile '/demo/userdata.dbf' size 200m
default temporary tablespace tempdemo tempfile '/demo/tempdemo.dbf' size 200m
undo tablespace undodemo datafile '/demo/undodemo.dbf' size 200m

logfile

group 1 '/demo/redo1.log' size 10m,
group 2 '/demo/redo2.log' size 10m
/


Line 2, 8 and 10 are blank lines. They should not be!

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Tue Jan 15, 2013 10:57 am

as soon as i am typing the first line i.e. create database demo and the i am typing the next line as
{datafile '/home/oracle/app/oracle/oradata/test/system.dbf' size 300m;} I am not giving any space after that first line... The procedure i posted is document of step by step procedure.. I am not giving any gap between any lines... I typed the whole procedure in the editor and after executing all the steps in SQL its giving the error in the first line.. After that when I am getting errror while typing in the editor I tried typing in the SQL, soon after typing the second line
{datafile '/home/oracle/app/oracle/oradata/test/system.dbf' size 300m;} the error is

[create database test
*
ERROR at line 1:
ORA-30045: No undo tablespace name specified ].. Please tell the step by step procedure to rectify the error.... Please remember i am not at all using any spaces...

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Tue Jan 15, 2013 2:10 pm

Hi.

The first thing I would do it put your command into a script and run that rather than typing. it's much more efficient. You can run a script in sqlplus using:

SQL> @/path/to/script.sql

Where "/path/to" is the real path substituted and script.sql is the name of your script.

The second thing I would do is generate the create database scripts using the DBCA, then compare your script to the generated script. That should give you an idea of where your script is wrong.

As I've said before, it is many years since Oracle recommended manually building databases rather than using the DBCA to generate them. You should probably ask your lecturer why he/she is asking you to do something that is not considered good practice.

Also, please stop putting "Please tell the step by step procedure to rectify the error". It's a sure fire way to piss anyone off on a forum. When people are helping you for free you can't demand any level of service. The manuals are available for free ans provide step by step instructions. If that is what you want I suggest you read them.

http://docs.oracle.com/cd/E11882_01/ser ... m#BABEIAID

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Tue Jan 15, 2013 7:57 pm

Ok I am extremely sorry Sir.. I didn't have any intensions to demand you..I was just requesting you for that. I dont know about that. Infact you are the person helped me a lott and I am very thankful to you for that..

In realtime what method we use for creating Database ?

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Tue Jan 15, 2013 8:22 pm

Hi.

As mentioned previously, I *always* use the DBCA to create a database. One of the reasons for that is the templates allow you to do a very quick installation.

If I want to do a non-template installation and save the creation scripts I do a custom installation using the DBCA, but at the end check the checkbox asking if you want to create the scripts.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Tue Feb 19, 2013 11:11 am

Hi Sir, How to install 10g when i already have 11g.. I want to do this for patching and upgradation.. Thanks...

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Tue Feb 19, 2013 6:20 pm

Hi.

If this is Windows I would suggest you should always install the software starting with the oldest version and moving forwards. That kinda suggests it is not a good idea to install 10g after 11g. :)

If it is UNIX/Linux, then this installation should be fine. Just make sure you install it into another ORACLE_HOME.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Fri Nov 01, 2013 3:59 pm

when i am looking for the control or redolgs
select name from v$controlfile
error is bash : syntax error near unexpected token 'from'
What is this error
Thanks..

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Fri Nov 01, 2013 4:34 pm

Hi.

It looks like you've not actually started sqlplus. You are just typing queries at the Linux command line. :)

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Thu Nov 07, 2013 6:48 am

Hi Sir,

SQL> select name from v$datafile;
select name from v$datafile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

What is this error

Thanks....

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Thu Nov 07, 2013 7:10 am

HI Sir,

[root@localhost ~]# cd /mnt/hgfs/Oracle/DBA/
bash: cd: /mnt/hgfs/Oracle/DBA/: No such file or directory

Why is this error happening when i have these file in my physical location

Thanks....

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: bash_profile

Postby Tim... » Thu Nov 07, 2013 8:31 am

Hi.

So now it looks like you've not started Oracle. To check, come out of SQL*Plust and fro the UNIX/Linux command line issue the following command and post the results on to the forum.

Code: Select all

ps -ef | grep [s]mon


Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

syedhafeez69
Senior Member
Posts: 51
Joined: Thu Dec 27, 2012 11:37 am

Re: bash_profile

Postby syedhafeez69 » Thu Nov 07, 2013 9:45 am

Hi Sir,

SQL> ps -ef | grep [s]mon
SP2-0734: unknown command beginning "ps -ef | g..." - rest of line ignored. {In SQL}


[oracle@localhost ~]$ ps -ef | grep [s]mon
[oracle@localhost ~]$ cd ps -ef | grep [s]mon
-bash: cd: ps: No such file or directory {WITH ORACLE USER }


Return to “Oracle Database Administration”

Who is online

Users browsing this forum: No registered users and 0 guests

cron