Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASM Disk Group script

Posted on 2014-03-07
3
Medium Priority
?
981 Views
Last Modified: 2014-03-21
I need assistance with a script I can run as a cronjob that will send me the space of my ASM Disk groups (Total, free and used). I have the coding on how to send to my email but Im looking for details of whats inside script as to how to connect to sqlplus / as sysdba and execute sql query.
Any of you have a script in place that sends you your disk group info periodically so you know how much space is used?

Thanks
0
Comment
Question by:k3vsmith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1000 total points
ID: 39913755
Why use CRON?  Once you get the query why not use UTL_SMTP and have the database email you?

I've not done a lot with ASM but take a look at:  V$ASM_DISKGROUP

FREE_MB       NUMBER       Unused capacity of the disk group (in megabytes)

http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_1027.htm#REFRN30171
0
 

Author Comment

by:k3vsmith
ID: 39919422
Yes this gave the query I need but can you provide more info on UTL_SMTP? How are you using it? You recommend it over cron jobs?
0
 
LVL 10

Accepted Solution

by:
dbmullen earned 1000 total points
ID: 39933294
If you are into shell-scripting and "cron" you might want a "command-line" way of getting "disk" group information...

set your oracle environment variables to point to "asm", then
asmcmd lsdg

or remove the headings:
asmcmd lsdg -H  

I like the "view" of v$asm_diskgroup but that will need scheduled in a DBMS_JOB or DBMS_scheduler job or your scheduler of choice..  plus, if you have MANY databases on the same server, you just need to pick one.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question