Avatar of joaotelles
joaotelles
Flag for United States of America asked on

Oracle 11gR2 - ASM tablespace creation

Hi,

Im trying to set up Oracle using ASM. Installed it like this:

Oracle  was installed using 11GR2 patterns.

Two users created:  grid for infrastructure and Oracle for the DB

-      Instance ASM: (Infrastructure).
ORACLE_SID=+ASM
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/grid/product/11.2.0/grid

-      Instance DPDB:
ORACLE_SID=DPDB
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

-      Mount Points created in ASM:
Visible through the user GRID and the ASM tool.
NOTE: not usual UNIX filesystems
Eg.:
$ asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     25557    25505                0           25505              0             N  ARCH/
MOUNTED  EXTERN  N         512   4096  1048576     66519    64931                0           64931              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     10197    10145                0           10145              0             N  REDO/

So now the problem:

I will run a script that will create a bunch of tablespaces - among other things - for DPDB (script wasnt set for ASM use).

So I have to run these TS manually.

Basically a appl will have to access the tables inside these tablespaces using the DPDB.. but Im not sure how to create then for ASM...

I read this:
'You need to create your diskgroups in ASM, then create your tablespaces in the ASM diskgroup.

If you setup the instance with db_create_file_dest = ‘+<DISKGROUP>’ then you can simply do “create tablespace <TBLSPACE_NAME>;” '

====

Would it be the right way to do it? How could I create these diskgroups in ASM? This variable is necessary?

Any suggestion?

Tks,
Joao
Oracle Database

Avatar of undefined
Last Comment
joaotelles

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Bajwa

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
joaotelles

ASKER
So let me see if I get it:

the DG's are already created:
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     25557    25505                0           25505              0             N  ARCH/
MOUNTED  EXTERN  N         512   4096  1048576     66519    64931                0           64931              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     10197    10145                0           10145              0             N  REDO/

So now I can login here:
-      Instance DPDB:
ORACLE_SID=DPDB
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

And create the tablespaces as this:
create tablespace my_ts_name datafile '+DG_NAME' size 4096m,
using the Oracle user.

Is this correct?
SOLUTION
Bajwa

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Bajwa

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
joaotelles

ASKER
Tks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck