How to add ASm diskgroup in ASM oracle 10.1.0.4.0
Hi experts,
We are using IBM AIX 5.3L OS on IBM Servers.
Oracle Database EE 10G 10.1.0.4.0,
RAC and ASM
Presently There are 3 diskgroup (Filesystem) in my DB suppose
+ABC
+DEF
+GHI
Now I want to add a new Diskgroup (File system)
Say
+XYZ
and I want to tranfer some file from OS to ASM so that these files are stored in
+XYZ
I m new to ASM plz suggest me in detail.
Thanks and Regards,
It depends on the type of file you are talking about, if an spfile, you can use a SQL command to add it in if the database already exists:
SQL> create spfile='+XYZ/dbname/spfileDBNAME.ora' from pfile='/home/oracle/initdbname.ora'
For other file types like datafiles, controlfiles, etc. you should use RMAN to move them from a "real" datafile into ASM:
RMAN> restore controlfile from '/oracle/product/admin/${db}/control01.ctl';
- take tablespace test offline first then...
RMAN> backup as copy tablespace 'TEST' format '+XYZ';
RMAN> switch tablespace 'TEST' to copy;
- then set the tablespace online
If non-Oracle files, it is possible to put them in/out ASM using XDB and FTP, but why?
Cheers!
Jay Caviness
http://www.grumpy-dba.com
Similar Messages
-
How to add users/entry in the oracle internet directory using XML file
hi friends,
i need to know how to add entries, attributes in the oracle internet directory using the XML file.I could able to execute the ldapadd command with out error as
ldapadd -h islch-532.i-flex.com -p 389 -D "cn=orcladmin" -w password -X mypath/filename.xml
but the data entry is not added in OID. can any one help me out. -
How to add a custom attributes in Oracle HTML Quotes page?
Hi,
Could someone advice on the best way to add a custom attribute in Oracle HTML Sales Quoting page.
As this page is not an OA page, we are not able to use the concept of View Objects using AK Developer.
Thanks,
ArathiI have a requirement from our end users that all of them requires a shortcut button in toolbar for submitting a request instead of going the normal way in order to submit a single request.
please can any one help me out in solving this query.Any reason you want to use a shortcut rather than using (Requests > Submit) window?
You can use "FND_REQUEST.SUBMIT_REQUEST" API -- https://forums.oracle.com/forums/search.jspa?threadID=&q=FND_REQUEST.SUBMIT_REQUEST&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
How To Submit A Concurrent Request Set Using Fnd_Request.Submit_Request [ID 382791.1]
How To Set ORG_ID When Submitting A Concurrent Request Using FND_REQUEST.SUBMIT_REQUEST in Release 12 [ID 1383266.1]
Thanks,
Hussein -
How to add an image file to Oracle db?
Need help urgently....Anybody knows how to add an image file (example: jpg)into one of the fields in Oracle database??
This will do the job..
package forum;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import oracle.jdbc.driver.*;
//import oracle.sql.*;
Wanneer een request.getInputStream wordt geconferteerd naar een "String" (zie later) dan ziet de output in tekstformaat er als volgt uit:
-----------------------------7d280152604f4 Content-Disposition: form-data; name="oploadfile"; filename="C:\WINNT\Profiles\mvo\Desktop\boodschap.txt" Content-Type: text/plain Deze boodschap dient te worden ge-insert in de database. -----------------------------7d280152604f4 Content-Disposition: form-data; name="StadID" 1234 -----------------------------7d280152604f4 Content-Disposition: form-data; name="SuccessPage" /forum/error.jsp -----------------------------7d280152604f4--
of opgesplitst
contentType........... multipart/form-data; boundary=---------------------------7d235ade00f0
filename.............. "C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
MIME type............. text/plain
Wat in database moet.. Dit is de eigenlijke boodschap die moet worden ge-insert in de database.
Eind boundary......... -----------------------------7d235ade00f0 Content-Disposition: form-data; name="file1"; filename="" Content-Type: application/octet-stream -----------------------------7d235ade00f0--
We gaan achtereenvolgens:
1. Kijken of het van het "multipart/form-data" type is (uploaden) en strippen van eerste boundery.
1.a Geen "multipart/form-data" ? dan... error message
1.b Groter dan MAX_SIZE ?..dan .. error message
2. Filenaam van de te uploaden file uitlezen
3. Mimetype bepalen en bepalen in welke positie van de string het Mimetype ophoudt, cq waar te uploaden file begint
4. Bepalen waar eind boundery begint
5. De eigenlijke file uitlezen
6. Terug converteren naar bytes
public class WriteBlob extends HttpServlet {
public static final int MAX_SIZE = ParameterSettings.imageUpload;
String successMessage = "";
public void init(ServletConfig config) throws ServletException {
super.init(config);
* Process the HTTP Get request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
DataInputStream in = null;
FileOutputStream fileOut= null;
PrintWriter out = response.getWriter();
int kb_size = 0;
boolean pass2 = true;
String message = "";
String responseRedirect = "/forum/uploaden.jsp?message="+" Uploaden geslaagd";
try
//get content type of client request
String contentType = request.getContentType();
// Start stap 1...content type is multipart/form-data
if(contentType != null && contentType.indexOf("multipart/form-data") != -1)
//open input stream
in = new DataInputStream(request.getInputStream());
//get length of content data
int formDataLength = request.getContentLength(); // totale lengte van de inputstream
//initieer een byte array om content data op te slaan
byte dataBytes[] = new byte[formDataLength];
//read file into byte array
int bytesRead = 0;
int totalBytesRead = 0;
int sizeCheck = 0;
while (totalBytesRead < formDataLength)
//kijken of de file niet te groot is
sizeCheck = totalBytesRead + in.available();
if (sizeCheck > MAX_SIZE)
pass2 = false;
message = "Sorry. U kunt slechts bestanden uploaden tot een grootte van 500KB";
responseRedirect = "/forum/uploaden.jsp?message="+message;
bytesRead = in.read(dataBytes, totalBytesRead,formDataLength);
totalBytesRead += bytesRead;
if (pass2==true)
kb_size = (int)(formDataLength/1024);
//create string from byte array for easy manipulation
String file = new String(dataBytes);
/*get boundary value (boundary is a unique string that separates content data)
contentType........... multipart/form-data; boundary=---------------------------7d235ade00f0
int lastIndex = contentType.lastIndexOf("=");
String boundary = contentType.substring(lastIndex+1, contentType.length());
// Stap 2.....bepaal de naam van de upload file
// filename.............. "C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
String saveFile = file.substring(file.indexOf("filename=\"")+10);
saveFile = saveFile.substring(0,saveFile.indexOf("\n"));
saveFile = saveFile.substring(saveFile.lastIndexOf("\\")+1,saveFile.indexOf("\"")); //naam van de file...boodschap.txt
String saveFileName = saveFile;
// Stap 3..Bepaal MIME Type en de positie van eind mime type in string
voorbeeld: -----------------------------7d23d21220524 Content-Disposition: form-data; name="file0"; filename="C:\WINNT\Profiles\mvo\Desktop\z clob.txt" Content-Type: text/plain
String restant = "";
int pos; //position in upload file
// bijv .. filename="C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
pos = file.indexOf("filename=\"");
//find position of content-disposition line
pos = file.indexOf("\n",pos)+1; // eing file naam + spatie
// onderstaand geeft bijv Content-Type: text/plain
restant = file.substring(pos,file.indexOf("\n",pos)-1);
restant = restant.substring(restant.indexOf(":")+2,restant.length()); // MIME type
String mimeType = restant;
//find position of eind content-type line
pos = file.indexOf("\n",pos)+1;
//find position of blank line
pos = file.indexOf("\n",pos)+1;
int start = pos;
// Stap 4 eind boundary
/*find the location of the next boundary marker (marking the end of the upload file data)*/
int boundaryLocation = file.indexOf(boundary,pos)-4; //waarom -4 ..? ziet er uit als linebreak spatie--boundary=-----------------------------7d21c9ae00f0
// Stap 5 en 6..de eigelijke te uploaden file in nieuwe byte file inserten
byte dataBytes2[] = new byte[boundaryLocation-start]; //declareren
for (int i=0;i<(boundaryLocation-start);i++) // inserten BELANGRIJK !!
dataBytes2=dataBytes[start+i];
String next_id = "0";
Statement statement = null;
Connection conn = null;
boolean pass = true;
ResultSet rs = null;
Statement stmt_empty = null;
oracle.sql.BLOB blb = null;
try
int vendor = DriverUtilities.ORACLE;
String username = ConnectionParams.userName;
String password = ConnectionParams.passWord;
String connStr = DriverUtilities.makeURL(vendor);
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(connStr,username, password);
if (conn==null){pass=false;}
} catch (Exception e){out.println("<P>" + "There was an error establishing a connection:");}
if (pass==true)
try
String seq_nextval ="select forum_blob_seq.nextval from dual";
statement = conn.createStatement();
ResultSet rset = statement.executeQuery(seq_nextval);
while (rset.next())
next_id = rset.getString(1);
if (next_id.equals("0"))
message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
responseRedirect = "/forum/uploaden.jsp?message="+message;
pass = false;
} catch (Exception e1) { out.println("Error blob1 : "+e1.toString()); };
} // end pass
if (pass==true)
try
Statement stmt2 = conn.createStatement();
String insert_empty_blob = "INSERT INTO test_blob(id "+
",filename "+
",mimetype "+
",kb) "+
"VALUES("+Integer.parseInt(next_id) +
",'"+saveFileName+"'"+
",'"+mimeType+"'"+
","+kb_size+")";
stmt2.executeQuery(insert_empty_blob);
conn.commit();
if (stmt2!= null) {stmt2.close();}else{stmt2.close();pass = false;}
} catch (Exception e2){
message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
responseRedirect = "/forum/uploaden.jsp?message="+message;
out.println("<P>" + "2. There was an error inserting mime type:");}
} //end pass
if (pass==true)
try
conn.setAutoCommit(false);
} catch (Exception e3) { pass = false; out.println("Error blob 3: "+e3.toString()); };
} //end pass
if (pass==true)
try
String Query_blob ="Select test_blob FROM test_blob where id="+next_id+" FOR UPDATE";
stmt_empty = conn.createStatement();
rs=stmt_empty.executeQuery(Query_blob);
} catch (Exception e4) {
pass = false;
out.println("Error blob 4: "+e4.toString());
message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
responseRedirect = "/forum/uploaden.jsp?message="+message;};
} //end pass
if (pass==true)
try
if (rs.next())
blb = ((OracleResultSet)rs).getBLOB(1);
OutputStream stmBlobStream = blb.getBinaryOutputStream();
try {
int iSize = blb.getBufferSize();
byte[] byBuffer = new byte[iSize];
int iLength = -1;
ByteArrayInputStream stmByteIn = new ByteArrayInputStream(dataBytes2);
try {
// while ( (iLength = in.read(byBuffer, 0, iSize)) != -1 )
while ( (iLength = stmByteIn.read(byBuffer, 0, iSize)) != -1 )
stmBlobStream.write(byBuffer, 0, iLength);
stmBlobStream.flush();
} // end while
} catch (Exception e5) {
pass=false;
out.println("Error blob 5: "+e5.toString());
message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
responseRedirect = "/forum/uploaden.jsp?message="+message; }
finally { conn.commit(); }
} catch (Exception e6) { out.println("Error blob 6: "+e6.toString()); };
} //end if rs.next()
else { throw new SQLException("Could not locate message record in database."); }
} catch (Exception e7) { out.println("Error blob : "+e7.toString()); };
} // end pass
} // end pass2
else //request is not multipart/form-data
message = "Uploaden mislukt !...Gegevens niet verstuurd via multipart/form-data.";
responseRedirect = "/forum/error.jsp?message="+message;
out.println("Request not multipart/form-data.");
catch(Exception e)
try
//print error message to standard out
out.println("Error in doPost: " + e);
//send error message to client
out.println("An unexpected error has occurred.");
out.println("Error description: " + e);
}catch (Exception f) {}
response.sendRedirect(responseRedirect);
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doPost(request,response);
Regards
Martin -
How to Create new diskgroup in ASM ?
Hi experts,
We are using IBM AIX 5.3L OS on IBM Servers.
Oracle Database EE 10G 10.1.0.4.0,
RAC and ASM
Presently There are 3 diskgroup (Filesystem) in my DB suppose
+ABC
+DEF
+GHI
Now I want to add a new Diskgroup (File system)
Say
+XYZ
and I want to tranfer some file from OS to ASM so that these files are stored in
+XYZ
I m new to ASM plz suggest me in detail.
Thanks and Regards,Cool_DBA wrote:
Hi experts,
We are using IBM AIX 5.3L OS on IBM Servers.
Oracle Database EE 10G 10.1.0.4.0,
RAC and ASM
Presently There are 3 diskgroup (Filesystem) in my DB suppose
+ABC
+DEF
+GHI
Now I want to add a new Diskgroup (File system)
Say
+XYZ
and I want to transfer some file from OS to ASM so that these files are stored in CREATE DISKGROUP XYZ NORMAL REDUNDANCY
FAILGROUP controller1 DISK
'/devices/a1' NAME diskA1 SIZE 250G FORCE,
'/devices/a2',
'/devices/a3'
FAILGROUP controller2 DISK
'/devices/b1',
'/devices/b2',
'/devices/b3';
Use RMAN to copy the datafile or tablespace from OS to your ASM Disk Group
RMAN> backup as copy tablespace test format '+XYZ';
RMAN> switch tablespace test to copy; (Updates controlfile to use new location)
SQL> select file_name from dba_data_files where tablespace_name='TEST';
(check to see
Y can delete the -
How to add a user directory in oracle e-business?
Dear all,
How can I add user directory (for interface purpose) in utl_file_dir?
Please advice.
Thanks.Just the same way you create a directory in a standalone database.
How to Copy , Rename , Delete a File And Create a Directory in PL/SQL in Oracle 8i and higher [ID 282190.1]
Using CREATE DIRECTORY Instead of UTL_FILE_DIR init.ora Parameter [ID 196939.1]
Top Articles On Using UTL_FILE Package to Perform File I/O (UNIX) [ID 44307.1]
CREATE DIRECTORY
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_5007.htm#SQLRF01207
Thanks,
Hussein -
How to add \... path in oracle code
Hello All,
I've written the following pack and trigger.
create or replace package pak_rep_q
as
vid varchar2(50);
end;
CREATE OR REPLACE TRIGGER trig_rep_que
after insert
on REPORT_QUEUE
referencing new as new old as old
for each row
declare
--vid varchar2(50);
begin
IF :new.queue_status='PENDING' then
pak_rep_q.vid :=:new.URID;
--dbms_output.put_line(pak_rep_q.vid);
end if;
end;
/And now i need to use this pak_rep_q.vid in the following my local path for execution
/omn/fin/bin/genrep pak_rep_q.vid
How can i add the above path in my trigger code
Plz help
Thank you.
Edited by: josh1612 on Jun 7, 2010 11:19 PMjosh1612 wrote:
Hello All,
I've written the following pack and trigger.
create or replace package pak_rep_q
as
vid varchar2(50);
end;
CREATE OR REPLACE TRIGGER trig_rep_que
after insert
on REPORT_QUEUE
referencing new as new old as old
for each row
declare
--vid varchar2(50);
begin
IF :new.queue_status='PENDING' then
pak_rep_q.vid :=:new.URID;
--dbms_output.put_line(pak_rep_q.vid);
end if;
end;
/And now i need to use this pak_rep_q.vid in the following my local path for execution
/omn/fin/bin/genrep pak_rep_q.vid
How can i add the above path in my trigger code
I'm not sure I understand... you want to call something called "genrep" and pass a parameter?
If this genrep is a stored procedure (or even better a package) just call the package with the parameter. -
How to add a custom shortcut in Oracle apps Tool bar
Hie all,
I have a requirement from our end users that all of them requires a shortcut button in toolbar for submitting a request instead of going the normal way in order to submit a single request.
please can any one help me out in solving this query.
APPS version : 12.1.3
OS: OEL 5.5 64 BIT
DB: 11G
Regards,
HassanI have a requirement from our end users that all of them requires a shortcut button in toolbar for submitting a request instead of going the normal way in order to submit a single request.
please can any one help me out in solving this query.Any reason you want to use a shortcut rather than using (Requests > Submit) window?
You can use "FND_REQUEST.SUBMIT_REQUEST" API -- https://forums.oracle.com/forums/search.jspa?threadID=&q=FND_REQUEST.SUBMIT_REQUEST&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
How To Submit A Concurrent Request Set Using Fnd_Request.Submit_Request [ID 382791.1]
How To Set ORG_ID When Submitting A Concurrent Request Using FND_REQUEST.SUBMIT_REQUEST in Release 12 [ID 1383266.1]
Thanks,
Hussein -
How to Add Publisher Administrator Credentials to Oracle BI Presentation Services Credential Store
I used to follow this document until 10g - Bookshelf v10.1.3.2: Adding Publisher Administrator Credentials to Oracle BI Presentation Services Credential Store
Does anyone know how to configure the same in OBIEE 11G
Thanks for your help
SrixTarun
In BI URL word analytics is kind of virtual directory, if you want to change this you might have to change at Web Server side.
Try to use em for your oc4j to change or redeploy the analytics with desired name.
Just in case you are using IIS then you need to check in IIS.
If helps mark
~ http://cool-bi.com -
How to add two protection mode in oracle data guard
Hi all,
We have a discussion on oracle physical data guard yesterday.....
As we all know that data guard has 3 protection mode
1. Maximum Performance
2. Maximum Availability (Default)
3. Maximum Protection
Now we were discussing about is it possible to have two protection mode on same data guard simultaneously... for e.g. Maximum performance and maximum availability.
We have searched a lot but don't find any help on google.
Can any one help on this with any doc, pdf or links..
Thanks & RegardsHi,
you don't find anything on this because it's not possible and would make no sense even if you could do it.
Maximum Availability uses SYNC commit between primary and standby db. If you combine Max. Availabilty with Max. Performance then your db clients have to wait on commit until primary and the max. availability standby have commited. That they would not have to wait on another Max. Performance DB doesn't change anything to the client. You would only combine the disadvantages of both approaches, the wait on sync commit for max. availability and beeing not in sync with primary for the max. performance db.
The max. protection mode requires by definition that the primary db shuts down in case no standby can process the commit. If the primary is not up and running it is pointless to have another (max. availability) standby db at hand, if this max. availability db would take over the service this would violate the defintion of max. protection. No Dataloss is valued higher than db availability, having the data commited only on one db site is not allowed.
Regards
Thomas -
How to add diskgroup in ASM on linux
Hi All,
I have installed oracle 10.2.0.4 through Oracle VM- template. I install this template on OEL 5 (oracle enterprise linux 5) update 2.
10.2.0.4 template is readily avaible which I just extract and run. It install 10.2.0.4 with ASM for single instance.
Now, I want to add more diskgroup as by default this template created two diskgroup in ASM, but when to go for path of that diskgroup it will showing only: ORCL:VOL1 as a "path"
query:
select path,redundancy,total_mb,free_mb,failgroup from v$asm_disk where mount_status='CACHED' and header_status='MEMBER' and mode_status='ONLINE' and state='NORMAL' order by path ;
PATH REDUNDA TOTAL_MB FREE_MB FAILGROUP
ORCL:VOL1 UNKNOWN 7506 5593 VOL1
ORCL:VOL2 UNKNOWN 7491 5578 VOL2
how can I find on which physical path this diskgroup is created liek "/dev/xvd"...or something like this???
can any one suggest me how to add new diskgroup... I can't use GUI becuase its disable.Hi All,
I have installed oracle 10.2.0.4 through Oracle VM- template. I install this template on OEL 5 (oracle enterprise linux 5) update 2.
10.2.0.4 template is readily avaible which I just extract and run. It install 10.2.0.4 with ASM for single instance.
Now, I want to add more diskgroup as by default this template created two diskgroup in ASM, but when to go for path of that diskgroup it will showing only: ORCL:VOL1 as a "path"
query:
select path,redundancy,total_mb,free_mb,failgroup from v$asm_disk where mount_status='CACHED' and header_status='MEMBER' and mode_status='ONLINE' and state='NORMAL' order by path ;
PATH REDUNDA TOTAL_MB FREE_MB FAILGROUP
ORCL:VOL1 UNKNOWN 7506 5593 VOL1
ORCL:VOL2 UNKNOWN 7491 5578 VOL2
how can I find on which physical path this diskgroup is created liek "/dev/xvd"...or something like this???
can any one suggest me how to add new diskgroup... I can't use GUI becuase its disable. -
How to add a new password policy
This must be simple, but appearantly nobady has conceeded:
"how does one add a NEW password policy to the OID?"
I need this functionality, because I want to enforce the following rules in my SSO application:
- 99% of the users may have passwords that never expire
- 1% (say 5 or 6) users must have passwords that do expire, because they are super users and we want to minimize the risk of their passwords getting in the wrong hands.
I feel almost embarrased to post this question, but I really cannot find any example or documentation that shows me how to add a new password policy.
Is their any way to do this in OID?Hi,
Can you please provide exact steps those were used to create password policies for users.
I opened a Tar with metalink on this , and they told me that this way is not supported by Oracle.
So if you can please help me with this it will be great. See the details about the Tar as below:
11-AUG-05 21:41:42 GMT
QUESTION
=========
How to create or add a password policy for users in OID according to forum 833683 ?
RESEARCH
=========
- Re: How to add a new password policy
- Oracle Internet Directory Administrators Guide Release 9.2 Chapter 17 "Password Policies"
ANSWER
=======
Oracle Technical Support does not support to create password policies for specific users. Orac
le Internet Directory provides a Password Policy for each subscriber created (al
so known as Realm) or for the entire DIT.
eos (end of section)
I talked with the customer and she agreed to close this TAR.
Best Regards,
Hector Viveros
Oracle Identity Management
@HCL
. -
How to create a new ASM Diskgroup in Oracle 10g RAC?
Hi,
Our env is Oracle 10g R2 RAC on HP-UX. I want to create a new ASM Diskgroup. Please let me know if the following steps are ok to create a new ASM Diskgroup.
1. Ensure the new Disk is visible in both ASM instances in RAC (v$asm_disk) and the header_status is 'CANDIDATE'
2. From Node 1 ASM Instance issue the create diskgroup command.
SQL> create diskgroup DATA2 external redundancy disk '/dev/rdsk/c4t0d5';
3. Query v$asm_diskgroup and make sure the Diskgroup is created.
4. Mount the DATA2 Diskgroup from Node 2 ASM Instance.
5. Query v$asm_diskgroup and make sure the Diskgroup is visible from Node2 ASM instance.
6. Ensure the header_status is 'MEMBER'.
Rgds,correct.
instead of using device file '/dev/rdsk/c4t0d5' you can create an alternate device file using mknod, which is called "asm_disk_xg" for example.
check here: http://download.oracle.com/docs/cd/B19306_01/install.102/b14202/storage.htm#CDEECIHI
hth -
How to create an asm instance manaually? oracle 11gr2.
env: oracle 11gr2 os: hpux or aix single machine , not rac.
question:how to create an asm instance manaually?? diskgroup,listener,db ,they can be resigistered to crs??
can anyone give me document about it?Hi,
This is a simple answer:
Automatic Storage Management (ASM)
ASM was a new storage option introduced with Oracle Database 10gR1 that provides the services of a filesystem, logical volume manager, and software RAID in a platform-independent manner. ASM can stripe and mirror your disks, allow disks to be added or removed while the database is under load, and automatically balance I/O to remove "hot spots." It also supports direct and asynchronous I/O and implements the Oracle Data Manager API (simplified I/O system call interface) introduced in Oracle9i.
ASM is not a general-purpose filesystem and can be used only for Oracle data files, redo logs, and control files. Files in ASM can be created and named automatically by the database (by use of the Oracle Managed Files feature) or manually by the DBA. Because the files stored in ASM are not accessible to the operating system, the only way to perform backup and recovery operations on databases that use ASM files is through Recovery Manager (RMAN).
ASM is implemented as a separate Oracle instance that must be up if other databases are to be able to access it. Memory requirements for ASM are light: only 64 MB for most systems.
Installing ASM
On Linux platforms, ASM can use raw devices or devices managed via the ASMLib interface. Oracle recommends ASMLib over raw devices for ease-of-use and performance reasons. ASMLib 2.0 is available for free download from OTN. This section walks through the process of configuring a simple ASM instance by using ASMLib 2.0 and building a database that uses ASM for disk storage.
Determine Which Version of ASMLib You Need
ASMLib 2.0 is delivered as a set of three Linux packages:
* oracleasmlib-2.0 - the ASM libraries
* oracleasm-support-2.0 - utilities needed to administer ASMLib
* oracleasm - a kernel module for the ASM library
Each Linux distribution has its own set of ASMLib 2.0 packages, and within each distribution, each kernel version has a corresponding oracleasm package. The following paragraphs describe how to determine which set of packages you need.
First, determine which kernel you are using by logging in as root and running the following command:
uname -rm
Ex:
# uname -rm
2.6.9-22.ELsmp i686
The example shows that this is a 2.6.9-22 kernel for an SMP (multiprocessor) box using Intel i686 CPUs.
Use this information to find the correct ASMLib packages on OTN:
1. Point your Web browser to http://www.oracle.com/technology/tech/linux/asmlib/index.html
2. Select the link for your version of Linux.
3. Download the oracleasmlib and oracleasm-support packages for your version of Linux
4. Download the oracleasm package corresponding to your kernel. In the example above, the oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm package was used.
Next, install the packages by executing the following command as root:
rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
oracleasmlib-asmlib_version.cpu_type.rpm \
oracleasm-support-asmlib_version.cpu_type.rpm
Ex:
# rpm -Uvh \
> oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm \
> oracleasmlib-2.0.1-1.i386.rpm \
> oracleasm-support-2.0.1-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-22.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
Configuring ASMLib
Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below.
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
Next you tell the ASM driver which disks you want it to use. Oracle recommends that each disk contain a single partition for the entire disk. See Partitioning the Disks at the beginning of this section for an example of creating disk partitions.
You mark disks for use by ASMLib by running the following command as root:
/etc/init.d/oracleasm createdisk DISK_NAME device_name
Tip: Enter the DISK_NAME in UPPERCASE letters.
Ex:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
Verify that ASMLib has marked the disks:
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
Create the ASM Instance
ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer. Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance.
Log in as oracle and start runInstaller:
$ ./runInstaller
1. Select Installation Method
* Select Advanced Installation
* Click on Next
2. Specify Inventory Directory and Credentials
* Inventory Directory: /u01/app/oracle/oraInventory
* Operating System group name: oinstall
* Click on Next
3. Select Installation Type
* Select Enterprise Edition
* Click on Next
4. Specify Home Details
* Name: OraDB10gASM
* Path: /u01/app/oracle/product/10.2.0/asm
Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.
* Click on Next
5. Product-specific Prerequisite Checks
* If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
* Click on Next
6. Select Configuration Option
* Select Configure Automatic Storage Management (ASM)
* Enter the ASM SYS password and confirm
* Click on Next
7. Configure Automatic Storage Management
* Disk Group Name: DATA
* Redundancy
- High mirrors data twice.
- Normal mirrors data once. This is the default.
- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.
* Add Disks
The disks you configured for use with ASMLib are listed as Candidate Disks. Select each disk you wish to include in the disk group.
* Click on Next
8. Summary
* A summary of the products being installed is presented.
* Click on Install.
9. Execute Configuration Scripts
* At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
* Click on OK when finished.
10. Configuration Assistants
* The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
11. End of Installation
* Make note of the URLs presented in the summary, and click on Exit when ready.
12. Congratulations! Your new Oracle ASM Instance is up and ready for use.
Kind regards
Mohamed -
How to add ASM Disk to Disk Group that is shown as MEMBER?
HI,
We have a Production Oracle RAC on HP-UX. We have Two Disk Groups one for Arcive (ARC_DISK) and other for Database(DATA_DISK).
Today I wanted to add another 200 GB of Disk Space to the DATA_DISK Group.
I opened DBCA and could not find the new disk in the 'Show Candidates' option. But after the Unix admin changed the ownership and permission of the Disk, it was shown in 'Show Candidates' option. I selected this Disk and continued but got an error later as we didnt change the ownership and permission from the 2nd Unix server. After doing this, , when I open DBCA to add disk, nothing is shown in 'Show Candidates' option but when we click on 'Show All', the new disk is listed as MEMBER (header status) but not allocated to any Disk Group.
I would like to know how to allocate this Disk (which is already shown as MEMBER) to the DATA_DISK - ASM diskgroup. This is a production database system.
Rgds,
Thiruuser1983888 wrote:
Hi,
Due to huge difference in Disk Size which I am trying to add to the existing Disk Group which has 1024 GB of Disk, would it be a better idea to create a new Disk Group with 200g GB Disk? Will this command work as the header_status is already MEMBER?
SQL>CREATE DISKGROUP DATA_DISK1
EXTERNAL REDUNDANCY
DISK 'disk path';
Thanks.Yes, you can create new diskgroup (DATA_DISK1). Just make sure all datafile in DATA_DISK autoextend off, then create all your new datafile to the new diskgroup DATA_DISK1. The command will not work as the header_status is MEMBER. You'll receive ORA-15018 & ORA-15033 error. As I mentioned before, you need to use FORCE option or format the disk using dd* command before perform above command.
1st Option : (Format the raw disk using dd command creating new diskgroup. Header_status MEMBER -> CANDIDATE). E.g.
1. dd if=/dev/zero of=/dev/rdsk/c2t1d0 bs=8192 count=1000 //any rac nodes
2. # chown oracle:oinstall /dev/rdsk/c2t1d0 //perform on both node. This apply if using LVM or direct access to raw
3. SQL> create diskgroup data_disk1 external redundancy disk '/dev/rdsk/c2t1d0'; //any RAC node in ASM instance
4. SQL> alter diskgroup data_disk1 mount; //try to mount on the other node
2nd Option : (Using FORCE option when creating the new diskgroup. Header_Status = MEMBER)
1. # chown oracle:oinstall /dev/rdsk/c2t1d0 //perform on both node. This apply if using LVM or direct access to raw
2. SQL> create diskgroup data_disk1 external redundancy disk '/dev/rdsk/c2t1d0' force; //any RAC node in ASM instance
3. SQL> alter diskgroup data_disk1 mount; //try to mount on the other node
Just be careful when using FORCE option or DD command. If you perform this operation on existing ASM disk groups disk, it may destroy existing disk groups.
Maybe you are looking for
-
My s key does not work on my keyboard.
Nothing I do will get my s key to work. Have replaced the keyboard, ran disk utility, fcsk/sbin -fy in safe mode, zapped the pram, reset smc, re-installed OS 10.6.7 and updated. Only way I can get an s is to copy one from a doc and paste it in as I h
-
Portal display issue in Portal 7.3 version
Hi Experts, We are using portal 7.3 vesion,one of the user getting portal disply issue,it is not appearing proper ess portal screen. we checked with other user,they will not getting the same issue,it is only one use faceing this issue. please let me
-
Windows 8.1 cannot connect to group policy client service
Windows 8.1 laptop under administrator account has this "cannot connect to group policy client service" error.Found the following instructions on internet but I don't see this "Replace owner on subcontainers and objects" box on Permissions/Advanced p
-
how do i fix this?
-
Having problems downloading iTunes. After an update notice, I was unable to open iTunes. I de-installed and attempted to reinstall it and it still won't open. The first error duirn the update was a dll file missing, then a Windows error 7. The screen