PL/SQL :: Find Space Before Bbbbb And Display Up To Aaaaa
Oct 15, 2013
my query is like below. select SUBSTRING('one thousand one hundread one reuppee only asasasas aaaaa bbbbb',1,60) and my output of above query is below..'one thousand one hundread one reuppee only asasasas aaaaa bb' but i want display only up to 'one thousand one hundread one reuppee only asasasas aaaaa'because my bbbbb it not complete so i want to find the space before 'bbbbb' and diplay up to 'aaaaa'
I am trying to find the space occupied on disk by the tablespaces of the database that contain tables, some (and not all) of whose columns are encrypted. My query is like this:
select distinct a.tablespace_name, file_name, bytes /(1024*1024*1024) File_Size_In_GB from dba_data_files a, dba_tables b, (select distinct owner, table_name from DBA_ENCRYPTED_COLUMNS) c where a.tablespace_name = b.tablespace_name and b.owner = c.owner and b.table_name = c.table_name order by a.tablespace_name;
The output of the query is as shown in the attached file:
Since the output (under the heading Total Size of the tablespace) is probably the sum of all the datafiles returned by the query and is obviously incorrect, I have not given the rest of it. I also tried the following:
select distinct a.tablespace_name, file_name, bytes /(1024*1024*1024) File_Size_In_GB, sum (bytes/(1024*1024*1024))over (partition by a.tablespace_name order by file_name) "Total Size of the tablespace" from dba_data_files a, dba_tables b, (select distinct owner, table_name from DBA_ENCRYPTED_COLUMNS) c where a.tablespace_name = b.tablespace_name and b.owner = c.owner and b.table_name = c.table_name order by a.tablespace_name ; [code]...
Here, the fig. under the heading "Total Size of the tablespace" are probably the sum of all the records returned by the query if distinct is not used i.e all the data file sizes returned by the query.
tune my query and get the desired results? I think this can be achieved by group by with rollup, cube, order by and grouping functions, but am not sure how to proceed. I know that I can get the results by using Enterprise Mgr. Console in 2 mins., but would still like to get the results with the queries.
Sysaux Tablespace is running low. WE SET AWR RETENTION TIME=60 DAYS. WE ARE NOT INTEREST TO EXTEND SYSAUX TABLESPACE SIZE. Usually we take AWR weekly once. Some times we did ADDM report and ASH.
CODEsql>select TABLESPACE_NAME, FILE_NAME, BYTES/(1024*1024), AUTOEXTENSIBLE, MAXBYTES/(1024*1024) from dba_data_files where tablespace_name = 'SYSAUX';
1. What's the best SOLUTION ? 2. Can i shrink sysaux tablespace ? 3. I think , The size for all occupants in sysaux tablespace is less than 200 MB => how to find actual content of sysaux tablespace ? 4. What could be the reason for growth? Is there any way to free the space from sysaux table space?
i have data about 3 gb but my files in e:oraclexeapporacleoradataXE has grown to 16 gb
1)my e: drive has less space ,pls tel how can i fee some space and give it back to OS
2)is there any other place where i can free up some space from oracle and give it back to OS.
----------------------- windows (2008) --- Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production PL/SQL Release 11.2.0.2.0 - Production "CORE 11.2.0.2.0 Production" TNS for 32-bit Windows: Version 11.2.0.2.0 - Production (2008) NLSRTL Version 11.2.0.2.0 - Production
I got the error ORA-01653: unable to extend table <OWNER.TABLE_NAME> by <BYTE> in tablespace <TABLESPACE> in my production database. But I could see 4GB of free space available in the tablespace. But this was resolved after increasing the Tablespace size by 1 more GB. So I wanted to know how I can I reclaim the 4GB space ?
While searching in internet I got few tips like there will be a fragmentation in the tablespace, the free space available in the tablespace may not be a continuous block. To avoid this we need to reorganize the tables using ALTER TABLE <TABLE_NAME> MOVE <TABLESPACE>; command.
But in my tablespace there are huge number of tables exists I cannot do reorganization of all the tables. So I need to know how to identify particularly what are the tables has more fragmentation? so that I can go for reorganizing those tables only.
My Database version in 9.2.0.7 Tablespaces are Locally Managed
explain the difference in numbers between the queries? I am acutally more concerned about the ETM_XML clob since the descrepancy appears to be bigger.
SELECT table_name, column_name, segment_name, a.bytes FROM dba_segments a JOIN dba_lobs b USING (owner, segment_name) WHERE b.table_name = 'ETM_RAW_XML';
I have a tablespace of size 512 GB. On the basis of tables and indexes created on it, the space consumed should be 319GB but when I am retrieving the free space size , I am getting only 124GB of free space. That means around 70GB of space is missing.
We are using oracle 10.2.0.3.0 version on HP-UX B.11.23 U ia64.
We are facing a lot of delay in TNS ping reply. It is taking 8000+ msec.
$ tnsping XXXXXX 20
TNS Ping Utility for HPUX: Version 10.2.0.3.0 - Production on 27-FEB-2013 12:37:15
Copyright (c) 1997, 2006, Oracle. All rights reserved.
Used parameter files: $ORACLE_HOME/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxx)(PORT = 1531))) (CONNECT_DATA = (SERVICE_NAME = xxxxxxx))) OK (1250 msec) OK (1150 msec) OK (860 msec) OK (860 msec) OK (790 msec) OK (810 msec) OK (790 msec) OK (570 msec) OK (650 msec) OK (630 msec) OK (790 msec) OK (1240 msec) OK (1090 msec) OK (1030 msec) OK (870 msec) OK (690 msec) OK (740 msec) OK (650 msec) OK (490 msec) OK (560 msec) $
i'm trying to read a text file into an oracel table. I'm having issues with this statement FIELDS TERMINATED BY ' ' fields are separated by 2 spaces. How ever Oracle is not recognizing ' ' or " " as double space. It is treating as one space thus shifting all coulmns.
how to check the maximum space ever used for TEMP. I want to know it because I need to resize the TEMP and I want to know how small it can be. As I can see from a documentation hURL....max_size is max number of extens ever used in a segment
I could multiply max_size by extent_size and it would give me the max size of temp ever used
SQL> select segment_file, extent_size, max_size from v$sort_segment;
I need to monitor the Database daily, so i need to check whether the size of the DB is increasing @ a slow rate or rather than that. I need to do it in RAC & NON-RAC.
lv_ret := WEBUTIL_FILE_TRANSFER.AS_To_Client_with_progress(lv_clnt_file, lv_srvr_file, 'Download from Application Server in progress', 'Please wait');
to download a file to my H: drive.Here lv_ret is a boolean variable.The file is not downloaded to my H drive when there is no enough space.How to capture that error?
I am having an issue with the LOBs in our Database. Our production DB is about 71G right now - if i do export/import using the DataPump - I see the data volume becomes 40G. I am sure its because of the LOBs in my Database. Our application uses lots of LOB datatype and I think the space is not being released.
The challenge is I cant do a full export/import in my Production DB as its a 24/7 system and to do export/import I need min. 5 hrs - which my business will not permit. I can I claim the unused space here. I have used Segment Advisor - but it has only given me 6G of space gain.
Is there any script I can try to use to reclaim space in the database.
CODECREATE TABLESPACE my_ts DATAFILE 'C:\Oracle\oradata\db\my_ts.dbf' SIZE 5M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K; ALTER DATABASE DATAFILE 'C:\Oracle\oradata\db\my_ts.dbf' AUTOEXTEND ON;
Its was sucessfully created and my_ts.dbf file has 5MB
charging with data...
CODEcreate table big_table tablespace my_ts as select * from dba_objects; select * from big_table; begin for i in 1..10 loop insert into big_table select * from dba_objects; end loop; end;
Now the my_ts.dbf file has 90MB
Now I want drop this table: CODEdrop table big_table purge;
And my tablespace file still has 90MB.
I already tried to restart the database but doesn't works...
In the table the names are having diffrent spaces for one name only one space between the words,for another name two spaces between words,for other names three spaces between the words.
I want to update with single space how can we that.
I am giving the data as follows.
CREATE TABLE student(sname VARCHAR2(30));
INSERT INTO student VALUES('PRAKASH BABU'); INSERT INTO student VALUES('RAJESH KUMAR'); INSERT INTO student VALUES('POORNA CHANDAR'); INSERT INTO student VALUES('ANIL RAJ'); INSERT INTO student VALUES('ABHI RAM KONA'); INSERT INTO student VALUES('SRI TEJA MEDI');
Like this the table contains millions of rows.
I want to update the names like this.
PRAKASH BABU RAJESH KUMAR POORNA CHANDAR ANIL RAJ ABHI RAM KONA SRI TEJA MEDI
I'm having a report deriving data from the database, words are written properly in the database, but in my report some words have space between the letters