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

Similar Messages

  • 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

  • Query to get the data of all the columns in a table except any one column

    Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
    For Example:
    Let us consider the EMP table.,
    From this table except the column comm all the remaining columns of the table should be listed
    For this we can write a query like this..
    Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
    Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
    As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
    but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
    Is there any other way of writing the query to get the required result..?
    Thanks..

    Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
    If you really need to list all the columns for a table because you don't want to type them, just use something like...
    SQL> ed
    Wrote file afiedt.buf
      1  select trim(',' from sys_connect_by_path(column_name,',')) as columns
      2  from (select column_name, row_number() over (order by column_id) as column_id
      3        from user_tab_cols
      4        where column_name not in ('COMM')
      5        and   table_name = 'EMP'
      6       )
      7  where connect_by_isleaf = 1
      8  connect by column_id = prior column_id + 1
      9* start with column_id = 1
    SQL> /
    COLUMNS
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
    SQL>

  • How to query a distant database without using db link in pl/sql

    Hi
    I have two different distantly located databases say d1,d2
    There is a table dept which had deptno (primary key),department name as columns .
    I need to query database d2 on the basis of the deptno present in database d1.
    In database d2 , there are some tables which have columns as deptno.
    I cannot use DB link .
    Is there any other method that I can use from Pl/sql ?
    Is it possible thru XML ?
    PLs let me know in details .
    regards
    SHUBH

    You need to have an Oracle Apache Server installed. It can be on any platform that has connectivity to the Oracle Server. Preferably on the same server as Oracle itself.
    The Apache Server is installed in its ORACLE_HOME/Apache/Apache. It should have been configured by the installer. All you need to do is to create a DaD (Database Access Descriptor) for MOD_PLSQL. This is a custom Apache Module that provides direct access to PL/SQL via OCI. DaDs are defined in the ORACLE_HOME/Apache/modplsql/conf directory. There are README files, sample files and a dads.conf file in which you need to define a URL to assign as the service for your database, the Oracle username and password to use to logon, and the database connection details (e.g. TNS alias).
    The Apache Server needs to be restarted for the changes to take effect (using either opmnctl or apachectl).
    Let's say the URL path defined is /mydatabase. When Apache receives a URL that starts with /mydatabase, it passes it to MOD_PLSQL. MOD_PLSQL looks in the dads.conf for the database to connect to. The rest of the URL contains the PL/SQL package or function to call, e.g.
    /mydocuments/scott.p123.procABC&emp_id=123
    Where procedure procABC is called in packahe p123 in the Scott Schema. The variable EMP_ID is passed with value 123. Thus the procABC definition will look as follows in the package:
    procedure procABC( emp_id number ) is
    begin
      .. code..
    end.;This proc can write HTML data - i.e. dynamically create a HTML response page. Or it can create an image or any other Mime type that the browser can handle.
    Oracle provides a bunch of PL/SQL packages for that. E.g. HTP and OWA packages.
    This in a nutshell is how MOD_PLSQL is used to allow a web browser URL to be passed directly to a PL/SQL procedure.
    The details are under Oracle Application Server PL/SQL (http://download-west.oracle.com/docs/cd/B14099_12/web.htm). Two manuals are applicable:
    * mod_plsql User's Guide
    * Web Toolkit Reference
    It is not complex to use. In fact, the easiest to get all this going is to install HTMLDB 2. Download the Oracle 10G Companion CD for your platform (even if you're running 9.2). Install HTMLDB (this will be in a seperate ORACLE_HOME and will not touch your existing Oracle installation). This will install the latest Apache and MOD_PLSQL software from Oracle. Also HTMLDB is built entirely on MOD_PLSQL and with PL/SQL procedures - and serves as Microsof Access type web interface for developing and deploying web applications on Oracle using PL/SQL. Very powerful and flexible and very easy to use.

  • 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 last N used partitions.

    Hi,
    I have a day based partitioned table TAB1.
    Let say for month Aug 2013 Partitons are like P010813,P020813,P030813 up to P310813.
    When gather stats job will run i want to analyze only the last 3 used partitions based on current date, this would be P180813,P190813,P200813.
    Please help me to write a query which will give the last 3 used partitions.
    eg.
    If run query on 20-AUG-2013.
    P180813
    P190813
    P200813
    FOR 25-AUG-2013
    P230813
    P240813
    P250813
    Thanks

    first about query : here is example
    with t(a) as (
    select 'P170813' from dual union all
    select 'P180813' from dual union all
    select 'P190813' from dual union all
    select 'P200813' from dual union all
    select 'P210813' from dual union all
    select 'P220813' from dual union all
    select 'P230813' from dual union all
    select 'P240813' from dual union all
    select 'P250813' from dual union all
    select 'P260813' from dual union all
    select 'P270813' from dual union all
    select 'P280813' from dual union all
    select 'P290813' from dual union all
    select 'P300813' from dual union all
    select 'P310813' from dual )
    select * from(
    select a, row_number() over(order by a desc) rn
      from t
    where to_date((replace(a, 'P', '')),'ddmmyy') <= trunc(sysdate)
    ) q
    where q.rn <= 3
    but i think you don't need query and etc. read documentation about DBMS_STATS.SET_SCHEMA_PREFS  and look at parameters INCREMENTAL, STALE_PERCENT
    Ramin Hashimzade

  • Query to get details of blocking and deadloack recorded in a table

    Hi,
        whenever any blocking or deadlock occur in the server i have to record that information in a table with the query which is causing the locks with the login name.. Any query for this?

    Blocking
    For example, a 200-second blocked process threshold can
     be configured in SQL Server Management Studio as follows:
    1.
     Execute Sp_configure ‘blocked process threshold’, 200  
    2.
     RECONFIGURE WITH OVERRIDE;
    Once the blocked process threshold is established, the next step is 
    to capture the trace event. The trace events of blocking events that 
    exceed the user configured threshold can be captured with SQL Trace or Profiler. 
    3.
     If using SQL Trace, use sp_trace_setevent and event_id=137. 
    4.
     If using SQL Server Profiler, select the Blocked Process Report event 
    class (under the Errors and Warnings object).
    Blocking per object with sys.dm_db_index_operational_stats
    The new SQL Server 2005 DMV Sys.dm_db_index_operational_stats 
    select top 10 * 
    from sys.dm_os_wait_stats  
    order by wait_time_ms desc
    Deadlocks
    Prerequisites : Please note that you must have Database Mail configured, 
    SQL Server Agent must have the correct Alert System Configurations set to utilize this method and 
    Traceflag 1222 must be on (DBCC TRACEON(1222, -1).
    To make this work, first you will need to create the stored procedure that performs 
    several steps, which are outlined below. Run this script to create the stored procedure:
    CREATE PROC dbo.usp_DeadlockNotification
    AS
    DECLARE @NumOfDeadLocks int
    SELECT @NumOfDeadLocks = SUM(cntr_value)
    FROM sys.dm_os_performance_counters 
    WHERE counter_name like '%dead%'
    SET NOCOUNT ON
    IF(@NumOfDeadLocks > 0)
    BEGIN
      EXEC msdb.dbo.sp_send_dbmail
     @profile_name = 'SQLTestCluster',
     @recipients = '[email protected]',
     @subject = 'Deadlocks',
     @body = 'Please check errorlog for Deadlocks'
    END
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Connecting to remote database without using db links

    Referred Thread:
    Re: Remote DB connection without DB link
    In reference to the thread above, my question goes like this:
    Let's say I want to run a query from a database and use data from another database. I have the user, password, SID and port number of the other database but do not want to create a separate connection using sqlplus or connect commands.
    Something like this:
    SQL> show user
    USER is "A"
    SQL> select a.col1, b.col2 from tab1 a, tab2@????? where <some condition>;
    Can this connection be done on the fly ?? I agree that a DB link will do the trick, but let's say I am not supposed to create objects on the other database.

    You need two sets of privs on the remote database to view data in that database schema:
    - create session (the schema must allow client connections to create schema sessions)
    - select on other schema tables whose contents to view
    You need a single priv on the local database, to connect to that remote schema on the other database:
    - create database link
    You also need the following in order to create the db link:
    - the remote schema name and password
    - IP address or hostname of the remote db server
    - the remote Listener's tcp endpoint port
    - the name of the remote database (SID, instance or service name)
    If you do not have these privs, you cannot use/access the remote database from the local database session via a database link.
    Other alternative methods needs additional privileges and objects on both the remote and local database sides - and are more complex (e.g. using web services, using web-enabled procedures, etc).

  • Getting socket error while trying to get oracle connection using JDBC

    hi,
    I am getting following socket read error while trying to get database connection using JDBC. This happening with jdk1.5.0_12 version with Oracle 9i
    following is the stacktrace...
    Thread t@92: (state = IN_NATIVE)
    - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
    - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 (Compiled frame)
    - oracle.net.ns.Packet.receive() @bci=31 (Compiled frame)
    - oracle.net.ns.DataPacket.receive() @bci=1 (Interpreted frame)
    - oracle.net.ns.NetInputStream.getNextPacket() @bci=48 (Compiled frame)
    - oracle.jdbc.driver.T4CMAREngine.unmarshalSB1() @bci=1, line=1070 (Compiled frame)
    - oracle.jdbc.driver.T4CStatement.doOall8(boolean, boolean, boolean, boolean) @bci=617, line=207 (Compiled frame)
    - oracle.jdbc.driver.T4CStatement.executeForDescribe() @bci=39, line=790 (Compiled frame)
    - oracle.jdbc.driver.OracleStatement.executeMaybeDescribe() @bci=106, line=1039 (Interpreted frame)
    - oracle.jdbc.driver.T4CStatement.executeMaybeDescribe() @bci=11, line=830 (Interpreted frame)
    - oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout() @bci=128, line=1132 (Interpreted frame)
    - oracle.jdbc.driver.OracleStatement.executeQuery(java.lang.String) @bci=76, line=1272 (Interpreted frame)
    any help would appreciated. thanks in advance

    I do not have exact exception message.
    additionally, i have got following the tomcat log file:
    INFO - Resource pool cleanup thread just woke up.
    Nov 1, 2008 3:41:52 AM org.apache.tomcat.util.threads.ThreadPool logFull
    SEVERE: All threads (100) are currently busy, waiting. Increase maxThreads (100) or check the servlet status
    INFO - Resource pool cleanup thread just woke up.
    thanks in advance

  • Want to get the where-used hitlist to an internal table

    hi everyone,
            while using where-used list we will get a hit list result. I want to take that hit list data to an internal table with out using any local file.
    Is anybody there to help me.
    regards,
    vijaya.

    Hi Lakshmikona,
    I had wrongly interpreted your question, as suggested by Thomas you can use RS_EU_CROSSREF to get the Where used list data in the internal table.
    Refer this SAP standard report RSHDCF00 for you detailed perusal.
    Regards
    Abhii
    Edited by: Abhii on Sep 3, 2010 12:08 PM

  • Fetching file size using CAML query in Javascript client object model

    Hi,
    I am using the Javascript client object model to retrieve contents of a document library.
    I have a document library, which contains a folder "Folder1" . "Folder1" has a zip file. I would like to get the file size of the zip file.
    I have tried the below code, but not sure, how to fetch the file size.
    function FetchImage() {
    var clientcontext = new SP.ClientContext.get_current();
    var oweb = clientcontext.get_web();
    var olibrary = oweb.get_lists().getByTitle(DocLibrary);
    var query = new SP.CamlQuery();
    query.set_folderServerRelativeUrl("Lists/DocLibrary/folder1/");
    folder = olibrary.getItems(query);
    clientcontext.load(folder, 'Include(Title,ContentType, FileLeafRef,FileDirRef,File)');
    clientcontext.executeQueryAsync(Function.createDelegate(this, this.RenderDataOnSuccess), Function.createDelegate(this, this.RenderDataOnFailure));
    function RenderDataOnSuccess() {
    var ListEnumerator = this.folder.getEnumerator();
    while (ListEnumerator.moveNext()) {
    var currentItem = ListEnumerator.get_current();
    if (_contentType.get_name() != "Folder") {
    var File = currentItem.get_file();
    if (File != null) {
    // Fetch file size
    How to fetch the file size?
    Thanks

    <script>
    function getSize()
            var myFSO = new ActiveXObject("Scripting.FileSystemObject");
            var filepath = document.upload.file.value;
            var thefile = myFSO.getFile(filepath);
            var size = thefile.size;
            alert(size + " bytes");
    </script>
    http://social.msdn.microsoft.com/Forums/en-US/e5d2ff3d-01c7-4cc0-a081-29a4dfbb0fad/getting-the-sharepoint-list-attachment-size-using-javascript?forum=sharepointcustomizationlegacy

  • Get Sitecollection and Sub Sites Data Base Size Using PowerShell

    Hi All,
    Currently i am getting the Site collection database size using this powershell
    $SiteCollurl = @{Expression={$_.url};Label="Site Collection URL"}
    $size = @{Expression={[math]::round($_.diskused/1MB, 2)};label="DB Size in MB"}
    $HTML = Get-SPSiteAdministration -Limit All | select $SiteCollurl, $size
    So in this $HTML i am getting all the Site Collection Url's and DB size for each site collection.
    Now i want to get the Sub Sites url and Sub Sites Database size also.
    I tried like this  "$HTML = Get-SPSiteAdministration -Limit All | | Get-SPSite -Limit All | Get-SPWeb -Limit All  | select $SiteCollurl, $size"
    I am getting all the sub site url's but Database size i am getting 0 for all sites and sub sites.
    Can any one help on this.how to get the database size for all site collection's and sub sites.
    Regards,
    Phani.
    Rhys W Edwards Where are you :)

    Hi
    Please try the script below:
    Get-SPSite -Limit ALL | ForEach {
    $_ | Get-SPSiteAdministration | Select $SiteCollurl, $size}
    I hope this helps.

  • Exporting to PDF - How Can I Get A Small File Size When Using Lots of Vector Art?

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

  • Database is using too much size of the disk

    Hi all,
    I am using Oracle AS 10g and ITs database is using too much size of the disk. Because there is no space on the disk. Can anyone help me out to resolve this problem.
    Saqib

    Be sure you have enought disk space before installing (see install guide). Add disk space if you need more.

  • HT1430 My iPhone display sometimes getting bigger than normal size. So big sometimes  that I can't use it and I must turn it off. Anyone know what happened ?

    My iPhone display sometimes getting bigger than normal size. So big sometimes  that I can't use it and I must turn it off. Anyone know what happened ?

    You most likely have zoom on. Double tap with THREE fingers to turn zoom off, if it is on, then: Settings>General>Accessibility...turn it off for good.

Maybe you are looking for