How Connect to a Database in Shell Programming?
Answers were Sorted based on User's Feedback
Answer / ashu
you have a "sqlplus" command to connect to database.
command is as follows:
sqlplus <db_username>/<db_password> @test.sql
| Is This Answer Correct ? | 19 Yes | 6 No |
Answer / sibin kc
You can simply use as follows.
mysql -h <hostname> -u <user name> -p<password> -e "use
psa;select * from domains where domain_name = 'hai.com';"
| Is This Answer Correct ? | 9 Yes | 6 No |
Answer / seshadri sethi
(1)1st give "sqlplus"
(2)then it will show "sqlplus" prompt
(3)give "db username"
(4)give "db password"
| Is This Answer Correct ? | 8 Yes | 6 No |
Answer / supraja
mysql -uusername -ppassword -hipaddress database -e "statement"
eg:mysql -uroot -psuppu -h192.168.0.1 supraja -e "select
count(*) from table"
| Is This Answer Correct ? | 2 Yes | 0 No |
How can I Debug a shell scripts and Perl scripting?? or How do you debug a shell scripting and perl scripting ( at the compile time error or run time error) in Unix environment ?
What is bash used for?
If one dont know how to create a script then how he/she can use the QTP?
What is the syntax of while loop in shell scripting?
What is the best scripting language?
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
How do I start a shell script?
give me some website where i can get unix and testing meterials
What is a shell environment?
What are the different methods available to run a shell script?
What is the meaning of $1 in shell script?
Explain about the exit command?