11-05-2004
writing database tables into a file in unix
I want to collect the database tables(Ex: Emp,Sal,Bonus...etc)
in a file & give this file at the command prompt, when prompted for the tables list at command prompt. How can i do that ?
Ex:- Import jason/jason1 tables=emp,sal,bonus log=j1.log
i want to change this into
Ex:- Import jason/jason1 tables=i_tables.txt log=j1.log
where i_tables.txt should contain emp,sal,bonus.
How i can acheive this at the commnad prompt in unix .
Thanks !
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all, i would like to set a cronjob to back up my db tables.
I have written the par file, i would like to know how can i execute a exp command in a shell script.
my par file userid=admin/password
file=backup.dmp
log=backupLOG.log
tables=
(Tables 1,
Tables 2)My cron job script will be... (1 Reply)
Discussion started by: new2ss
1 Replies
2. Shell Programming and Scripting
how to disable a constraint type of a field (present in diffrent tables) in the database unix a unix script file.. (3 Replies)
Discussion started by: shaksing
3 Replies
3. Shell Programming and Scripting
I am coding shell script.
I need to connect to different databases like DB2, Oracle and Sybase.
I would then need to query tables where it has all the groups, users for that database.
I would also need who has what kind of permissions.
EG: I know for DB2 some TABAUTH table needs to be... (0 Replies)
Discussion started by: pinnacle
0 Replies
4. Programming
The attached file, credits.php, is part of our new (experimental) banking / credits system for this site.
I added a field bankfee in credits_transactions but it is not writing to the database (no PHP error).
Can someone take a look at the attached PHP file and see if they can find out why... (4 Replies)
Discussion started by: Neo
4 Replies
5. Shell Programming and Scripting
Hi All,
Please help me in writing data to a file in one row.
In database there is a column which contains large data which does not fit in the file in one row. The column contains list of paths. I want to write these paths to a file in one row.
Please find the code below writes :
... (2 Replies)
Discussion started by: rajeshorpu
2 Replies
6. Shell Programming and Scripting
I have several bash scripts that write to an SQLite3 database at the same time. At some occasion the database returns: SQL error: database is locked.
How would be the best way, to make a process to wait until the data base is 'free' again. I tried:
sqlite3 test.db ".timeout 1000; update....."... (2 Replies)
Discussion started by: creamcheese
2 Replies
7. Programming
I want to check for rows in a table where all values (except the key) is empty. I am using MySQL 5.5.
I plan to do this mechanically, so the approach should work for any table in my database schema.
Suppose for illustration purposes I start with the following table:
CREATE TABLE `sources` (
... (4 Replies)
Discussion started by: figaro
4 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I have a requirement, where i have to pool file A data to file B continuously and need to process the data in the file B.
Since the data need to be processed only once so i have to truncate the data in file A after every pool. So that on the next pooling i can get the fresh data and... (3 Replies)
Discussion started by: mayank2211
3 Replies
9. Shell Programming and Scripting
Hi There,
I'm trying to write a simple script that will email me when we have an application job in a certain status that needs human intervention. I've used this script for other tables and it works great. However, this one gives me the warning that there is binary data so it might not. ... (2 Replies)
Discussion started by: Colel2
2 Replies
PFS(8) BSD System Manager's Manual PFS(8)
NAME
pfs -- save and restore information for NAT and state tables
SYNOPSIS
pfs [-v] -l
pfs [-bv] -R filename
pfs [-bv] -r filename
pfs [-v] -u
pfs [-bv] -W filename
pfs [-bv] -w filename
DESCRIPTION
The pfs command allows state information created for NAT entries and rules using ``keep state'' to be locked (modification prevented) and
then saved to disk, allowing for the system to experience a reboot, followed by the restoration of that information, resulting in connections
not being interrupted.
OPTIONS
-b The information are read or stored using binary format. The default format is a readable ASCII format, similar to pfctl.conf
syntax.
-l Lock state tables in the kernel.
-R filename Restore information from filename and load it into the kernel. The state tables are locked at the beginning of this operation
and unlocked once complete.
-r filename Read information in from filename and load it into the kernel. This requires the state tables to have already been locked and
does not change the lock once complete.
-u Unlock state tables in the kernel.
-v Provide a verbose description of what's being done.
-W filename Write information from the kernel out to filename. The state tables are locked at the beginning of this operation and
unlocked once complete.
-w filename Write information from the kernel out to filename. This requires the state tables to have already been locked and does not
change the lock once complete.
FILES
/dev/pf
SEE ALSO
pf(4)
BSD
July 21, 2009 BSD