Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regarding ASM 1

Status
Not open for further replies.

ifxtechie

Technical User
Dec 22, 2000
127
US
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:eek:racle:/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:eek:racle:/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

 
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
 
Yes, I am connecting to the ASM instance.
Please see below:

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


I donot know what do you mean by database?

Thanks for the reply.
Partha
 
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.
 
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
 
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:


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.
 
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:eek:racle:/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:eek:racle:/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:eek:racle:/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
 
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top