I am not able to get the isql output to temp_res file ... i have tried all the different combinations as shown below, but could not get anywhere .... Please Help
Code:
isql -S $serv_name -U $usr_name -P $pswd -D $db_name -o temp_res << EOF1
select status from modset where modsetid=$mod_id
go
exit
EOF1
isql -S $serv_name -U $usr_name -P $pswd -D $db_name << EOF1 > -o temp_res
select status from modset where modsetid=$mod_id
go
exit
EOF1
isql -S $serv_name -U $usr_name -P $pswd -D $db_name << EOF1 > temp_res
select status from modset where modsetid=$mod_id
go
exit
EOF1
temp_path="/.../.../.../.../temp_res.txt"
isql -S $serv_name -U $usr_name -P $pswd -D $db_name -o temp_path << EOF1
select status from modset where modsetid=$mod_id
go
exit
EOF1
Hello all...
i'm trying to execute a shell script through crontab.
To run at 8pm on wednesday's
The crontab entry:
00 20 * * 3 /u2/dir1/dir2/jobs/p.sh
the p.sh file:
isql -s claims /u2/dir1/dir3/dir4/a.sql
permissions for it are -rwxrwx--x
i've confirmed a.sql is in that directory.
... (2 Replies)
Dear all
I want to execute some isql command from unix shell script. Kindly suggest me. isql command mention below.
isql -U -P
use gdb_1
go
select count (*) from table_x
go (3 Replies)
Hi all,
I have two accounts in a Unix server, the first one uses .tcsh as default shell and the other uses .ksh (korn shell) as default.
When I login using the account with .tcsh default, I can use the isql command and connect to our database server. However, when I use the other... (2 Replies)
I am trying to run the following Sybase SQL query in a shell script file. It isn't working although everything else in the file runs, and I can run queries from a file fine. For some reason, entering the query directly doesn't work. Any ideas?
#!/bin/sh
$SYBASE/$SYBASE_OCS/bin/isql -e... (2 Replies)
Hi..
I am passing a variable in my shell function. I need to access it for an isql comand in the shell script.
However the isql o/p gives no results if i pass a variable in the command. The isql command works perfectly fine if i hardcore the table name.
My script is :
... (0 Replies)
Hi
I wrote a script for connecting isql(Sybase database) and stored the SQL output in Unix box.
my script:
isql -U${USER} -P${PASS} -S${SERVER} <<EOF > $WORK_DIR/out1.log
go
select convert(varchar(10),sdcurrent,101) from pr_sysdate
go
exit
EOF
Unfortunately, the output file not... (5 Replies)
Hi,
I need to connect to DB through my shell script. but I dont want to hardcode my db password in the script. Is there a way to do it?
Thanks
---------- Post updated at 07:42 PM ---------- Previous update was at 04:54 PM ----------
:(Guys..please help me with this:( (1 Reply)
Hi ,
I want to use shell variable in isql.
example..
$ksh ./sudh.ksh "2041qwer"
sudh.ksh is my script passing the perameter "2041qwer"
Code in my script :
===========
$SYBASE/$SYBASE_OCS/bin/isql -I$SYBASE/interfaces -S$OTHRSRVR -U$SYBUSER -P$SYBPASS -w... (1 Reply)
Hi Guys,
I need help with my code.
I am not able to find what the error is (tried debugging and everything).
#! /bin/sh
# MODSET_CLOSE
# Usage: modset_close
echo "Enter the Type of Modsets that needs to be Closed: "
read mod_typ
serv_name=`cat $mod_typ | awk '{ print $1 }'`... (5 Replies)
need to create shell script to read the table's name from file and connect SQL SERVER using isql (odbcunix)
i 'm able connect to database with below command line syntex but i could not get working in shell script with SQL and storing the row count in variable.
isql -v DSN USERNAME PASSWD
... (6 Replies)
Discussion started by: pimmit22043
6 Replies
LEARN ABOUT LINUX
ndb_delete_all
NDB_DELETE_ALL(1) MySQL Database System NDB_DELETE_ALL(1)NAME
ndb_delete_all - delete all rows from an NDB table
SYNOPSIS
ndb_delete_all options
DESCRIPTION
ndb_delete_all deletes all rows from the given NDB table. In some cases, this can be much faster than DELETE or even TRUNCATE TABLE.
Usage
ndb_delete_all -c connect_string tbl_name -d db_name
This deletes all rows from the table named tbl_name in the database named db_name. It is exactly equivalent to executing TRUNCATE
db_name.tbl_name in MySQL.
The following table includes options that are specific to ndb_delete_all. Additional descriptions follow the table. For options common to
most MySQL Cluster programs (including ndb_delete_all), see Options Common to MySQL Cluster Programs(1).
Table 17.16. ndb_delete_all Options and Variables: MySQL Cluster NDB 7.2
+--------------------------+-----------------------------------+-------------------------------------+
|Format | Description | Added / Removed |
+--------------------------+-----------------------------------+-------------------------------------+
| | Name of the database in which the | |
| --database=dbname, | table is found | All MySQL 5.5 based releases |
| | | |
| -d | | |
+--------------------------+-----------------------------------+-------------------------------------+
| | Perform the delete in a single | |
| --transactional, | transaction (may run out of | All MySQL 5.5 based releases |
| | operations) | |
| -t | | |
+--------------------------+-----------------------------------+-------------------------------------+
| | Run tup scan | |
| --tupscan | | All MySQL 5.5 based releases |
+--------------------------+-----------------------------------+-------------------------------------+
| | Run disk scan | |
| --diskscan | | All MySQL 5.5 based releases |
+--------------------------+-----------------------------------+-------------------------------------+
o --transactional, -t
Use of this option causes the delete operation to be performed as a single transaction.
Warning
With very large tables, using this option may cause the number of operations available to the cluster to be exceeded.
COPYRIGHT
Copyright (C) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online
at http://dev.mysql.com/doc/.
AUTHOR
Oracle Corporation (http://dev.mysql.com/).
MySQL 5.5 01/30/2014 NDB_DELETE_ALL(1)