Query for  to get  database size, used size, freesize, db size after drop

Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
I have to get result like this
Total size, used size, free size ,tablespace size of RQ tables alone
Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
Pls reply
S

i tried with
SELECT
--fs.tablespace_name name,
df.totalspace/1024/1024 mbytes,
(df.totalspace - fs.freespace)/1024/1024 used,
fs.freespace/1024/1024 free
FROM
(SELECT
--tablespace_name,
ROUND(SUM(bytes)) TotalSpace
FROM
dba_data_files
) df,
(SELECT
--tablespace_name,
ROUND(SUM(bytes)) FreeSpace
FROM
dba_free_space
) fs
i AM GETTING total bytes, used bytes, free bytes
I WANT TO include one more column.. database size after deleting rq tables
Pls reply
S
Edited by: AswinGousalya on Jul 10, 2009 2:17 PM

Similar Messages

  • You want to know the amount of space the transaction log for the Customer database is using. Which T-SQL command would you use?

    You want to know the amount of space the transaction log for the Customer database is using. Which T-SQL command would you use?

    Forced me to do a little research.
    DBCC SQLPERF(logspace)
    See also
    http://stackoverflow.com/questions/198343/how-can-i-get-the-size-of-the-transaction-log-in-sql-2005-programmatically
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Query for Tracking the database

    Hai
    i am entering Some process in Client Application. Each process some records get updated in database tables.
    How can i fiind it? for example if i am updating engine menu of the application. engine table and some other tables are get updated. i dont have source code of application with me. how can i monitor that what are the tables get affected in the database.
    we have to work from database side.
    one thing i can do... write the query for table and count(*) after every process so that i can get which table get affected by identifying the row count.
    but i want only particular table get affected on particular process.
    Kindly give ur suggesiton
    S

    Well, you can connect as privileges user and issue:
    ALTER SYSTEM SET SQL_TRACE=TRUE;This will enable trace of every user session. So it is better if you are the only one using application and database. To find trace files location issue:
    SQL> select value from v$parameter where name = 'user_dump_dest';Trace files will have all SQL statements issued by a session. You can either read them raw (trace files are text files) or use Oracle supplied tkprof utility to format them.
    SY.
    P.S. Do not forget to turn off trace after you are done:
    ALTER SYSTEM SET SQL_TRACE=FALSE;

  • FDM Scripting Query for last imported source file using Batch Processing

    Hi Experts,
    I'm currently in the processing of automating the FDM load process on our version of FDM 9.3.3 using batch processing and the FDM Task Manager. Most of the process works fine including an email alert which notifies users of when a data load has taken place.
    As part of that email alert I am trying to attach the source file that has been loaded in batch processing. I have managed to get an attachment using the following FDM Script Object of:
    "API.MaintenanceMgr.fPartLastFile(strLoc, True, False)".
    But have noticed that using this only attaches the last "manually" imported file rather than the last file imported using the batch processing.
    My question is: Is it possible for someone to steer me into the right direction of either a more appropriate API or if I have missed a step in my script.
    Any help as always would be much appreciated.
    Cheers
    Pip

    Unfortunately the batch process does not work the same way as on-line. I am assuming you are using the normal batch load and not Multiload (although the batch is simisar).
    the batch file name gets recorded on the tBatchContents table, and moved to the import/batches folder under the folder for the current batch run. However, if successful the file gets deleted (and from memory does not get archived). To add the import file to the e-mail, after a successful load, i think you will need to store a copy of it prior to importing the file.

  • Re:Query for no.of days delayed using Receipt from production posting date.

    Dear SAP Experts,
    I need a query to calculate no of days delayed by using Receipt from production posting date and prod.order due date..i have already done the query but there is no link for joining the tables.Is there any link to join the tables..
    Plz Suggest a good query for this issue..
    With Regards,
    Revathy

    Dear Revathy,
    I think there is no need to link table if you just need calculate no of days delayed by using Receipt from production posting date and prod.order due date.
    You may check this query with the above:
    SELECT T0.ItemCode,T0.DueDate,
    T0.DocNum, T0.CloseDate,
    Datediff(dd,t0.DueDate,T0.CloseDate) Diff
    FROM dbo.OWOR T0
    WHERE  Datediff(dd,t0.DueDate,T0.CloseDate) > 0
    Thanks,
    Gordon

  • Need query for refresh test database.

    Hi,
    I want refresh production database to test database refresh using expdp dumpfile. Please provide steps this is the requirement
    This request is to refresh the Tecnomatix test database MFEM which is
    on the NATEST server wnmcdwtk.natest.gm.com. This database needs to
    be refreshed using an Oracle full backup dump file from the Tecnomatix
    production database MFEP which runs on the production NAENG server
    wnmcdds8.naeng.gm.com. The MFEM and MFEP databases are both at Oracle
    v10.2.0.4.

    Hi,
    You have posted to the wrong section of the forum. This forum us for Berkeley DB.
    Regards,
    Alex Gorrod
    Oracle Berkeley DB

  • MDX query for to get the data from two cubes

    Hi
    Can you tell me how to create MDX query to get the values from two cubes.  (One hierarchy from first cube and one hierarchy from second cube)
    Can you give me one example.
    Regards,
    Madhu.
    Sudhan

    Hi Sudhan,
    According to your description, you want to retrieve data from two different cubes, right? The short answer is yes. To query multiple cubes from a single MDX statement use the LOOKUPCUBE function (you can't specify multiple cubes in your FROM statement).
    The LOOKUPCUBE function will only work on cubes that utilize the same source database as the cube on which the MDX statement is running. For the detail information about it, please refer to the link below to see the blog.
    Retrieving Data From Multiple Cubes in an MDX Query Using the Lookupcube Function
    Regards,
    Charlie Liao
    TechNet Community Support

  • Query for row by rows-before using seq number

    Hi,
    I have a table of CatalogAuthor records
    long : id
    varchar : author
    long : seqnum
    I have made the table so that initially, if there are 10000 unique authors, then the rows will have sequence numbers from 1 to 10000. As authors are dynamically added, they are given the sequence number of an existing row in the table, i.e. the nearest row whose author comes before the new author. As time goes there are more and more duplicates, and at a certain point, the table has all its sequence numbers reassigned to be monotonic increasing by author name order.
    We want to use this table to build a tree of about 10 nodes per parent, culminating in author names. So to expand the tree at the first level, we could divide 10000 by a suitable power of 10 to get the groups of sequence numbers. However, with duplicate seqnum, there may be 14365 rows so ideally, to overcome the problem of clumping, I would do some kind of query to identify the 1436 record in sorted order by sequence number, the 2872 record by seq number and so on.
    What query would that be? With appropriate indices, would it still be slow? Would I have to do 10 of these queries to expand one node with 10 children? Is there a better design to accomplish the same goal of exploding a balanced tree by author name sort order, culminating in a leaf of one particular author?
    Andy

    Hi, Andy,
    user9990110 wrote:
    Hi,
    I have a table of CatalogAuthor records
    long : id
    varchar : author
    long : seqnumYou can't be serious! The LONG data type is nothing but trouble, and completely unnecessary. You must mean NUMBER instead of LONG.
    I have made the table so that initially, if there are 10000 unique authors, then the rows will have sequence numbers from 1 to 10000. As authors are dynamically added, they are given the sequence number of an existing row in the table, i.e. the nearest row whose author comes before the new author. As time goes there are more and more duplicates, and at a certain point, the table has all its sequence numbers reassigned to be monotonic increasing by author name order.
    We want to use this table to build a tree of about 10 nodes per parent, culminating in author names. So to expand the tree at the first level, we could divide 10000 by a suitable power of 10 to get the groups of sequence numbers. However, with duplicate seqnum, there may be 14365 rows so ideally, to overcome the problem of clumping, I would do some kind of query to identify the 1436 record in sorted order by sequence number, the 2872 record by seq number and so on.
    What query would that be? With appropriate indices, would it still be slow? Would I have to do 10 of these queries to expand one node with 10 children? Is there a better design to accomplish the same goal of exploding a balanced tree by author name sort order, culminating in a leaf of one particular author?I'm just curious, why do you need this? What will this tree structure do for you that an index on author won't do?
    I don't know of any way to automatically keep a tree balanced every time DML is done.
    You could periodically re-balance the tree; that shouldn't be too hard. Let's say you want each parent to have up to r children. Use the analytic ROW_NUMBER function to assign unique numbers 0, 1, 2, 3, ... to each row, in order by author.
    The row numbered 0 will have no parent
    For all all rows numbered n (n > 0), the parent will be the row numbered FLOOR (n/r).
    Whenever you re-configure the tree, use a MERGE statatment. An index on author will probably make generating the ROW_NUMBERs faster.
    If you need help, post CREATE TABLE and INSERT statements to show the table as it exists with the tree out of balance, and also show how you want it to look after balancing. Use a small value of r (maybe 2 or 3) to keep the sample set small.
    Edited by: Frank Kulash on Jan 12, 2011 12:41 PM

  • Query for create manual tabular form using apex collection using item textfield with autocomplete

    can we create a manual tabular form inside item textfield with autocomplete ?
    how it is possible?
    with Apex_item API used for this item.
    i used this code for creat  cascading select list
    select seq_id,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   1,
            p_value                     =>   c001,
            p_query                     =>   'SELECT C001 D
         , C002 R
      FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = ''col1''',
            p_attributes                =>   'style="width:150px" onchange="f__name(this,parseInt(#ROWNUM#));"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f01_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f01_#ROWNUM#',
            p_show_extra                =>   'NO') name,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   2,
            p_value                     =>   c002,
            p_query              =>   ' SELECT null d, null r FROM dual WHERE 1 = 2
            p_attributes                =>   'style="width:150px"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f02_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f02_#ROWNUM#',
            p_show_extra                =>   'NO')name2,
    from apex_collections
    where
    collection_name = 'COLLECTION1'
    It is fine .
    but i want item in tabular form  textfield with autocomplete and remove select list. my requirement is using textfield with autocomplete select a employee name and second item textfield with autocomplete display dependent perticular employee related multiple task.
    how it is created.i have no idea related textfield with autocomplete.Please help me....

    pt_user1
    I understand that the add row button is currently doing a submit.
    To not submit the page you need a dynamic action on the page.
    Does the javascript function addRow do what you want?
    Otherwise have a look at the following two threads Add row in manual tabular form using dynamic action and Accessing Tabular Form & Add Elements to Collection without Page Submit.
    You're process could be something like:
    Add the new values to the collection using the idea's in the second thread and at the same time add the new row.
    And as second action refresh your tabular form.
    If you get stuck set up what you have done on apex.oracle.com using the tables from the demo application.
    Nicolette

  • Problem Creating a query for a hierarchical tree. [using connect by prior]

    Hi all,
    I have 2 tables.
    box (box_id, box_name)
    item(item_id, item_name, box_id)
    In a box there are several items.
    I want to create a hierachical tree to display items that are present in each box.
    LIKE:
    |---BOX1
    | |----ITEM 1
    | |----ITEM 2
    |
    |---BOX2
    | |----ITEM 1
    | |----ITEM 2
    Currently i am trying this query:
    SELECT -1 state, box_name, 'icon' icon, box_id val
    from box b, item i;
    I don't know what value to put for level, i don't know how to code the 'connect by prior' part.
    Could you please advise me?
    Michaël.
    PS. Then i will eventually use this query in forms builder.

    Note the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions)*" - so only for issues with the SQL Developer tool. Please post these questions under the dedicated SQL And PL/SQL forum.
    Regards,
    K.

  • Unable to get database connection using JNDI

    Hi,
    I am using Sun System Application Server 8.1 and using the following code in my web application:
    Context obj_initCtx = new InitialContext();
    Context obj_envCtx = (Context) obj_initCtx.lookup("java:comp/env"); //on this line exception is occured
    m_objDataSource = (DataSource) obj_envCtx.lookup("jndi/mydb");
    I have properly configured the deployment descriptors but getting following error on run time:
    javax.naming.NamingException invocation exception      
    at com.sun.enterprise.naming.NamingManagerImpl.getComponentId(NamingManagerImpl.java:999)     
    at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:661)     
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:132)     
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)     
    at com.ascertia.adss.module.base.ASC_DBManager.getConnection(ASC_DBManager.java:57)
    Any help will be highly appreciated:
    Regards,
    Yasir Khan

    I've had a similar error. In a filter I was able to call lookup("java:comp/env") but got that exception when calling env.lookup("jdbc/mydatasource") in the init() method. Some nice people here answered that I should configure a jndi name for my datasource with a __pm termination, and did it without success.
    My workaround was to call lookup outside init, in the doFilter method.
    Best regards.
    Antonio Varela.

  • QUERY TO GET database size, used size, freesize, tablespacesize of RQ table

    Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
    I have to get result like this
    Total size, used size, free size ,tablespace size of RQ tables alone
    Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
    ( Since i am not getting any reply i go for database forum)
    Pls reply
    S
    Edited by: AswinGousalya on Jul 8, 2009 3:41 PM

    Hello,
    This question looks like it is really for the Oracle RDBMS and not for Berkeley DB. In BDB, we do not have a notion of tablespace size. What database product are you using?
    regards,
    mike brey
    BDB engineering

  • New query for 'Manage Database' option in SQL Developer

    Dear all,
    I want to suggest a changed query for the 'Manage Database' option in SQL Developer (right-click on the connection), see the query below.
    This query has the following changes;
    - extra column with the Maximum disk space based on the datafiles (considering autoextend of datafiles); MAX_DATAFILES
    - the PERCENT_USED and PCT_USED are based on the MAX_DATAFILES, as this is really important (and not the difference between ALLOCATED and USED)
    - the results are shown in GB, as that is in my opinion more relevant in this time of data explosion
    - rename of the column FREE to UNUSED_ALLOCATED, as this column identifies how much of the Allocated space is not used
    I hope the query can replace the current one, to improve SQL Developer even more.
    Thanks for the nice tool SQL Developer!
    Kind regards,
    Siebe
    -- Manage Database - Changed Oracle SQL Developer query with regard to Usage of Tablespaces in GB (considering autoextend of datafiles)
    SELECT "TABLESPACE_NAME", "PERCENT_USED", "PCT_USED", "MAX_DATAFILES", "ALLOCATED", "USED", "UNUSED_ALLOCATED", "DATAFILES" FROM(
    select * from (
    SELECT a.tablespace_name,
    --'SQLDEV:GAUGE:0:100:0:0:'||nvl(ROUND(((c.bytes-nvl(b.bytes,0))/c.bytes)*100,2),0) percent_used,
    --ROUND(((c.bytes-nvl(b.bytes,0))/c.bytes)*100,2) PCT_USED,
    'SQLDEV:GAUGE:0:100:0:0:'||nvl(ROUND(((c.bytes-nvl(b.bytes,0))/c.maxbytes)*100,2),0) percent_used,
    ROUND(((c.bytes-nvl(b.bytes,0))/c.maxbytes)*100,2) PCT_USED,
    round(c.bytes/1024/1024/1024,2) allocated,
    round(c.bytes/1024/1024/1024-nvl(b.bytes,0)/1024/1024/1024,2) used,
    round(c.maxbytes/1024/1024/1024,2) max_datafiles,
    round(nvl(b.bytes,0)/1024/1024/1024,2) unused_allocated,
    c.datafiles
    FROM dba_tablespaces a,
    ( SELECT tablespace_name, SUM(bytes) bytes FROM dba_free_space GROUP BY tablespace_name ) b,
    ( select count(1) datafiles, SUM(bytes) bytes, SUM(DECODE(autoextensible, 'YES', maxbytes, bytes)) maxbytes, tablespace_name from dba_data_files GROUP BY tablespace_name ) c
    --( select count(1) datafiles, SUM(bytes) bytes, SUM(c.maxbytes) maxbytes, tablespace_name from dba_data_files GROUP BY tablespace_name ) c
    WHERE b.tablespace_name (+) = a.tablespace_name
    AND c.tablespace_name (+) = a.tablespace_name
    ORDER BY nvl(((c.bytes-nvl(b.bytes,0))/c.maxbytes),0) DESC
    ) --sub1 order by 1 asc
    )

    Very little technical information provided about the error.
    "+IO error.+" - this likely refers to the client attempting to use a socket handle and the call to the handle failing.
    +"The network adapter could not establish the connection.+" - this likely means that the IP address to connect to, could not be reached, or that the connection was not accepted on that port on the remote IP address. (typically hostname resolution errors would give a different error)
    The easiest way to test connectivity is using the ping command to bounce an ICMP echo off the remote IP.
    If that works, test access to remote port on that remote IP using the telnet command - this will check whether there is a service accepting connections on that port, and whether access to that port is allowed in case of firewalls en-route.

  • Where to find the resolved query sent to the database?

    Verison 4.1.1.00.23
    Hello,
    Where/How do I find the actual query that is sent to the database?  I've enabled Debug on the Dev Toolbar, but I still don't see where the query that is sent to the database is at? I'm hoping to see a view with the page items resolved not what is actually in the page.
    I have a query on a collection and I keep getting a 'SQL command not properly ended' error and I'm not seeing why it's not "properly ended".
    Hope this is clear.
    Let me know if not.
    Thanks,
    Joe

    Tony,
    Thank you for replying.
    There is an update -  The query no longer throws the 'SQL command not properly ended', but now it throws the dreaded 'Missing Right Parenthesis' error.
    The query is:
                APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B (p_collection_name => 'TEAM_EMP',
                                                                p_query => 'SELECT cme_system, tbs_team_id, resource_id,
                    CASE WHEN resource_type = ''C'' THEN ''Consultant'' ELSE ''Employee'' END AS resource_type, role,
                    jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec, forecast_id, project_id,
                    jan_id, feb_id, mar_id, apr_id, may_id, jun_id, jul_id, aug_id, sep_id, oct_id, nov_id, dec_id,
                    resource_name, tbs_forecast_year.last_updated, last_updated_by.last_updated_by, area_id, p.group_id, team_name,start_date, end_date, p.project_name
                    FROM tbs_forecast_year
                    INNER JOIN (SELECT project_id pid, area_id, tbs_projects.group_id, UPPER(project_name) project_name
                                FROM tbs_projects
                                WHERE status IN (''Pipeline'', ''Planned - Partially Funded'', ''Planned'', ''Execution'')) p
                    ON p.pid = project_id
                    LEFT JOIN (SELECT resource_onepass_id, resource_name last_updated_by
                               FROM resources where resource_onepass_id is not null) last_updated_by
                    ON last_updated_by.resource_onepass_id = tbs_forecast_year.last_updated_by
                    LEFT JOIN tbs_teams ON tbs_teams.team_id = tbs_team_id
                    LEFT JOIN (SELECT resources.resource_id rid, resource_name from resources) resources
                    ON rid = resource_id
                    WHERE (jan > 0 OR feb > 0 OR mar > 0 OR apr > 0 OR may > 0 OR jun > 0 OR jul > 0 OR aug > 0 OR sep > 0 OR oct > 0 OR nov > 0 OR dec > 0)
                    AND forecast_type = ''Supply''
                    AND (project_id = '|| :F189_PROJECT_ID ||' OR 0 = '||:F189_PROJECT_ID ||')
                    AND (tbs_team_id IN (SELECT * FROM the(SELECT cast(vc2_list('|| :F189_TEAM_ID ||') as vc2_list_type) FROM dual))
                        OR 0 IN (SELECT * FROM the(SELECT cast(vc2_list('|| :F189_TEAM_ID ||') as vc2_list_type) FROM dual)))
                    AND (resource_id = '|| :F189_RESOURCE_ID ||' OR 0 = '||:F189_RESOURCE_ID ||')
                    AND (team_name like ''%'|| :F189_TEAM_NAME ||'%'' OR '' '' = '' '||:F189_TEAM_NAME ||''')
                    AND (area_id = '|| :F189_AREA_ID ||' OR 0 = '||:F189_AREA_ID ||')
                    AND NOT (0 = '||:F189_RESOURCE_ID ||' AND 0 = '||:F189_AREA_ID ||' AND 0 IN (SELECT * FROM the(SELECT cast(vc2_list('||:F189_TEAM_ID||') as vc2_list_type) from dual))
                    AND 0 = '||:F189_PROJECT_ID ||' AND '' '' like '' %'||:F189_TEAM_NAME ||'%'')
    Line 22 is calling a function to deal with a Multi-Select list that I found https://community.oracle.com/message/3566187#3566187. I've created the TYPE and the function as indicated in that thread. The error is thrown when multiple Team's are selected.
    The exact error is: create_collection_from_query_b Error:ORA-20104: create_collection_from_query ParseErr:ORA-00907: missing right parenthesis
    There are going to be 4 multi-select lists and TEAM_ID is the first.
    :F189_TEAM_ID is an application item that is being populated from a page process.
    If you have a better solution for dealing with Multi-Select lists I would be very interested in hearing it.
    I've tried the replace and the instr methods with no success. Once the Collection is working then I have to modify the query for the page which is using the APEX_ITEM API's, but I haven't gotten this working yet.
    Thanks Tony!
    Joe

Maybe you are looking for

  • Finder doesn't show file saved in certain folder

    Something very strange is happening to my mac. In my Documents folder there is a folder named "CV". Whenever I try to save files to this destination (CV), these files won't show (at least immediately --- let's say in the next minutes) in the folder.

  • JavaFX - problem with civil library (FMJ)

    Hi, I'm using the library com.lti.civil (from FMJ) for a desktop application that uses video capture. At integration with JavaFX it gives me an error: com.lti.civil.CaptureException: java.lang.UnsatisfiedLinkError: no civil in java.library.path at co

  • How to add a field in already extracted Table

    Hi , Requirement is to add a new field in VBAK Table ( incoterms). VBAK has alredy extracted in HANA with few selected fields. Please suggest

  • Using term set as refiner in content search web part does not show all used terms

    When you create a terms set (12 terms with +/- 10-20 child terms) , attach it to a site column and allow multiple values to be selected the search service does not find all used values in the REFINERS tab of the content search web part. Example: Fiel

  • Can't burn or read CD-R

    All of a sudden after a year or so. My iMac can't burn CDs from my iTunes library and can't see anyones I want to download