How to check Database Growth for a DB on ASM?
Hi there
I have been using the following script to check the database growth (for DBs on Filesystem):
SELECT b.tsname tablespace_name ,
MAX(b.used_size_mb) cur_used_size_mb ,
ROUND(AVG(inc_used_size_mb),2)avg_increas_mb
FROM
(SELECT a.days,
a.tsname ,
used_size_mb ,
used_size_mb - LAG (used_size_mb,1) OVER ( PARTITION BY a.tsname ORDER BY a.tsname,a.days) inc_used_size_mb
FROM
(SELECT TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY') days ,
ts.tsname ,
MAX(ROUND((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) used_size_mb
FROM dba_hist_tbspc_space_usage tsu ,
dba_hist_tablespace_stat ts ,
dba_hist_snapshot sp,
dba_tablespaces dt
WHERE tsu.tablespace_id = ts.ts#
AND tsu.snap_id = sp.snap_id
AND ts.tsname = dt.tablespace_name
AND sp.begin_interval_time > sysdate-7
GROUP BY TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY'),
ts.tsname
ORDER BY ts.tsname,
days
) a
) b
GROUP BY b.tsname
ORDER BY b.tsname;And I think it always gave me good results until I ran this script on a DB (10.2.0.5) on ASM.
Is it because databases on ASM are maintaied differently OR is it that most proabbly there has been no activity on this database in the last 7 days? I even ran this query for last 90/180-days and it still returned me following results:
TABLESPACE_NAME CUR_USED_SIZE_MB AVG_INCREAS_MB
SYSAUX 574.38 .36
SYSTEM 514.69 0
DATA 1593.25 0
IDX .06 0
UNDOTBS1 69.06 -3.84
USERS 96.13 0Thanks in advance!
I have no reason to believe tablespaces under ASM are maintained differently, so the most likely explanation is change in DB activity.
What is your AWR retention? The default is 7 days, so if yours is set at the default then running the query for 90/180 days would not give you more information.
If you want to get useful output from your scripts, you might need to adjust the AWR retention and your SYSAUX tablespace respectively.
If the DB is monitored by Oracle Enterprise Manager(OEM), you can do tablespace forecasting based on the metrics collected by OEM. I did a presentation about this (NYOUG,VirtaThon) a while back:
http://iiotzov.files.wordpress.com/2011/08/iotzov_oem_repository.pdf
http://iiotzov.files.wordpress.com/2012/05/oem-repository-a-second-look.doc
Iordan Iotzov
Similar Messages
-
How to determine database growth for new B1 instalation
Hello B1 people,
I'm working on the capacity planning of my new business one project and must know how to determine database growth. Does anyone did something like that before?
Wich tables should I consider?
Thanks in advance.Hello Gabriel,
I think it is difficult to make any predictions about database growth because this depends on the volume of your business transactions, the number of users, the continuity of your master data...
For example a small number of users can create a lot of transactions (accounting, logistics) with big documents like sales orders with more than 100 items, or a lot of users who primarily look up things but only create small transaction won't create too much data and thus influence database growth in totally different ways.
You should collect information about the volume of daily business to make any forecasts.
If you start with an empty database, the first big growth will be when you upload your master data, but if only few business transactions follow, you shouldn't use that first increase for your calculation.
Is this your very first B1 installation, or do you already have B1 systems running? If you use the EWA service on a running B1 installation on a regular basis, then you will get a good impression of database growth and transaction volume but you should only use this as a basis for your calculation if the business of the new installation is similar to already running company's.
Hope that helps,
Sandra -
How to check with table for cursor..?
How to check with table for cursor..?
Here I have Table temp_final_plan
Here i want to update if already exit...below is the procedure....
CREATE OR REPLACE PROCEDURE spu_final_profit_plan
AS
-- Constant declarations
ln_errnum number := 0;
-- Variable declarations
ls_errmsg app_errors.err_msg%TYPE;
ls_appmsg app_errors.app_msg%TYPE;
ls_appid app_errors.app_id%TYPE;
-- Cursor declaration for final_update_el
CURSOR cur_final_update_el IS
select '910' ent,
'9127316' center,
post_acct,
sum(avg_mtd_01) sum_avg_mtd_01,
sum(avg_mtd_02) sum_avg_mtd_02,
sum(avg_ytd_01) sum_avg_ytd_01,
sum(avg_ytd_02) sum_avg_ytd_02
from mon_act_cypy
where rec_type = 'A'
and sum_flag = 'D'
and yr = '2008'
and substr(ctr_or_hier, 1, 2) = 'el'
and ent || sub_ent in
(select ent || sub_ent
from ent_ref
where roll_ent || roll_sub_ent = '999100')
group by post_acct
having sum(avg_mtd_01) <> 0
or sum(avg_mtd_02) <> 0
or sum(avg_ytd_01) <> 0
or sum(avg_ytd_02) <> 0;
-- Cursor declaration for final_update
CURSOR cur_final_update IS
select b.plan_ent b_plan_ent,
b.plan_ctr b_plan_ctr,
a.post_acct a_post_acct,
sum(a.avg_mtd_01) sum_avg_mtd_01,
sum(a.avg_mtd_02) sum_avg_mtd_02,
sum(a.avg_ytd_01) sum_ytd_mtd_01,
sum(a.avg_ytd_02) sum_ytd_mtd_02
from mon_act_cypy a,
plan_unit_tbl b
where a.ent || a.ctr_or_hier = b.ent || b.ctr_or_hier
and a.rec_type = 'A'
and a.sum_flag = 'D'
and a.yr = '2008'
and b.hier_tbl_num = '001'
and a.ent || a.sub_ent in
(select ent || sub_ent
from ent_ref
where roll_ent || roll_sub_ent = '999100')
group by b.plan_ent, b.plan_ctr, a.post_acct
having sum(a.avg_mtd_01) <> 0
or sum(a.avg_mtd_02) <> 0
or sum(a.avg_ytd_01) <> 0
or sum(a.avg_ytd_02) <> 0;
-- Begin the procedure body
BEGIN
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update_el IN cur_final_update_el
LOOP
EXIT WHEN rec_final_update_el%NOTFOUND;
IF rec_final_update_el. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,
WHERE ent = rec_final_update_el.ent
AND center = rec_final_update_el.center
AND post_acct = rec_final_update_el.post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
rec_final_update_el.center,
rec_final_update_el.post_acct,
rec_final_update_el.sum_avg_mtd_01,
rec_final_update_el.sum_avg_mtd_02,
rec_final_update_el.sum_avg_ytd_01,
rec_final_update_el.sum_avg_ytd_02);
END IF;
END LOOP;
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update IN cur_final_update
LOOP
EXIT WHEN rec_final_update%NOTFOUND;
IF rec_final_update. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update.sum_avg_ytd_02,
WHERE ent = rec_final_update.b_plan_ent
AND center = rec_final_update.b_plan_ctr
AND post_acct = rec_final_update.a_post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update.b_plan_ent,
rec_final_update.b_plan_ctr,
rec_final_update.a_post_acct,
rec_final_update.sum_avg_mtd_01,
rec_final_update.sum_avg_mtd_02,
rec_final_update.sum_avg_ytd_01,
rec_final_update.sum_avg_ytd_02);
END IF;
END LOOP;
-- EXCEPTION handling section
EXCEPTION
-- Fire OTHERS Exception case by default
WHEN OTHERS THEN
-- ROLL BACK Transaction, if any failure
ROLLBACK;
ln_errnum := SQLCODE;
ls_errmsg := SUBSTR(SQLERRM, 1, 100);
-- Log the ERRORS into APP_ERRORS table using SPU_LOG_ERRORS procedure
spu_log_errors(ln_errnum, ls_errmsg, ls_appid, ls_appmsg);
-- End of the stored procedure
END spu_final_profit_plan;
[\pre]I'm not sure what you mean by, 'How to check with table for cursor..?' but I'll offer a comment on your Code Snippet. I think you want to know how to check if a record exists so you know if you need to perform an INSERT or an UPDATE.
Here is a snippet of your code. I'll put my comments in "Comment" style in your code.
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update_el IN cur_final_update_el
LOOP
/* There is no need to test for %NOTFOUND since you are using Cursor FOR Loop!
** This construct automatically exits when the last record is processed. */
EXIT WHEN rec_final_update_el%NOTFOUND;
/* Is this where you would like to know how to Check if the record already exist??
** I asked this because, 'rec_final_update_el.' is not valid syntax. Are you looking for
** an Cursor Attribute or Method you can check here?
** I would suggest a Primary Key or Unique Index on ENT, CENTER, and POST_ACCT
** on the TEMP_FINAL_PLAN table. Then simply perform an INSERT and code an
** Exception to UPDATE when you get a DUP_VAL_ON_INDEX exception. Otherwise,
** you will need to simply run an Implicit or Explicit Cursor to test if the row exists and
** use this return value to determine if you should INSERT or UPDATE. */
IF rec_final_update_el. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,
WHERE ent = rec_final_update_el.ent
AND center = rec_final_update_el.center
AND post_acct = rec_final_update_el.post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
rec_final_update_el.center,
rec_final_update_el.post_acct,
rec_final_update_el.sum_avg_mtd_01,
rec_final_update_el.sum_avg_mtd_02,
rec_final_update_el.sum_avg_ytd_01,
rec_final_update_el.sum_avg_ytd_02);
END IF;
END LOOP;I hope I've answered your question, but if I haven't please provide more details so we can better understand your request.
Craig... -
How to create database item for fast formula?
Hi,
Is there any document for how to create database item for fast formula? I could not find in Metalink or this forum. Thanks.
AndyOracle ship many pre-delivered Database Items plus they're created automatically when you create Input Values (etc).
There's often something already there for you. If there's not, you usually create Fast Formula functions to retrieve other data. You don't create your own custom DBIs; Oracle don't deliver APIs for that. -
How to check call duration for total dialled calls (after resting) on a particular day in iphone 4?
Is there a solution like iphone 5, i.e.Settings > Cellular.if the device is unlocked cellular is called mobile
-
Scripts To Check Database Growth in Oracle 10g
Hi All,
I need your help developing a script to find out the database growth in Oracle 10G on daily, weekly and monthly basis.
In our production database tablespace growth is huge and we are adding data files frequently. Management is asking about the database growth report and I need to present it. Is there any such script which will suffice the purpose.
My database version is 10.2.0.5.
Please help.
Regards,
Arijit1000103 wrote:
Hi All,
I need your help developing a script to find out the database growth in Oracle 10G on daily, weekly and monthly basis.
In our production database tablespace growth is huge and we are adding data files frequently. Management is asking about the database growth report and I need to present it. Is there any such script which will suffice the purpose.
only the report that you create
How do I ask a question on the forums?
SQL and PL/SQL FAQ -
How to check Business Partner for archiving ?
Hi friends,
I want to check the BP for Archiving.
So I am trying to set the Archiving Flag in BP Status Tab
But the Archiving Falg Check box is never in Display Mode and so I am not able to check the BOx. What is the use of that box if it can't be accessed ? Any clues on how to check it ?
Many thanks
C.K.Hi,
You can run DACONTROL transaction to set the deletion flag for business partner.
-Thanks,
Ajay -
How to check a value for paramter query
I am passing a paramter value from my text box to my sql statement and I would like to check if the value is entered into a text box. If you have any idea please share it with me, i have been struggling with this for many days.Code below is how i try to check if the value is entered but I do not know how to check the value in the :VendorName
thanks
If Not txtVendorName.Text = "" Then
Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
End IfSorry guys english is not my first language and i will try to be clear and specific.
I have a search page where customeres can do searching either using a text box or two dropdowns i have on my page. they have the option of doing search either using a text box or dropdowns or both.Everything seems to work fine but if users does not leave the text box blank. but they leave the text box blank and do searching using the two dropdowns then the page comes up empty and i checked my query and i should get a value. Attacehed my code for you to look at it.
<pre>
Sub VendorSearch()
gvSearch.Visible = True
Dim MinPDate As String = drPur.SelectedItem.ToString
Dim MaxMDate As String = drPurM.SelectedItem.ToString
Dim liThisOne As ListItem
Dim strState As String = ""
For Each liThisOne In lstState.Items
If liThisOne.Selected Then
strState = strState & "'" & liThisOne.Value & "'" & ","
End If
Next
Dim Sql As String = " SELECT distinct V.VENDOR ""Vendor Id"",R.ADDRNUM,V.VNAMEL ""Vendor Name"",R.AADDR1,R.ACITY,R.VASST1, "
Sql = Sql & "R.ASTATE State,R.AZIPCODE, to_char(Max(P.DATEPUR),'YYYY/DD/MM') ""Plan Purchased Date"" , "
Sql = Sql & "TRIM (r.aaddr1 || decode(trim(r.aaddr2),null,'',' - ') || r.aaddr2) Address,"
Sql = Sql & " substr(decode(trim(r.vasst1),null, 'N/A','000/000-0000?','N/A','000/000-0000','N/A', r.vasst1),1,12) Fax, "
Sql = Sql & " substr(decode(trim(r.aphone),null, 'N/A','000/000-0000?','N/A', r.aphone),1,12)Phone "
Sql = Sql & "FROM VENDOR V,VENDADDR R, PLANHOLD P "
Sql = Sql & "WHERE V.VENDOR = R.VENDOR AND P.VENDOR = R.VENDOR "
Sql = Sql & " AND (P.DATEPUR >= TO_DATE('1999-01-01','YYYY-MM-DD')) "
Sql = Sql & "AND P.DATEPUR In ( select Max(P.DATEPUR) from PLANHOLD P where P.vendor = R.VENDOR) "
'If txtVendorName.Text <> "" Then
' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
'End If
If (strState.Length > 0 And lstState.SelectedIndex <> 0) Then
strState = Left(strState, strState.Length - 1)
strState = "(" & strState & ")"
Sql = Sql & "AND R.ASTATE IN " & strState
End If
If (drPur.SelectedIndex <> 0 And drPurM.SelectedIndex <> 0) Then
Sql = Sql & " AND to_number(to_char(p.datepur, 'YYYY')) between " & "'" & MinPDate & "'" & " AND " & "'" & MaxMDate & "'"
End If
' Dim Para As String
' SqlDataSource1.SelectParameters.
If Not txtVendorName.Text = "" Then
Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
End If
'If Not IsDBNull(SqlDataSource1.SelectParameters(":VendorName")).val Then
' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
'End If
Sql = Sql & " AND V.VOBSOLET = 'N' "
Sql = Sql & "GROUP BY V.VENDOR, R.ADDRNUM,V.VNAMEL,R.AADDR1,R.AADDR2,R.ACITY,R.ASTATE, R.AZIPCODE, R.APHONE, R.VASST1, P.DATEPUR "
Sql = Sql & "ORDER BY V.VENDOR "
Response.Write("Sql " & "<br/>" & Sql & "<hr/>")
SqlDataSource1.SelectCommand = Sql
End Sub
</pre> -
How to specific database instance for powershell commnad New-SPConfigurationDatabase
I'm runing powershell commnad New-SPConfigurationDatabase ,
there is a parameter is
DatabaseServer, how to specific database instance?
AwenHi,
Just use the instance name for Databse server...like below.
-DatabaseServer server2012sql\instancename –AdministrationContentDatabaseName SharePoint_Admin_Content
Hope this helps.
Cheers,
Sangeetha
-Sangeetha -
How to check silent switches for adobe reader installation ?
Hi All,
We are working on one project where we have to install adobe remotely and silently on around 5K machines. I am wondering how to check all adobe reader silent installation switches.
Any help would be great
Thanks And Regards
Vaibhav Singh
[personal info removed by moderator]What do you mean by "check" the silent switches? Do you mean you want the documentation for enterprise deployment?
(Worth mentioning just in case: you will need a deployment license from Adobe). -
[Win-ILL 10]How to check overprint & color for Pattern Swatches?
Hi all,
Im using Visual C++ 6.0 & Illustrator 10.
Please tell how to check whether overprint is applied to an object inside a Pattern Swatch(I dont want to Expand the object)
I also want to get the color for the object inside the Pattern Swatch
.Any Solution for this?
Thanks
myRiazThe reference to port 427 is in any firewall on the computer. Network communication is done over these ports and the job of the firewall is to monitor and block these ports.
This document might also be relevant for the problem.
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c04011652&lc=en&cc=us&dlc=en&product=5199463
I was an HP employee.
Please mark the post that solves your problem as "Accepted Solution" -
How to check the DPI for images on pages
hi,
I want to check the DPI for images programatically, is there any function available in acrobat SDK,
If not what other option we have to check the DPI for images programatically.
Thank you,You don't mention which parts of the SDK, but you can use the Preflight feature of Acrobat via either JavaScript or C/C++ (plugin) to generate a report of images in a document and their information (including dpi).
You can also write a plugin to iterate over each image individually and get its properties. -
How to check instance alert.log in RAC 10g ASM environment?
i know to use Grid control or OEM check instance alert.log?
But since in ASM the alert.log is not recognized, how to check it in OS level just like regular non-RAC checking?
or the best way to check it ?
thanks a lot!user620464 wrote:
i know to use Grid control or OEM check instance alert.log?
But since in ASM the alert.log is not recognized, how to check it in OS level just like regular non-RAC checking?
or the best way to check it ?
thanks a lot!Well if you mean that you have put the alert over asm storage than where did it mention to put alert file over ASM? Is not like an o/s where one can go and read the file and surely, neither we need striping or mirroring of it either. I am not sure that there is any way to do so over ASM storage.
HTH
Aman.... -
How to check the flogi for NPIV virtual wwpns
I have enabled NPIV on the MDS 9513 director, I have questions how does virtual wwpns log into the switch port, ?
Does "show flogi database" list the virtual wwpns? And what will be the port mode ? NP ?We use the following script for this:
select d.owner
, d.table_name
, d.blocks * p.value / 1024 / 1024 hwm_mb
, d.num_rows * avg_row_len / 1024 / 1024 rows_length_mb
, decode ( 100
- 100
/ ( (d.blocks * p.value)
/ decode ((d.num_rows * avg_row_len)
, 0, d.blocks * p.value
, (d.num_rows * avg_row_len)))
, 0, 100
, 100
- 100
/ ( (d.blocks * p.value)
/ decode ((d.num_rows * avg_row_len)
, 0, d.blocks * p.value
, (d.num_rows * avg_row_len)))) percentage_waisted
, ((d.blocks * p.value / 1024 / 1024) / 100)
* (decode ( 100
- 100
/ ( (d.blocks * p.value)
/ decode ((d.num_rows * avg_row_len)
, 0, d.blocks * p.value
, (d.num_rows * avg_row_len)))
, 0, 100
, 100
- 100
/ ( (d.blocks * p.value)
/ decode ((d.num_rows * avg_row_len)
, 0, d.blocks * p.value
, (d.num_rows * avg_row_len))))) mb_waisted
, decode (to_char (num_rows), '0', '!! ' || num_rows || ' !!!', to_char (num_rows))
records
from dba_tables d
, v$parameter p
where p.name = 'db_block_size'
and d.blocks > 1 --> no sense in checking empty tables with no blocks allocated
and table_name like upper ('&table_name');
Please note the usage of the v$parameter table. The executing user must have SELECT rights on this view -
How to setup database user for windows NT SSO
Hi,
We have a scenario where we have to setup a database user so that SSO can be worked in windows environment.
We have oracle 10g installed on UNIX server. Now we want to setup a autosys user which will also be a winows user for eg by the name kumaral and domain (which is Logon option in windows) will be FM, so eventually user name will be FM\kumaral. Autosys will be on windows machine and we have installed oracle client on this machine.
On oracle database we have created two user by following syntax:
(1) CREATE USER "OPS$FM\KUMARAL" IDENTIFIED EXTERNALLY;
(2) CREATE USER "OPS$FM\kumaral" IDENTIFIED EXTERNALLY;
Also we have provided connect grant to these users.
GRANT CONNECT TO "OPS$FM\KUMARAL".
GRANT CONNECT TO "OPS$FM\kumaral".
I am login in windows through FM\kumaral user, but we are not able to connect to oracle through this user, we are trying to connect to oracle from below mentioned query:
sqlplus /
but we are not able to connect.
Can someone please help me on this?
Thanks in Advance.
Amit.Check MOS note :
WIN: Setup O/S Authentication [ID 60634.1]
Regards
Rajesh
Maybe you are looking for
-
I was charged for my backup but I want more how can I get more I tried but it says error
My back up plan renewed but I want a higher plan I tried to add it but it said error and dismiss. How do I add the huger plan?
-
I finally got my video install completed - I swapped out a nicer AGP STB card for an older PCI Matrox card, and that was good. I started installing disk 2 about 2 hours ago. I opened a terminal window, and a few files systems seem to be getting used.
-
How to define a keyboard shortcut that includes a function key?
I was trying to set up a keyboard shortcut for a Service in Sys.Prefs -> Keyboard -> Keyboard Shortcuts and discovered that if I attempt to use a function key as a part of the shortcut that it disappears out of the key entry field as soon I click off
-
TS3274 load web page then screen goes black and reboots
hit safari icon.then connect to a web page then all of the sudden the screen shades out and reboots the unit
-
SQL Query issue find difference in records
Hi All, I am using oracle 10g. I need urgent help in finding difference in records based on date: I have table sales as below: salesman SALES_COUNT DATE JOHN 20 04/01/2012 DENNY 15 04/01/2012 JOHN 30 04/02/2012 DENNY 30 04/02/2012 JOHN 45 04/03/2012