Server Administration :: Writing Control File

Nov 25, 2011

I was doing some R&D on my test machine trying to understand how controlfile works. I started up my db and then deleted (renamed)the controlfiles at OS level. I was expecting the db to shutdown. But it dint. Moreover when i queried select name from v$controlfile; it was still reflecting the old controlfile names. To check if it was still functioning, i created a new tablespace with one file and it also got created without any error.

What i dint understand is how could the db still be running when the control file was'nt there and new tablespace and datafile get created? As i understand, whenever a new file is created, an entry is made in the control file. But when control file dint exist where was the data about new tablespace and datafile written?

View 5 Replies


Server Administration :: Create A New Control File?

Jul 12, 2012

I am trying to create a new controlfile. I used "alter database backup controlfile to trace;" and then I copied and pasted the contents of the trace file into the .sql file. My sql script is



Actually, the name of my database was 'STAR' and I changed it to "FIVESTAR" int this .sql script. Now when I run this script with SQL> @ <path of my sql script>, it gives me the following errors:

ERROR at line 1:
ORA-01504: database name 'FIVESTAR' does not match parameter db_name 'STAR'

View 2 Replies View Related

Server Administration :: How To Recreate Control File

Jun 12, 2012

I can not run the control file treace file,why?

[oracle@hxl oradata_bak]$ more run_sql.sql


View 12 Replies View Related

Server Administration :: Unable To Create Control File

Jun 3, 2010

I am not able to create control file from scrip . it showing following error

ORA-01081: cannot start already-running ORACLE - shut it down first
ERROR at line 19:
ORA-02236: invalid file name

View 4 Replies View Related

Server Administration :: What Is Control File Sequence Number

Jul 17, 2012

SQL> select checkpoint_change#,controlfile_change# from v$database;

------------------ -------------------
203454 204955

what's the difference between checkpoint_change# and controlfile_change#.
what's the checkpoint_change# use for ? does it use for recover ?
what's the controlfile_change# use for ?
when the controlfile_change# will be increase ?

SQL> select controlfile_sequence# from v$database;


Qs.) what is controlfile_sequence# ?

View 6 Replies View Related

Server Administration :: Maximum Size Of The Control File

Jan 5, 2012

What's the maximum size of the control file in one database ?

i calculated it according to the following steps:


The maximum number of the data block in one control file is 20000.

View 4 Replies View Related

Server Administration :: How Single Control File Enough To Have All Transaction SCN

Feb 5, 2011

1)How a single control file is enough to have all the transaction's SCN no for older transactions.

Eg - A transaction has the SCN 01 and after a month the new transaction's SCN is 502. Is the control file holding all those (01 to 502) SCN in it or just will have the latest SCN no (ie - 502).

View 2 Replies View Related

Server Administration :: Control File And Database Block Size?

Oct 24, 2011

SQL> select block_size from v$controlfile;


SQL> show parameter db_block_size;

------------------------------------ ----------- ------------------------------
db_block_size integer 8192

the 2 can have difference block size?

View 3 Replies View Related

Server Administration :: How Control File Is Corrupted And Database Not Open

Apr 27, 2011

I am using oracle 10g R2. Some how control file is corrupted and database is not open. and there is no backup of control file. Now i need to open the database without recreating the database.

View 5 Replies View Related

Server Utilities :: Where Clause In Control File

Oct 18, 2010

Is it possible to use where clause to discard one of the item which is not able to fit into column because of the length constraint.

1.Remove first digit from the item_ID where ITEM_ID IN (12345)
2.Do not load data WHERE ITEM_ID IN (12345)

View 7 Replies View Related

Server Utilities :: SQL Loader And Control File

Mar 19, 2010

I'm having a problem with SQL loader and the control file. I want to load a delimited file. The script will eventually be automated where the file name is passed in to the script, it's not a static name.

It's a simple SQL loader Unix script that I have created as follows

Unix file called test_load

# Auto Load
export data_file=/dev/test_$1$2.csv;
export ORACLE_HOME=/u01/oracle/product/10.2.0;

sqlldr userid=XXX/XXX data=$data_file

the top of my control file is as follows

load data
into table test
fields terminated by "|"
when record_type = 'AA'

running at the prompt ./test_load myload 20100319

The following error occurs

SQL*Loader-350: Syntax error at line 5.
Expecting "(", found keyword when.
when record_type = 'AA'

I believe the format of my control file is correct but for some reason it won't load.

View 10 Replies View Related

Server Utilities :: Number Sqlldr Control File?

Apr 24, 2012

I have a csv file extracted from mainframe which has to be loaded into oracle using sqlldr utility.The numbers are in the format +0000003333, -0000003232.44 etc

I have to convert it to 3333 and -3232.44 and insert into the table.

I have used syntax like

Load file....append into table (t_num expression "to_number(':tnum,'99999.999')")

This gives me an invalid number error.

View 3 Replies View Related

Server Utilities :: SQL Loader Control File Is Not Working

Jan 28, 2011

The reason "why sql loader's CONTROL FILE is not working, if that location has space in between"

E.g. - C:practice for sqlloadercontrol1.ctl

But it works if we remove the space in between the path as below:

E.g. - C:practice_for_sqlloadercontrol1.ctl

View 3 Replies View Related

Server Utilities :: Unable To Create Control File?

Mar 8, 2011

I tried a lot to load data to table from excel(.csv) using sql*loader the oracle version of sql*loader doesn't support the control file created using notepad(.ctl).Though i given a filename with extension as .ctl it seems as a .txt file. Is there any alternate way to create it?

View 3 Replies View Related

Server Utilities :: Concatenate Timestamp To Constant Value In Control File

Jun 13, 2012

I am loading data using sqlldr command in UNIX to an oracle table and want to concatenate timestamp to a file name in the "create_file_name" column in the code below.

I have the below code within the control file..

file_type POSITION(1:5) CHAR,
business_date POSITION(16:23) DATE "YYYYMMDD",

The load fails with SQL Loader error: "Expecting valid column specification, ",", ")", found keyword EXPRESSION found instead of column. How the timestamp to a filename can be appended?

View 5 Replies View Related

Server Utilities :: How To Load If Data Is In Control File As Well As In Datafile

Apr 8, 2010

I am using perl script to dynamically generate the control file.If I have data in the control file as well as in the datafile, how would i write the control file in that case. Is the below one correct?

load data
INFILE '/export/home/test/test.csv'
terminated by "," optionally enclosed by '"'
trailing nullcols
( empno, empname, sal, deptno )

Is there any way that if my control file contains half of the data and my data file contains the other half of the data can i club this data into a logical record in the control file to populate the DB?

My exact 2nd requirement is, my DB contains 5 cols and for 1 col the data is common(countryName) which i have to pass to the control file dynamically and the .csv file contains the data for the other four cols. How could i combine these in the ctrl file and populate the DB?

so if the DB contains CountryName, empid, ename, sal and dept..I will get the CountryName to the ctrl file and csv contains the data for empid, ename, sal and dept. How would i combine these data into a logical record and populate the DB?

View 12 Replies View Related

Server Utilities :: Dynamic Control File Generation In WINDOWS Environment?

Jul 23, 2010

I am trying to generate dynamic control file, as the files I want to upload are coming from different source and their name is constantly changing but following a fix pattern and naming convention.

I am able to generate dynamic control file through SQL. But while calling from BATCH file, i am unable to sent the file name as parameter.

All the examples i have searched are for UNIX, how to do it with BATCH File in WINDOWS.

View 4 Replies View Related

Server Utilities :: Assign Numeric Value Generated From Sequence In Control File?

Dec 22, 2003

I have a control file like following:


problem is that control_id value is not in data file and I have to assign to each row the same value generated from sequence or from unix variable.

For example, after I run sqlldr, I have to have records in the table like following:

control_id name address
---------- ---- -------
1847 Charlie 250 yonge st
1847 Peter 5 Brookbanks dr
1847 Ben 123 King st

How do I do that?

View 29 Replies View Related

Server Utilities :: How To Create Control File To Insert Data In Our Database

Dec 21, 2011

how to create control file and how to load the data through command window in our database using sql * loader.i am having structure in my database and .csv file in my desktop.

View 20 Replies View Related

Server Utilities :: Proper Data Type Should Use In Control-file For Both Fields

Jan 26, 2012

My oracle table having 2 fields.

filed1 VARCHAR(500)
field2 NUMBER.

i load data to this table from a file using sqlldr.

what is the proper data type should i use in control-file for both the fields.? i dont mention any datatye in ctl file which is working fine with given dataset.

View 19 Replies View Related

SQL & PL/SQL :: Writing Turkey Characters To Text File?

Oct 8, 2013

Oracle Database 11g Enterprise Edition Release - 64bit Production
PL/SQL Release - Production
CORE Production
TNS for Linux: Version - Production
NLSRTL Version - Production

I am trying to write the Turkey character stored in the table in VARCHAR2 to Unix file. But when the text is written to the unix, the characters are coming as junk.

The output of the file it is writing is as below after the execution

Fis Içe Aktarma Olusturuldu Header
Fis Içe Aktarma Olusturuldu
Fiş İçe Aktarma Oluşturuldu

Instead I expect the chararecter to be as "Fiş İçe Aktarma Oluşturuldu Header" which when converted to English will show as "Created Import Plug Header".

CREATE TABLE TEST_JUNK_CHAR (primary_description VARCHAR2(400))
INSERT INTO TEST_JUNK_CHAR VALUES('Fiş İçe Aktarma Oluşturuldu Header')


View 13 Replies View Related

SQL & PL/SQL :: UTL_FILE.PUT_LINE Is Not Writing Data To A File?

Jan 18, 2011

I want to extract data from a table and write into a txt file using UTL_FILE utility.I have written the below query. I am able to see query is returning data.But it is not creating file and writing data into it.

CREATE OR REPLACE PROCEDURE xxcfi_outbound_test (errbuf OUT VARCHAR2,
retcode OUT VARCHAR2)
CURSOR emp_cur


View 1 Replies View Related

Server Utilities :: Control File To Update Multiple Rows In Database Table?

Dec 22, 2010

The following control file updates multiple rows in database table.

INTO TABLE temp_tab
(Data LOBFILE(CONSTANT cadd_pass.xml) terminated by eof

There are 21 lines in the xml. So 21 rows are updated in table.update only one row?

View 9 Replies View Related

Server Utilities :: Control File - Insert Rows Into Table By Defaulting Date?

Jan 15, 2013

My Table structure

column1 varchar(10)
column2 Date
Column3 varcahr(2)
Column4 varcahr(2)

By Data file

asds 12/12/2001asas
textsd asds
asds 12/12/2001asas
ramkiy asds

I still want to insert row 2 and row 4 into table by defaulting the date. how can I handle this in control file?

View 14 Replies View Related

Server Utilities :: How To Write Control File To Load Data Into Revenue Table

Aug 16, 2011

I have a table revenue

create table revenue
person varchar2(23),
month varchar2(3),
rev_amt number

and i have data in a file like below

Person Jan Feb Mar Apr Mai Jun Jul Aug Sep Oct Nov Dez

i want to load it into the table in the following way.

Person Month Revenue
Schnyder Jan 345
Schnyder Feb 223
Schnyder Mar 122
Schnyder Apr 345
Schnyder Mai 324
Schnyder Jun 244
Schnyder Jul 123
Schnyder Aug 123
Schnyder Sep 345
Schnyder Oct 121
Schnyder Nov 345
Schnyder Dez 197
........ ... ...
How to write control file to load this data into the above revenue table.

View 2 Replies View Related

Forms :: Reading And Writing Data In A Text File

Mar 8, 2011

I need to read data from text file(located on application or db server or on some other server, however path is known to me.) and then append some data in it.

Data will be read and written on daily basis so i want to clear all data on date change.

View 3 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 :: Writing Data To A Network Shared Folder / ORA-29283 / Invalid File Operation

Jul 13, 2010

I am trying to write data to a network shared folder. When I write to a local file it works perfectly. Below is my procedure.

CREATE OR REPLACE procedure nbpsbp_file as
type r_cursor is ref cursor;
refr r_cursor;
tab_name varchar2(20):= null;
tab_name1 varchar2(20) := null;
tab_name2 varchar2(20) := null;


When I execute the above procedure, it gives me the following error

ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at "NBPSBP_FILE", line 36
ORA-06512: at line 1

I have also set the parameter utl_file_dir = '\ emp' When I set the utl_file_sir to a local folder, for example, c: emp, and use the same path in UTL_FILE.FOPEN, then it works fine and writes the desired output to text file. But when I give it a network address, it raises the above error.

View 3 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

Can Get Name Of File Loading Table In Control File

Feb 21, 2011

is there any way you can get the name of the file loading the table in a control file? i have a table with a column called source_file, and need to populate it during the load.

View 1 Replies View Related

Copyrights 2005-15, All rights reserved