Shrinking Data File

Mar 7, 2011

Version: 11.1.0.7
RAC: 6 node

1) We have a 4TB database and using BIG FILE datafiles for all the datafiles(DATA,INDEX,UNDO and TEMP).

Few tables have grown extremely to consumed entries ASM disks. we have purged its data. so the the data file have the free space. However the data have another tables' LOB segment at the end of the datafile. so we could not shrik the data file.

we could do data pump export/import or moving the different tablespace. But we do not have ASM space. 11g Tablespace re-organization also require additional space(beleive equal amount of tablespace)

Is there any way to shink the data file?

2) let us assume my datafile is 190G and it has 80 free space with in the datafile and my ASM diskgroup size is 200G(4x50GB).

If I drop 1 ASM disk from my diskgroup, will it shrink the datafile becuase it has only free space ?

3) we are having TDE license...But not advanced compression...can we do segment movement with table compression?

View 6 Replies


ADVERTISEMENT

COALESCE Or Shrinking Datafile?

Sep 6, 2010

We have quarterly and yearly processes that deletes and updates data for millions of rows crossing different tables. To make room on the file system I would either like to remove empty datafiles (my preference) or coalesce TS to compact the data than remove the empty datafile.

Having said that, any query that can show me if a datafile has any data in it or a query that can show me whether a TS is a good candidate to be coalesced maybe a query with something displaying a percentage as to free and used extents and a YES/NO column whether to be coalesced or not.

View 3 Replies View Related

Server Administration :: Command To Determine Which Table Can Benefit From Shrinking

Apr 14, 2010

I use following command to determine which table can benefit from shrinking

select * from
table(dbms_space.asa_recommendations('FALSE', 'FALSE', 'FALSE'))
order by reclaimable_space desc

then i give following command to get reclaimable space

alter table t1 enable row movement ;
alter table t1 shrink space cascade;
alter table t1 disable row movement ;

in table t1 427MB was shown as reclaimable space, after executing above commands, i run dbms_space procedure again to check the out come, but result was same.I understand tablespaces are by default ASSM in 11g, none of table has LONG datatype or LOB indexes or MVIEW with ON COMMIT.

View 2 Replies View Related

Server Administration :: ORA-01111 / Name For Data File 636 Is Unknown - Rename To Correct File

Nov 3, 2012

i have two tablespaces dictionary managed (SYSTEM,APPLSYSX) i tried to change to locally cause it will cause problem in future when trying to run OATM migration.i did it successfully on APPLSYSX,when i did it on system upon oracle procedure.i have to change all tablespaces to read only when i did that with tablespace APPLSYSD(alter tablespace APPLSYSD read only) i received errors

SQL> alter tablespace APPLSYSD READ ONLY;
alter tablespace APPLSYSD READ ONLY
*
ERROR at line 1:
ORA-01230: cannot make read only - file 636 is offline
ORA-01111: name for data file 636 is unknown - rename to correct file
ORA-01110: data file 636: '/vol5u/oracle/prddb/9.2.0/dbs/MISSING00636'
i have not this file on the OS

View 1 Replies View Related

SQL & PL/SQL :: Combining Rows In Data File Based On Values In Control File?

Aug 29, 2013

I have to load data file into a table. And the requirement is as below:

Input Data:

1234|20130815|20130822|This is a test, this is the the part
3456|20130823|20130809|This is a test
3456|20130823|20130809|This is a test
3456|20130823|20130809|This is a test
3456|20130823|20130809|Siva 1234

The data should be inserted only in two rows as below:

When Value in first 3 fields is same, 4th field should be appended to the existing value in table.

1234|20130815|20130822|This is a test, this is the the part
3456|20130823|20130809|This is a testThis is a testThis is a testSiva 1234

View 3 Replies View Related

Data Guard :: Db-file Name Convert And Log-file?

May 25, 2012

How to understand the two parameters db_file_name_convert and log_file_name_convert,if there are missing in the parameter file of standdy database,how does oracle will do?

View 3 Replies View Related

Data Guard :: Changing Dbname / Sid / Data / Control File Locations?

Nov 5, 2010

I want to change dbname,sid,data/control file locations in operational dataguard setup i plan to follow as below

1)shutdown primary and standby (stop managed recovery)

2)change db name in init.ora of primary and standby change database name control file location

3)create control file for primary from trace(script) make changes for db name and file locations

4)mount and open primary database

5)create standby control file

6) transfer standby control file to standby

7) mount stand by database and start manage recovery

If this steps will error free do i need to follow any thing additional to this or what is other best way for this or its not possible at all

View 1 Replies View Related

Data Guard :: ORA-01157 / Cannot Identify / Lock Data File 1

Jul 23, 2010

i did everything writen but when i do *SQL>alter database recover managed standby database disconnect from session;*

i go and look in the standby database AlertLog file ,and thats whats writen

*ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'F:ORACLEPRODUCT10.2.0ORADATADBSYSTEM01.DBF'
ORA-27041: unable to open file
OSD-04002: غير قادر على فتح الملف
O/S-Error: (OS 3) The system cannot find the path specified.

[code]....

strange thing that it realises the primary database in drive F and it goes to it but i dont understand what could be the reason of this ,although im doing this command while primary database is shutdown!

View 2 Replies View Related

SQL & PL/SQL :: File Data Versus Table Data Comparison

Jun 21, 2010

I have written a java code which reads 2 millions of data under a particular column from CSV file and store it into a set. Now there is a table in Oracle database which contains 10 millions of records for that particular column. Now, I want to form a SQL query which select those records under that particular column from the database table which is in CSV file but not in database table. For e.g.

If I consider the CSV file name as employee.csv and it has column called employee_name under which the records are as follows

employee_name
---------------------
Sudip
Kaushik
Joyanta
Soumya
Ritesh
Gautam

And the database table name called cmp_employee and it has column called employee_name under which the records are as follows

employee_name
--------------------
Sudip
Kaushik
Joyanta
Soumen
Souvik
Sahoo

Now, the "SQL Query" should return ---- "Soumya, Ritesh, Gautam" this three names.

View 2 Replies View Related

SQL & PL/SQL :: Table Data Into A File

Apr 16, 2013

I have a table for which I need to take the data backup into a file. I have oracle installed in Unix box. I have tried spooling in form of insert statements, but its taking time as the table size is huge.

suggest an approach to pump data into file, which can be inserted to a new table in same or different schema.

View 1 Replies View Related

SQL & PL/SQL :: Load Data To File?

May 24, 2012

I have a table in oracle and i want to load data to flat file which is present on the server. how to and where to provide the destination file location to load the flat file.

Can it be also provided in the plsql program.

View 6 Replies View Related

Importing Data From XLS File

Oct 24, 2012

I need to import some data from an Excel file, but I don't know how.

View 14 Replies View Related

SQL & PL/SQL :: How To Insert Data From XML File To Table

Jul 2, 2010

use XML package & UTL_FILE package & i had install the software Oracle Database 10g Express Edition, Oracle Client 10g Express Edition & Oracle SQL Developer

I have tried different methods as mentioned below:

XML File : trailxml.xml stored in C:OracleProject

<?xml version = '1.0'?>
<metadata>
<Zipcodes>

[Code].....

View 21 Replies View Related

SQL & PL/SQL :: Export GB Data In Flat File

Nov 25, 2011

Database: Oracle 8i

My query is:

I have large data in the one table(approx. 2GB and above). I want to load the data in one flat file.

When i use spool - it is loading half data and remaining it is corrupting. In UNIX, i kept .sql file and with that i am exporting in .dat file. How to export the large data into flat file(.dat). is there any way to load command which wil be used in UNIX.

View 8 Replies View Related

XML DB :: Parse XML File And Extract Data

Jul 22, 2013

I'd like to parse an XML file and get some data extracted as columns. Input file country.xml:

<?xml version="1.0" encoding="UTF-8"?>
<MAS Action="Insert">
<Country ObjectId="100000000000000009" VersionId="8"><Id>1</Id><NlTexts><Name Language="de">Land1</Name><Name Language="en">Country1</Name></NlTexts></Country>

[Code]....

View 2 Replies View Related

PL/SQL :: Load Data Into A Table From LDR File?

Aug 6, 2012

how can I load data into a table from *.ldr* file? How exactly I can use such files to run in loader?

View 16 Replies View Related

SQL & PL/SQL :: Extracting Data From XML File - Not Working?

Oct 4, 2012

I need to extract the values from XML file.I tried with method described in below links -

[URLs]....

My XML file is -

<?xml version="1.0" ?>
<!DOCTYPE main [
<!ELEMENT main (DATA_RECORD*)>
<!ELEMENT DATA_RECORD (STATE_CODE?,JOB_NAME?,WC_CODE?,JOB_ID?,STATUS?,LOG_MESSAGE?)+>
<!ELEMENT STATE_CODE (#PCDATA)>

[code]...

The query is not returning any rows.

View 3 Replies View Related

Exporting Data Objects Into SQL File Using Exp (export)?

Oct 31, 2012

I need to take only backup of schema objects with out data using exp (export) into .sql file and need to run that .sql file in the target.because I dont have exp/imp privs on target database.

NOTE: using only export (exp) not data pump.

View 1 Replies View Related

Import Data From Dmp File Using Command IMPDP?

May 2, 2011

I am trying to import data from a dmp file using the command IMPDP Here is the command :

impdp
USERID= core_edb_20112_ct/local
DIRECTORY=dir_core20112
DUMPFILE=CORE_EDB_20112_CT_20110426.DMP
LOGFILE=log_core02112_1.log
SCHEMAS=core_edb_20112_ct
REMAP_SCHEMA=core_edb_20112_ct:core_edb_20112_ct
PARALLEL=4
METRICS=Y TRANSFORM=OID:N
TRANSFORM=SEGMENT_ATTRIBUTES:N
REMAP_TABLESPACE=C64_EDB_TS:C64_EDB_TS

I am trying to import data in the following user : core_edb_20112_ct/local
This user is already created , using the tablespace named C64_EDB_TS
The dmp file resides in the location dir_core20112 ( e:\oracle)

I am getting the following error while i try to import

Import: Release 11.2.0.1.0 - Production on Mon May 2 12:47:54 2011

Copyright © 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-31694: master table "CORE_EDB_20112_CT"."SYS_IMPORT_FULL_01" failed to load/
unload
ORA-02354: error in exporting/importing data
ORA-02368: the following file is not valid for this load operation
ORA-02369: internal number in header in file e:\oracle\core_edb_20112_ct_20110426.dmp is not valid.

The DMP is copied from a different network location into the local drive where the command is running.

View 1 Replies View Related

ORA-01157 - Identify / Lock Data File 255?

Aug 30, 2010

I'm using SAP ECC6.0, Oracle 10G, HPUX B11.23.Recently I had performed database restoration from my backup tape. However, during the process of bringing up the Oracle and SAP database, I observed that there could be some archive logs went missing. I had tried to check them from my backup tape, but could not find it.

In short, now my SAP database is up and running, but I'm having another problem when I executed a "CheckDB" job in DB13. The job is unable to complete successfully

DB13 job log:
30.08.2010 19:44:40 Job started
30.08.2010 19:44:40 Step 001 started (program RSDBAJOB, variant &0000000000061, user ID BASIS)
30.08.2010 19:44:40 Execute logical command BRCONNECT On host drqaecc
30.08.2010 19:44:40 Parameters: -u / -jid CHECK20100830194440 -c -f check

[code]...

View 6 Replies View Related

Unable To Load Data In Oracle 11g From XLS File?

Sep 6, 2011

CASE 1:

when i tried to load the data i got the below error,

Error starting at line 2 in command:
INSERT INTO RECON_MATCHED_DETAILS (RECON_MATCHED_DETAIL_OID, RECON_ID, STATEMENT_DATE, EXECUTION_DATE, TRANSACTION_NUMBER, TRANSACTION_DATE, TRADE_ID, TRANSACTION_TYPE, LINK_ID, ITEM_TYPE, ASSET_CODE, ISIN, BUYSELL_INDICATOR, SETTLEMENT_DATE, CURRENCY, QUANTITY, VALUE,

[code]...

CASE 2:

i tried to load the data in oracle 11g but i'm unable to load the data,and for testing i tried with a single row of data.but surprisingly the table filled with (null)s

View 3 Replies View Related

Renaming Or Relocating System Data File

Aug 30, 2012

How can we Rename or Relocate the SYSTEM datafile?

View 3 Replies View Related

Getting Error To Reduce Data File Size

Sep 1, 2010

I am getting the following error when i try to re size the data file.But the data file is having lot of free space.

ORA-03297: file contains used data beyond requested RESIZE value

Presently table space size is 220GB with 8 data files.As the process of the performance tuning we moved data to different table spaces.Now used space of the tablespace is 90GB.So I am trying to resize the datafile but it throw an error.

View 1 Replies View Related

SQL & PL/SQL :: Copy Bulk Data In Text File?

Oct 9, 2013

i want table data exported to txt file, data is around 3200000,

View 14 Replies View Related

SQL & PL/SQL :: Export Data File Using Dynamic SQL And Header?

May 23, 2010

I have a set of store procedures that will construct the header and data dynamically. This procedure will return a CURSOR.Now, I will write a new procedure to export data file by calling the above store procedure.

a) is it possible for me to retain the dynamic header when I export the data out ?

b) use 1 export data file procedure to handle it without coding for each data file I want to export.

I have been testing manually creating the header. I am assigning the header string myself.

UTL_FILE.PUTF(fHandler, header_string);

and then use a cursor to loop through the data for each store procedure.

UTL_FILE.PUTF(fHandler, record_string);

View 4 Replies View Related

Forms :: How To Export Data In 10g To Excel File

Mar 15, 2011

I need the code to export the data from the form to the excel directly.

View 1 Replies View Related

SQL & PL/SQL :: Empty Text File With Data In UNIX

Apr 14, 2010

I have text file with data in UNIX. I want to clear only records(make empty the file) using UTL_FILE..

I know we can remove the text file from UNIX and create file again with same name...

Is there any other way??

View 5 Replies View Related

SQL & PL/SQL :: Spooling Data In Pipe Delimited File

Feb 15, 2010

I am trying to Spool the data in pipe delimitted csv file but some of the records going on another line from the same records. Currently some of the data going to next line as below oulined in the 2nd and 3rd line (in bold - |Home & Family) . I have following sql setting in my spool file:

set linesize 4000 pagesize 0 trimspool on feedback off verify off echo off
set define off
spool Stk_hold_Sec_Tsk.csv

I tried increase linesize to 5000 but its not working.
Ex.

PSS:Production Manager|ZS:PsS:PP:PROD_TCODES|P2S: PP - Production Transactions|House & street
PSS:Production Manager|ZC:BW:PsS_RPT_MGR|BW PsS Reports Manager
[b]|House & street[/b]

PsS:Production Manager|ZC:BW:PsS_RPT_USER|BW PsS Reports User
[b]|House & street[/b]

PsS:Master Data (PDMs)|ZS:GEN:GENERAL_USER|GEN: General User|House & street

Data should be like into the file:

PSS:Production Manager|ZS:PsS:PP:PROD_TCODES|P2S: PP - Production Transactions|House & street
PSS:Production Manager|ZC:BW:PsS_RPT_MGR|BW PsS Reports Manager|House & street
PsS:Production Manager|ZC:BW:PsS_RPT_USER|BW PsS Reports User|House & street
PsS:Master Data (PDMs)|ZS:GEN:GENERAL_USER|GEN: General User|House & street

I think it should be something with linesize or pagesize but not sure

View 18 Replies View Related

Receiving Data From Upstream Through Text File

Feb 9, 2011

We are receiving data from our upstream through text file, they are extracting that text file from their oracle table.In the table in ename colmn some names are having the special character like

Chng
OReilly

We are loading the data from that text file into our oracle tables and the names are loading as it is.Now we are extracting data as text file from our tables which is loaded from or upstream,then the special character is changing as the names are changing as Chng OReilly. We are loading the data from the text file into our tables and the names are loading as

Chng OReilly and i tried to replace the special character with while loading but it is loading as .If I try to change the character with '(Apostrophe) while loading it is changing.

The data type of the column is VARCHAR2(20)

NLS_CHARACTERSET is UTF8

Version Oracle 9i

View 6 Replies View Related

JDeveloper, Java & XML :: How To Extract Data Using XSD File

Feb 9, 2012

How to extract the data from XML using the xsd file. attached files.

Explanation: first check the EmailMessage tage from order_conf.xml compared with Email.xml(<xsd:element name="EmailMessage">) if exists then go to next node.
EmailMessage(exists tag in order xml file)
->next <ns1:emailNotificationype> this tag should be follow under the EmailMessage tag(<xsd:element ref="emailNotificationype">) in Email.xml
->next <ns1:orderNotification> -> check this tag in <xsd:element name="orderNotification"> in Email.xml.
-> next <ns1:templateFormatInfo> -> it should follow under <xsd:element name="orderNotification"> in Email.xml.
-> next <ns1:templateFormatInfo> -> it should follow these tages <xsd:element name="templateFormatInfo"> <xsd:element ref="templatecode"/>
<xsd:element ref="templateversion"/>

i have to extract the value in between tags.

templatecode -> ORDCONF
templateversion ->1.0

Finally i have to load the data into table.

View 17 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved