Shell script for accessing a file in the network drive and invoking oracle sql loader


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script for accessing a file in the network drive and invoking oracle sql loader
# 1  
Old 03-20-2007
Java Shell script for accessing a file in the network drive and invoking oracle sql loader

Hi,

Please let me know if anybody is having a solution handy for the below tasks...


It would be helpful if somebody can resolve my query. I am new to unix and oracle environment and looking for some online reference for completing a task.

Task:

Check if the network drive exists
Check if the specified file exists in the network directory
invoke sql loader in oracle and process through that file
Once completed, move the file to archive location


Thanks in advance for the help

Last edited by sayydevara; 03-22-2007 at 10:40 AM.. Reason: Updating the content
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to call SQL Loader in shell script?

HI Experts, I am pretty new to scripting and i need to create a perl or shell script which should fetch a file from local directory and insert the data into a table using sql loader. This will be later added to chron job to run daily and fetch all files and load them into the table. Also i... (1 Reply)
Discussion started by: sam1234
1 Replies

2. Homework & Coursework Questions

Write a shell script for SQL loader to load data into a staging table

Hi, I'm new to Linux. I'm working on a database, and need to load data in a database table (which I already created) using shell script. The table has two columns - Acct_number (not nullable) and date (timestamp). I'm not able to write a shell script for that. Can any one help me? ... (3 Replies)
Discussion started by: saisudeep
3 Replies

3. Shell Programming and Scripting

Shell script with Oracle PL/SQL

Hi Gurus, I am new to this unix world...I need your help to walk through. I want to learn shell scripting..... The shell script which can be able to use with oracle pl/sql... So please suggest me which shell is good. Which Unix/Linux version is good for this to Install to get practice the... (8 Replies)
Discussion started by: GaneshAnanth
8 Replies

4. UNIX for Advanced & Expert Users

Use of Oracle pl/sql in UNIX shell script

Hi, I have basic knowledge on how to write pl/sql code inside shell script. I am looking for more advance thing. Is there any book for that which can just talk about how to write more advance plsql code inside shell script. Please help Thanks!!!!!! (1 Reply)
Discussion started by: diehard
1 Replies

5. Shell Programming and Scripting

Running Oracle SQL from shell script

Hi, can anyone help me with this script please. I need the oracle command to go into the unix batch file. #!/bin/sh # A menu driven Shell script which has following options # for acmtoron@> # # # Exit # As per option do the job #---- while : do clear echo " A C M LOG MONITORING... (0 Replies)
Discussion started by: tinaaguilera
0 Replies

6. UNIX for Dummies Questions & Answers

SQL loader script - ORACLE environmental variable

I am new in unix.. I am running a sql loader script where I have to specify the data file path but the file name contains spaces in it so giving error multiple arguments I have tried it with "" and '' but does n't work the command is : $ORACLE_HOME/bin/sqlldr... (1 Reply)
Discussion started by: Sandip Dey
1 Replies

7. UNIX for Advanced & Expert Users

Accessing PL/SQL OUT variables in Korn Shell Script

Hello All, I was just wondering if there is any direct way to access PL/SQL OUT variables from Korn Shell Script. I could already figure out how to return a single value back from PL/SQL to Shell Script (using bind variable). But, what if we want to return multiple values? One option I... (4 Replies)
Discussion started by: bright_future
4 Replies

8. Shell Programming and Scripting

Invoking Oracle stored procedure in unix shell script

Here's a shell script snippet..... cd $ORACLE_HOME/bin Retval=`sqlplus -s <<eof $TPDB_USER/april@$TPD_DBCONN whenever SQLERROR exit 2 rollback whenever OSERROR exit 3 rollback set serveroutput on set pages 999 var status_desc char(200) var status_code... (1 Reply)
Discussion started by: hidnana
1 Replies

9. Shell Programming and Scripting

A SQL Loader Script

Hi Guys, I am looking to develop a SQL Loader script that would bascially allow the user to have a txt file (or such) as an input file containing .sql scripts procedures, triggers, bascially anything against a database that could then be run automatically. Let me break it down a bit more,... (2 Replies)
Discussion started by: LiquidChild
2 Replies

10. Shell Programming and Scripting

Logging into oracle or SQL from shell script

Hi, I have a shell script where I log on to sqlplus like this log() { sqlplus -s scott/tiger <<! select count(*) from EMP; ! } log Here I have hardcoded/used the username : scott and password : tiger directly to log on to SQLPLUS. If i have my log in information in my profile file... (2 Replies)
Discussion started by: manirsendhil
2 Replies
Login or Register to Ask a Question
asadmin(1M)						    Application Server Utility						       asadmin(1M)

NAME
asadmin - utility for performing administrative tasks for the Sun Java System Application Server SYNOPSIS
asadmin subcommand [-short_option[short_option_argument]]* [--long_option[long_option_argument]]* [operand]* Use the asadmin utility to perform any administrative task for the Sun Java System Application Server. You can use this utility in place of using the Administration Console. The subcommand identifies the operation or task you wish to perform. Subcommands are case-sensitive. Short option arguments have a single dash (-); while long option arguments have two dashes (--). Options modify how the utility performs a subcommand. Options are also case- sensitive. Most options require argument values except boolean options which toggle to switch a feature ON or OFF. Operands appear after the argument values, and are set off by a space, a tab, or double dashes (--). The asadmin utility treats anything that comes after the options and their values as an operand. Local subcommands can be executed without the presence of an administration server. However, it is required that the user be logged into the machine hosting the domain in order to execute the subcommand and have access (permissions) for the installation and domain directo- ries. Remote subcommands are always executed by connecting to an administration server and executing the subcommand there. A running administra- tion server is required. All remote subcommands require the following options: -u --user authorized domain application server administrative username. -w --password password to administer the domain application server. -H --host machine name where the domain application server is running. -p --port port number of the domain application server listening for administration requests. -s --secure if true, uses SSL/TLS to communicate with the domain application server. -t --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. -e --echo setting to true will echo the command line statement on the standard output. Default is false. -I --interactive if set to true (default), only the required password options are prompted. For security purposes, you can set the password for a subcommand from a file instead of entering the password at the command line. The --passwordfile option takes the file containing the passwords. The valid contents for the file are: AS_ADMIN_PASSWORD=value AS_ADMIN_ADMINPASSWORD=value AS_ADMIN_USERPASSWORD=value Given the --passwordfile option and its value, the password options in the passwordfile are exported to the global environment; subsequent subcommands without the password options take this value. However, if both the --password and --passwordfile options are specified on the command line, the password value in the passwordfile is exported to the global environment and subsequent subcommands without the --pass- word option would take this value. However, for the current subcommand, the --password option value specified on the command line is taken since the --password option takes precedence over the --passwordfile option. To use the --secure option, you must use the set command to enable the security--enabled flag in the admin http-listener in the domain.xml. When you use the asadmin subcommands to create and/or delete, you must restart the server for the newly created command to take affect. Use the start-domain command to restart the server. Some characters, such as the colon (:), the asterisk (*), and the backslash(, cause errors if you use them in the command syntax unless you use escape characters to set them off. The possibilities for using escape characters vary depending upon what platform you use and whether you use singlemode or multimode. You do not need to use escape characters for colons in the get or set commands. On UNIX, in singlemode, you can use either two backslashes () or double-quotes (" ") to escape restricted characters. For example, when creating a JDBC connection pool with an option whose value includes colons, you could use backslashes (example assumes the environment variables have been set for some properties): asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvali- datereq=true --property url=jdbc:oracle:thin:@asperfsol8:1521:V8i:user=staging_lookup_app:password=staging_lookup_app OraclePoollookup To use quotes in the same example as above, you would enclose the value in double quotes (") and escape the double quotes with the back- slash. asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvali- datereq=true --property url= word=staging_lookup_app OraclePoollookup On windows, in singlemode, you can escape using the backslash character. For example, when creating a JDBC connection pool with an option whose value includes colons, you could use backslashes (example assumes the environment variables have been set for some properties): asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvali- datereq=true --property url=jdbcoraclethin@asperfsol81521V8i:user=staging_lookup_app:pas sword=staging_lookup_app OraclePoollookup On any platform, in singlemode, you can use backslashes to escape the character and enclose the value containing the escaped characters in double quotes. For example, when creating a JDBC connection pool with a option whose value includes colons, you could use the escape char- acters as follows (example assumes the environment variables have been set for some properties): asadmin create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvali- datereq=true --property url="jdbcoraclethin@iasperfsol81521V8i":user=staging_lookup_app: password=staging_lookup_app OraclePoollookup On any platform, in multimode, you can use the following syntax, which only requires quotes, not slashes or backslashes: asadmin> create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --failconnection=true --isconnectvali- datereq=true --property url="jdbc:oracle:thin:@asperfsol8:1521:V8i":user=staging_lookup_app:password=staging_lookup_app OraclePoollookup To access the manpages for the Application Server Command-line interface subcommands, add $AS_INSTALL/man to your MANPATH environment vari- able. You can obtain overall usage information for any of the asadmin utility subcommands by invoking the --help option. If you specify a sub- command, the usage information for that subcommand is displayed. Using the help option without a subcommand displays a listing of all the available subcommands. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ appclient(1M), package-appclient(1M) J2EE 1.4 SDK March 2004 asadmin(1M)