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


ADVERTISEMENT

Server Utilities :: Dump File Generation

Jan 18, 2012

I have a question on export dump file generation.

select sum(bytes)/(1024*1024*1024) "GB" from dba_segments where owner='JACK';

The above select query give the output of Schema size with 15 GB. When i perform the same schema export, the dump file size generating is 2 GB. What is the difference between the two scenarios as how come there could be a variation in file size?

View 6 Replies View Related

Server Utilities :: DIM 00014 - Cannot Open Windows NT Service Control

May 10, 2010

When I am creating service for oracle using oradim Utility ,following messsage appearing

F:Users>oradim -new -sid stby -startmode manual

DIM-00014: Cannot open the Windows NT Service Control Manager.
O/S-Error: (OS 5) Access is denied.

View 9 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.

Example:
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;
export ORACLE_SID=XXX;
export PATH=$PATH:$ORACLE_HOME/bin;

sqlldr userid=XXX/XXX data=$data_file
control=/dev/cntrl/test.ctl
errors=99999
bad=/dev/bad/test_$1$2_$$.bad
log=/dev/logs/test_$1$2_$$.log

the top of my control file is as follows

load data
truncate
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..

LOAD DATA
TRUNCATE
INTO TABLE TABLEA
TRAILING NULLCOLS
(
file_type POSITION(1:5) CHAR,
business_date POSITION(16:23) DATE "YYYYMMDD",
create_file_name "FILE_NAME" EXPRESSION "SELECT TO_CHAR(CURRENT_TIMESTAMP(3), 'YYYYMMDDHH24MISS') FROM DUAL")

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 '*'
INFILE '/export/home/test/test.csv'
INSERT INTO TABLE EMP fields
terminated by "," optionally enclosed by '"'
trailing nullcols
( empno, empname, sal, deptno )
[code]....

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 :: Assign Numeric Value Generated From Sequence In Control File?

Dec 22, 2003

I have a control file like following:

LOAD DATA
INFILE *
INTO TABLE member
REPLACE
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
(
control_id,
name,
address
)

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

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

Dec 22, 2010

The following control file updates multiple rows in database table.

LOAD DATA
INFILE *
replace
INTO TABLE temp_tab
FIELDS TERMINATED BY ","
(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
--------------------------------------------------------
Schnyder,345,223,122,345,324,244,123,123,345,121,345,197
Weber,234,234,123,457,456,287,234,123,678,656,341,567
Keller,596,276,347,134,743,545,216,456,124,753,346,456
Meyer,987,345,645,567,834,567,789,234,678,973,456,125
Holzer,509,154,876,347,146,788,174,986,568,246,324,987
Müller,456,125,678,235,878,237,567,237,788,237,324,778
Binggeli,487,347,458,347,235,864,689,235,764,964,624,347
Stoller,596,237,976,876,346,567,126,879,125,568,124,753
Marty,094,234,235,763,054,567,237,457,325,753,577,346
Studer,784,567,235,753,124,575,864,235,753,864,634,678

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

Backup & Recovery :: Moving From One Windows Environment To Another Linux Environment?

Jun 19, 2012

I'm trying to move my backup sets from windows database environment, to OEL 5.7 environment on another server.

I've found a manual [URL] by which I am trying to do it.I took backup sets from last night's backup using RMAN,and the current parameter(initSID.ora) file from the running live database.Now i need to configure control files in the pfile accordingly.

1. can i take current control files from the running system, to restore and recover backup sets from last night, to the state the database was at backup time?

2. how can i find out if control files are backed up and know by RMAN? "list backup completed after '2012-JUN-19';" >> gives me Archive redo logs, datafiles, but don't see the control files(or don't reconize them).

View 15 Replies View Related

Windows :: Export With Dynamic File Name?

Aug 19, 2010

I want to know how export oracle tables with dynamic file name which contains (system date and database name) on windows XP platform.

View 5 Replies View Related

Server Administration :: Generation Of Redo Log File

Aug 20, 2010

redo generation. As I found the below statement in another forum."Undo segment generates the redo data also, because undo segment is database changes, so it generates the redo data also."

How a Undo segment can generate Redo and Undo datas.

View 12 Replies View Related

Server Administration :: Large Number Of Trace File Generation In Bdump

May 7, 2010

We are facing one issue on one of the database. The database is generating large trace files(14000) from last two days. That consumes around 15G space on the disk. And the content of the trace files is not having any meaningful message to debug:

cat /apps/oracle/admin/fs90uat/bdump/fs90uat_p050_23966.trc

*** TRACE DUMP CONTINUES IN FILE /apps/oracle/admin/fs90uat/bdump/fs90uat_p050_23966.trc ***
Dump file /apps/oracle/admin/fs90uat/bdump/fs90uat_p050_23966.trc

*** TRACE DUMP CONTINUED FROM FILE /apps/oracle/admin/fs90uat/bdump/fs90uat_p050_23966.trc ***

... (Many lines with above message)

The alert log is having one repeated error yesterday:

Thu May 6 22:00:03 2010
Errors in file /apps/oracle/admin/fs90uat/bdump/fs90uat_j000_11811.trc:
ORA-12012: error on auto execute of job 2647927
ORA-04063: ORA-04063: package body "ORACLE_OCM.MGMT_DB_LL_METRICS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "ORACLE_OCM.MGMT_DB_LL_METRICS"
ORA-06512: at line 1

The corresponding trace file is having error:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /apps/oracle/product/10.2.0/db_1
System name: SunOS
Node name: corpqadb30
[Code] .......

View 2 Replies View Related

Server Utilities :: Cannot Access NLS Data Files Or Invalid Environment Specified

May 15, 2010

I exported oracle database from one server in a dmp file. then i imported it in another oracle database server. when i saw the imported data the columns which were storing german data is in rubbish characters.

then i remember that the database from where i exported is having nls language as german. i executed this statement to set the nls on the new server

alter system set nls_lang=german SCOPE=SPFILE

but now my database is not getting started always giving me error - cannot access NLS data files or invalid environment specified.

i also set the path NLS_LANG=german in the solaris environment.

View 1 Replies View Related

Server Utilities :: Merge Two Control Files?

May 14, 2012

1)Is there a way to load two tables from two input files in one control file?

I have two control files.

LOAD DATA
INFILE 'C:
ame.txt'
BADFILE 'C:
ame.bad'
DISCARDFILE 'C:

[code]....

Can i load emp_tab and job_table using one control file and two input files name.txt and job.txt?

2)Is there a way to pass the path as a parameter in the control file?

In the job below, when i execute the sqlldr , can I pass C:/job.txt as an input instead of specifying it in control file?

View 3 Replies View Related

Forms :: Dynamic IF Condition Evaluation In 9i Environment

Apr 6, 2005

I'm using forms 9i. Let's say I have a Block in the form B1. It has two items I1 and I2. I have a table called T1 that has a column say C1. The data in the only record in T1 is 'NAME_IN(''B1.I1'') = 1 OR NAME_IN(''B1.I2'') = 2'..In forms I need to execute the following at POST-QUERY trigger of the block:-

DECLARE
VAR1 VARCHAR2(1000);
BEGIN
SELECT C1
INTO VAR1
FROM T1;
[code]....

As you could see that the IF statement is wrong. But I get the condition (for IF condition) as a string value from some database table.

View 9 Replies View Related

Replication :: Archive Generation From Linux To Windows

Jun 22, 2009

I am trying to move my archive from linux to window as the log switch occur.... for this i mount my directory of window in linux .. but it doesn't moving... dest 1 on linux and dest 2 for windows...

In alert log the permission denied appears... the mounted directory in linux of windows is owned by root ... and is not changing to oracle.

View 1 Replies View Related

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

CREATE CONTROLFILE SET DATABASE "FIVESTAR" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292

[code]....

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-01503: CREATE CONTROLFILE failed
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
CREATE CONTROLFILE REUSE DATABASE "ORACL" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100

[code]...

View 12 Replies View Related

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 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
CHARACTER SET WE8ISO8859P1
*
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;

CHECKPOINT_CHANGE# CONTROLFILE_CHANGE#
------------------ -------------------
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;

CONTROLFILE_SEQUENCE#
---------------------
293

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:

SQL>SELECT (BLOCK_SIZE/1024/1024)*20000 MB FROM V$CONTROLFILE WHERE ROWNUM = 1;
MB
------
312.5

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

View 4 Replies View Related







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