INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Regarding ASM

Regarding ASM

(OP)
I have installed Oracle 11g and ASM libraries.
Also, I have created the database but when I tried to add a tablespace, it just says that database is "Not Open". Whenever I try to open the db, it complains that it is not allowed for this instance type.

GRID:oracle:/home/oracle/
/>sqlplus 'sys/xxxx as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 4 22:42:30 2012

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option

SQL> select path,mount_status from v$ASM_DISK ;

PATH
--------------------------------------------------------------------------------
MOUNT_S
-------
ORCL:ORADATA1
CACHED

ORCL:ORADATA2
CACHED

ORCL:ORADATA3
CACHED


PATH
--------------------------------------------------------------------------------
MOUNT_S
-------
ORCL:ORADATA4
CACHED


SQL> show parameter_type instace_type ;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_type                        string      asm
SQL>
SQL> CREATE TABLESPACE my_ts DATAFILE '+disk_group_1' SIZE 100M AUTOEXTEND ON;
CREATE TABLESPACE my_ts DATAFILE '+disk_group_1' SIZE 100M AUTOEXTEND ON
*
ERROR at line 1:
ORA-01109: database not open


SQL> alter database open ;
alter database open
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type


SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
GRID:oracle:/home/oracle/
/>sqlplus 'sys/xxxx as sysasm'

SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 4 22:57:16 2012

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option

SQL> alter database open ;
alter database open
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type


SQL> CREATE TABLESPACE my_ts DATAFILE '+disk_group_1' SIZE 100M AUTOEXTEND ON;
CREATE TABLESPACE my_ts DATAFILE '+disk_group_1' SIZE 100M AUTOEXTEND ON
*
ERROR at line 1:
ORA-01109: database not open


SQL>


Any help in me creating the tablespace is appreciated.
Thanks
P

 

RE: Regarding ASM

This sounds like you're trying to open an ASM instance.

Are you sure you're connecting to a database and not the ASM instance?

Regards

T

RE: Regarding ASM

(OP)
Yes, I am connecting to the ASM instance.
Please see below:

/>set |grep -i oracle_sid
ORACLE_SID=+ASM
GRID:oracle:/home/oracle/


I donot know what do you mean by database?

Thanks for the reply.
Partha

RE: Regarding ASM

The asm instance exists solely to manage asm disk for other databases.  To actually create a tablespace using asm disk, one needs to create a database with instance_type='RDBMS'.  That's the database that you need to be connected to when executing your "create tablespace" command.

RE: Regarding ASM

(OP)
oh ok. Actually I had created the database. But even that was not starting. So, I dropped that through dbca. Now when I try to create the database, it complains as below:

oracle restart is not running in Grid infrastructure home. created database will not be registered with Oracle Restart. Do you wish to continue ?


What could be the reason for this ?
I tried to run dbca from both homes, both rendered the same error:

1. First home
ORACLE_HOME=/opt/oracle/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=+ASM
2. Second Home
ORACLE_HOME=/opt/oracle/app/oracle/product/11.2.0/grid
ORACLE_SID=+ASM


Thanks for the replys and help!
Partha

RE: Regarding ASM

I have Grid Infrastructure installed in a cluster, whereas you appear to be using it to run Oracle Restart on a stand-alone server.  So the commands you will be using are a little different than what I'm used to.  I found the following reference to some documentation that you may find useful:

http://dbatrain.wordpress.com/2010/08/13/get-started-with-oracle-restart/

The first thing I would do is run the command (with your ORACLE_HOME set to the grid home)

CODE

crsctl check has

That should tell you whether Oracle Restart is running on your server.  Judging from the error you are getting it probably isn't running.  I'm not sure if that's because it simply was never started, or if you somehow damaged Oracle Restart while trying to drop your database.

If the "crsctl check has" command says that has is running, you might try starting it with the command

CODE

crsctl start has

You may have to run this command as root.  At least I need to be logged in as root when starting cluster services on one of the nodes in my cluster.

After running the "crsctl start has" command you should wait a while and then run the "crsctl check has" command again.  Sometimes the services take a little while to start even after the command has completed.

Once you get the Oracle Restart issues resolved, you will need to get back to database creation.  When you are doing this, you should have your ORACLE_HOME set to your dbhome_1 and your ORACLE_SID set to something other than "+ASM".  The asm instance and the rdbms instance shouldn't use the same ORACLE_SID.  You may very well have confused Oracle about which database you were trying to drop.  I hope you didn't inadvertently drop your asm instance.

If you can't think of anything more creative, try using "ORCL" for the ORACLE_SID of your database.  That's a common default.

RE: Regarding ASM

(OP)
Thanks very much, Karluk.
Very nice explanation. But I landed into another problem.
crsctl is not working [both as root and as oracle].
It thorws the error as,

[root@hsphost ~]# /opt/oracle/app/oracle/product/11.2.0/grid/bin/crsctl check has
/opt/oracle/app/oracle/product/11.2.0/grid/bin/crsctl.bin: error while loading shared libraries: /opt/oracle/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
[root@hsphost ~]# logout


GRID:oracle:/etc/selinux/
/>crsctl check has
/opt/oracle/app/oracle/product/11.2.0/grid/bin/crsctl.bin: error while loading shared libraries: /opt/oracle/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
GRID:oracle:/etc/selinux/
/>ls -latr /opt/oracle/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1-rwxr-xr-x 1 oracle oinstall 48724689 Jan 29 01:09 /opt/oracle/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1
GRID:oracle:/etc/selinux/
/>


I searched in the net and he says to change the selinux config to 'permissive'. Even after that, it did not work.
Any ideas on this?
Much appreciated, thanks again.
Partha

RE: Regarding ASM

You must have SELinux enabled on your server.  If you can disable it without running afoul of any security policy, that would be the easiest fix.  If not, you will probably have to contact Oracle support for help about how to install and run Grid Infrastructure in an SELinux environment.

RE: Regarding ASM

(OP)
I think I messed up my Virtual machine. Since I changed the selinux to permissive, it is not booting.
However, I have to install everything and start from scratch.
Thanks very much for the help, Karluk and Thargy.
Partha

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close