03-27-2012
You can not pass arguments to SQL*Plus this way.
There are 2 possible ways you can go:
1) use the shell variables in your here-document ($a instead of &1,...) EDIT: like Scrutinizer suggests...
2) put the SQL-commands into a SQL*Plus script. That script accepts parameters.
Quote:
Originally Posted by SQL*Plus usage message
...
<start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]
Runs the specified SQL*Plus script from a web server (URL) or the
local file system (filename.ext) with specified parameters that
will be assigned to substitution variables in the script.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi friends,
i am having a variable declared in .profile.i am changing its value in a shell script and then i am connecting to oracle and then from there i am calling a .sql called update.sql
STATUS is the variable declared in the .profile
===============================
if
sqlplus <<END... (3 Replies)
Discussion started by: sveera
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a requirement where in I have to connect to an Unix database server using SFTP. After connecting I have to write some data to one of the tables in UNIX.
Can anyone tell me the UNIX commands to open and update database table.
Thanks,
Pallavi (1 Reply)
Discussion started by: Pallavi_gondkar
1 Replies
3. Shell Programming and Scripting
Hi,
Data file path (.txt)
Control file(.ctl)
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me... (1 Reply)
Discussion started by: unihp1
1 Replies
4. Shell Programming and Scripting
Hello,
I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^
Here is what I'm trying to achieve :
file1:
test filea 3495;
test fileb 4578;
test filec 7689;
test filey 9978;
test filez 12300;
file2:
test filea... (11 Replies)
Discussion started by: mecano
11 Replies
5. Shell Programming and Scripting
Hi,
I have the following requirement.
I have a unix table as below
progname par1 par2 par3 par4
PROG1 abc def 0012 ooo
PROG2 wed xas 0100 xxx
PROG3 kkk ppp 0004 ppp
Different programs(ex:PROG1,PROG2..) accesses this table and update... (5 Replies)
Discussion started by: thanuman
5 Replies
6. Shell Programming and Scripting
Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Discussion started by: aemunathan
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I'm working with putty on Windows 7 professional and I'd like to know if there's a way to gather specific lines from a pre-existing table and make a new table with that information.
More specifically, I'd like the program to look at a specific column, say column N, and see if any of the... (5 Replies)
Discussion started by: Deedee393
5 Replies
8. Shell Programming and Scripting
I am new to this shell scripting....
I have a file which contains list of users. This files get updated when new user comes into the system.
I want to create script which will give a table containing unique list of users. When I say unique, it means script should match table while parsing... (3 Replies)
Discussion started by: dchavan1901
3 Replies
9. Shell Programming and Scripting
I have 100 Scripts, each containing 10-15 SQL's in them.
Each Script run for 40 mins to 1 hour 30 mins.
In the event of Failure in any step, if i re-start the Script, it will start running from the beginning. Which is waste of time. So in order handle this, i made the script to run from the... (7 Replies)
Discussion started by: kiran1992
7 Replies
10. Web Development
Bootstrap is great; but we have had some issues with Bootstrapped <tables> (and legacy <fieldset> elements) showing annoying, wayward lines. I solved that problem today with this simple jQuery in the footer:
<script>
$(function(){
$('tr, td, fieldset,... (0 Replies)
Discussion started by: Neo
0 Replies
LEARN ABOUT PHP
mssql_connect
MSSQL_CONNECT(3) MSSQL_CONNECT(3)
mssql_connect - Open MS SQL server connection
SYNOPSIS
resource mssql_connect ([string $servername], [string $username], [string $password], [bool $new_link = false])
DESCRIPTION
mssql_connect(3) establishes a connection to a MS SQL server.
The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling
mssql_close(3).
PARAMETERS
o $servername
- The MS SQL server. It can also include a port number, e.g. hostname:port (Linux), or hostname,port (Windows).
o $username
- The username.
o $password
- The password.
o $new_link
- If a second call is made to mssql_connect(3) with the same arguments, no new link will be established, but instead, the link
identifier of the already opened link will be returned. This parameter modifies this behavior and makes mssql_connect(3) always
open a new link, even if mssql_connect(3) was called before with the same parameters.
RETURN VALUES
Returns a MS SQL link identifier on success, or FALSE on error.
CHANGELOG
+--------+------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+------------------------------------+
| 5.1.0 | |
| | |
| | The $new_link parameter was added |
| | |
+--------+------------------------------------+
EXAMPLES
Example #1
mssql_connect(3) example
<?php
// Server in the this format: <computer><instance name> or
// <server>,<port> when using a non default port number
$server = 'KALLESPCSQLEXPRESS';
// Connect to MSSQL
$link = mssql_connect($server, 'sa', 'phpfi');
if (!$link) {
die('Something went wrong while connecting to MSSQL');
}
?>
SEE ALSO
mssql_close(3), mssql_pconnect(3).
PHP Documentation Group MSSQL_CONNECT(3)