using unix scripts database access


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting using unix scripts database access
# 1  
Old 08-23-2010
using unix scripts database access

i want to access database (sql script) within a unix script.
help me

Last edited by chamaraa; 08-23-2010 at 10:59 AM..
# 2  
Old 08-23-2010
Quote:
Originally Posted by chamaraa
i want to access database within a unix script. ...
Search this forum. There are lots of questions similar to yours. The search box is to the top right of your browser window.

tyler_durden
# 3  
Old 08-23-2010
Which database are you talking about?

If it is Oracle, you can use something like:
Code:
echo "SELECT TO_CHAR(SYSDATE, 'YYYYMMDD HH24:MI:SS') DATE_NOW FROM DUAL;\nEXIT\n" | sqlplus -S -L <User>/<Pass>@${ORACLE_SID}

Regards!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Access to a database

Hello all, is it possible to write a script in order to connect to a database, load data in a specific domain and execute the corresponding command? (3 Replies)
Discussion started by: FelipeAd
3 Replies

2. Solaris

Restricting access to functional database account through unix

Hi, At present there is a functional database account which can be accessed when logging in through a unix server. At present it can be accessed through from any UNIX account on this server. Is there any way of restricting it so it can only be accessed through a functional unix account but only... (2 Replies)
Discussion started by: runnerpaul
2 Replies

3. IP Networking

Access database over internet, help

Hi! :D I'm new here, and I will appreciate all the help you can give. This is the problem we are trying to solve at my office. At office 1 we have SCO UNIX 5.0.can't remember last number. On it runs database software on which we input/read/modify data throughout terminal software, on remote... (1 Reply)
Discussion started by: PNemesis
1 Replies

4. Shell Programming and Scripting

Database access

Hell all, I have the following snippet of code: $sql=qq{select * from ( select to_char(t.start_time_timestamp,'yyyy/mm/dd hh24:mi:ss') start_time,t.s_p_number_address, null cos_icsa_code, null cos_icsa_subcode from cc_unrated_msc_flow t union select... (2 Replies)
Discussion started by: chriss_58
2 Replies

5. UNIX for Advanced & Expert Users

Help with ms access database and firebird

Hi! I need to access two diferent databases allocated in a linux server through PHP. I know in the php.ini file I can't configure some parameters as odbc.default_db... but I can't configure it. I've already installed unixodbc drivers Can Anybody point me to a tutorial web o teach me how... (0 Replies)
Discussion started by: ncatdesigner
0 Replies

6. Shell Programming and Scripting

Perl Database access

Hi, I tried to run this code but it isnt giving me any output or errors. My aim is to retrieve the row based on the flag name(this is the primary key). flag_test is my table This is how i ran it: perl read_db.pl flag1 flag1 is the criteria in where clause -------- this is my... (2 Replies)
Discussion started by: mercuryshipzz
2 Replies

7. Shell Programming and Scripting

Automating Database scripts in UNIX

Hi everybody, can someone please suggest me how to implement the running of SQL table scripts(.sql) at a specific time automatically in UNIX ?Thanks (2 Replies)
Discussion started by: konquistador
2 Replies

8. UNIX for Dummies Questions & Answers

Automating Database scripts in UNIX

Hi everybody, can someone please suggest me how to implement the running of SQL table scripts(.sql) at a specific time automatically in UNIX ?Thanks (0 Replies)
Discussion started by: konquistador
0 Replies

9. HP-UX

Automating Database scripts in UNIX

Hi everybody, can someone please suggest me how to implement the running of SQL table scripts(.sql) at a specific time automatically in UNIX ?Thanks (0 Replies)
Discussion started by: konquistador
0 Replies

10. UNIX for Dummies Questions & Answers

microsoft access database on Unix

Hello, I am a newborn baby to Unix and I was told that it was possible to have Microsoft Access databases on a Unix web server. I am using Perl to interface and query the Access database, which puts the information into the appropriate fields of a web page. Then updated information is submitted... (1 Reply)
Discussion started by: spiderling
1 Replies
Login or Register to Ask a Question