Sponsored Content
Top Forums Programming Need help on Shell script for database maintainace.. Post 302370035 by TonyLawrence on Tuesday 10th of November 2009 08:01:44 AM
Old 11-10-2009
Is the problem that you are not a postgres user?

su postgresuser commands

does that if you are root.

You could also use "sudo" to allow another user to be the postgres user for these commands; see Using sudo
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

can a shell script interact with database?

Hi All, Language like C,Java can interact with database..and can use database information .. can a shall script do this? if yes thn plz guide me..... thankx (7 Replies)
Discussion started by: johnray31
7 Replies

2. Shell Programming and Scripting

Shell Script: want to insert values in database when update script runs

Hi , I am new to linux and also also to shell scripting. I have one shell script which unpacks .tgz file and install software on machine. When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies

3. Shell Programming and Scripting

what is uses of unix shell script in database projects

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (2 Replies)
Discussion started by: alokjyotibal
2 Replies

4. Shell Programming and Scripting

How do I check using shell-script if an item is available in a database?

Input for the program is a text file consisting of n no. of items. I want search each item in a database and the existing parts should go to FOUND folder and the others should go to NOTFOUND folder. Pls help me in this. Thank u. (1 Reply)
Discussion started by: smarty86
1 Replies

5. Shell Programming and Scripting

Connection to database through shell script

Hi when i am calling the shell script with two parameter like id and date it works fine.But the same shell script is call by java application it gives the error as shown below Thu Jan 8 04:13:22 EST 2009|The Get Segment Process Failed: SP2-0306: Invalid option. Usage: CONN where <logon>... (1 Reply)
Discussion started by: ravi214u
1 Replies

6. Shell Programming and Scripting

get result from database into shell script

hi, I have a script that will logon to a database siebel and do the select query and then get the result in command prompt of unix.Below the script. #!/bin/ksh . $HOME/conf/systemProperties/EnvSetup.properties #set -x while read i do echo $i connect1=`sqlplus -silent... (1 Reply)
Discussion started by: ali560045
1 Replies

7. Shell Programming and Scripting

Connecting to oracle database from shell script

Hi all, I am satyakiran , i am new to the forum. i never done shell scripts for connecting to the data base (oracle) and fetching the data from the database( thru sql select statements ) i want to know 1. how to connect to the data base(oracle) using shell script 2. how to retrieve data... (8 Replies)
Discussion started by: satyakiran
8 Replies

8. Shell Programming and Scripting

Switch from one database to other using shell script

Hi all, This is my first ever post to any forum so, dont let this go in vain...........:) Here is the scenario........ I have logged into the unix where oracle_sid is initialized for some X database in the .profile. I have a unix script where some sql query which fetches data from X... (3 Replies)
Discussion started by: sachinkl
3 Replies

9. Shell Programming and Scripting

Shell Script to connect to the oracle database

Hi Unix Gurus, I have a requirement to write a script, Oracle DB gets referesh every 6hrs, hence we need write a script to connect to the database , if it connects it should generate a file to proceed the next job application or when an error when connectiong to DB it should not generate any... (8 Replies)
Discussion started by: bshivali
8 Replies

10. Shell Programming and Scripting

How to connect to Oracle database using shell script?

Hi All, I am newbie to unix shell scripting. I want to connect to oracle database using shell script. I know how to connect DB using user name and password but my question is if my password is having '@' sign then how to connect. I have tried like below, cnt=`sqlplus -s /nolog << EOFSQL ... (3 Replies)
Discussion started by: pmotewar
3 Replies
PGTUNE(1)						      General Commands Manual							 PGTUNE(1)

NAME
pgtune - generate an optimized postgresql.conf file SYNOPSIS
pgtune [ options ] -i $PGDATA/postgresql.conf -o $PGDATA/postgresql.conf.pgtune DESCRIPTION
pgtune takes the wimpy default postgresql.conf and expands the database server to be as powerful as the hardware it's being deployed on. pgtune works by taking an existing postgresql.conf file as an input, making changes to it based on the amount of RAM in your server and suggested workload, and output a new file. OPTIONS
-i, --input-config Specifies the current postgresql.conf file. -o, --output-config Specifies the file name for the new postgresql.conf file. -M, --memory Use this parameter to specify total system memory. If not specified, pgtune will attempt to detect memory size. -T, --type Specifies database type. Valid options are: DW, OLTP, Web, Mixed, Desktop -c, --connections Specifies number of maximum connections expected. If not specified, it depends on database type. -D, --debug Enables debugging mode. -S, --settings Directory where settings data files are located at. Defaults to the directory where the script is being run from. The RPM package includes a patch to use the correct location these files were installed into. -h, --help Show summary of options. -v, --version Show version of program. AUTHOR
pgtune was written by Gregory Smith. This manual page was written by Rodolphe Quiedeville <rodolphe@quiedeville.org>, for the Debian project (and may be used by others). November 2, 2009 PGTUNE(1)
All times are GMT -4. The time now is 10:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy