Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ORA-12154: TNS:could not resolve service name Post 302369919 by temhem on Tuesday 10th of November 2009 01:36:03 AM
Old 11-10-2009
thanx radoulov,pludi,jim.

i tried it on production environment and result is successfully.

But now, i need to assign result of sql to variable. How can i do this?

Assume that "select t.deger from parametre t where t.id=30" is return me 100 value,
i need to assign 100 to x variable.
How can i do this.

by the way my sql expression is in the umtt.sql

Thanx for helping
 

10 More Discussions You Might Find Interesting

1. Linux

Try thousand times could not resolve famous ORA-12514 error

It is related to Linux, Oracle 9.2.0. I am new to Oracle. I am trying to connect to Oracle database say A, but as I am running this command dbstart the error is “ORA-12514: TNS: listener could not resolve SERVICE_NAME given in connect descriptor” I have successfully started lsnrctl. Here... (3 Replies)
Discussion started by: yajneshilu
3 Replies

2. Linux

After famous ORA-12514 error, another erro TNS-12535

Recently I was struggling to resolve ORA-12514 error, after I solved that there is a another error "TNS-12535: TNS: operation timed out". For your information in my machine I have disabled firewall & also added SQLNET.EXPIRE_TIME = 10. But the problem is still persists. Again all your help is... (2 Replies)
Discussion started by: yajneshilu
2 Replies

3. Shell Programming and Scripting

Need to capture the service name from tnsnames.ora and create connect string

ghkjkjoj (4 Replies)
Discussion started by: chetankelvin
4 Replies

4. UNIX for Advanced & Expert Users

TNS no listener error when connecting to a new DB

Hi all We connect to 10 Oracle Databases from our UNIX box through the regular TNS file we have on any oracle client installation. Recently we acquired a new connection. I added the entries as usual to the TNS file. The connection fails with the below error message ORA-12541: TNS:no... (2 Replies)
Discussion started by: b_sri
2 Replies

5. Solaris

maxuprc and maxusers - ORA-27300, ORA-27301, ORA-27302

Hi all, Am intermittently getting the following errors on one of my databases. Errors in file /oracle/HRD/saptrace/background/hrd_psp0_13943.trc: ORA-27300: OS system dependent operation:fork failed with status: 12 ORA-27301: OS failure message: Not enough space ORA-27302:... (1 Reply)
Discussion started by: newbie_01
1 Replies

6. UNIX for Advanced & Expert Users

grep all ORA errors except one ORA error

Hi - I am trying to grep all "ORA" errors in a log files.I have to grep all ORA errors except one error for example ORA-01653.How can exclude that error in "grep" command? In following "grep" command I want to exclude "ORA-01653" error grep -i ORA alert.log >>/tmp/ora_errors.txt ... (7 Replies)
Discussion started by: Mansoor8810
7 Replies

7. Red Hat

TNS Timeout Error when connecting to SQLPLUS through scripts only

Hi, I am facing a strange issue when connecting to SQLPLUS via a shell scripts. I am using Linux 2.6.18-274.18.1 and gbash shell. When I connect to SQLPLUS through scripts then it throws TNS Time Out error ""sometimes"" and connects successfully other times.This is only happening when... (9 Replies)
Discussion started by: aashish.sharma8
9 Replies

8. Shell Programming and Scripting

Grep all lines with the string "TNS-" but skip those with "TNS-12514"

Platform: Oracle Linux 6.3 From a log file, I want to grep all lines with the pattern "TNS-" but I want to skip those with the pattern "TNS-12514" . How can I do this ? (3 Replies)
Discussion started by: John K
3 Replies

9. Shell Programming and Scripting

Replacing old TNS entries with New one in multiple files

I have requirement to replace old TNS entries with New one in multiple files. one file may contain more then one occurrence of tns. Example: Below is the one of occurrence in a current file(s). i am interested to replace only red part. <connection-pool name="Google_APP_CP"... (4 Replies)
Discussion started by: KDDubai333
4 Replies

10. Red Hat

Ora-27603:ora-27626:

Hi, User claim that job is running slow from their end. I DBA found in database the below errors in alert log file. ORA-27603: Cell storage I/O error, I/O failed on disk o/192.168.10.3/RECO_DM01_CD_01_drm01 at offset 13335789568 for data length 1048576 ORA-27626: Exadata error: 2201 (IO... (2 Replies)
Discussion started by: Maddy123
2 Replies
DB2_FETCH_ROW(3)							 1							  DB2_FETCH_ROW(3)

db2_fetch_row - Sets the result set pointer to the next row or requested row

SYNOPSIS
bool db2_fetch_row (resource $stmt, [int $row_number]) DESCRIPTION
Use db2_fetch_row(3) to iterate through a result set, or to point to a specific row in a result set if you requested a scrollable cursor. To retrieve individual fields from the result set, call the db2_result(3) function. Rather than calling db2_fetch_row(3) and db2_result(3), most applications will call one of db2_fetch_assoc(3), db2_fetch_both(3), or db2_fetch_array(3) to advance the result set pointer and return a complete row as an array. PARAMETERS
o $stmt - A valid stmt resource. o $row_number - With scrollable cursors, you can request a specific row number in the result set. Row numbering is 1-indexed. RETURN VALUES
Returns TRUE if the requested row exists in the result set. Returns FALSE if the requested row does not exist in the result set. EXAMPLES
Example #1 Iterating through a result set The following example demonstrates how to iterate through a result set with db2_fetch_row(3) and retrieve columns from the result set with db2_result(3). <?php $sql = 'SELECT name, breed FROM animals WHERE weight < ?'; $stmt = db2_prepare($conn, $sql); db2_execute($stmt, array(10)); while (db2_fetch_row($stmt)) { $name = db2_result($stmt, 0); $breed = db2_result($stmt, 1); print "$name $breed"; } ?> The above example will output: cat Pook gold fish Bubbles budgerigar Gizmo goat Rickety Ride Example #2 i5/OS recommended alternatives to db2_fetch_row/db2_result On i5/OS it is recommended that you use db2_fetch_both(3), db2_fetch_array(3), or db2_fetch_object(3) over db2_fetch_row(3)/db2_result(3). In general db2_fetch_row(3)/db2_result(3) have more issues with various column types in EBCIDIC to ASCII translation, including possible truncation in DBCS applications. You may also find the performance of db2_fetch_both(3), db2_fetch_array(3), and db2_fetch_object(3) to be superior to db2_fetch_row(3)/db2_result(3). <?php $conn = db2_connect("","",""); $sql = 'SELECT SPECIFIC_SCHEMA, SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_TYPE, ROUTINE_CREATED, ROUTINE_BODY, IN_PARMS, OUT_PARMS, INOUT_PARMS, PARAMETER_STYLE, EXTERNAL_NAME, EXTERNAL_LANGUAGE FROM QSYS2.SYSROUTINES FETCH FIRST 2 ROWS ONLY'; $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); while ($row = db2_fetch_both($stmt)){ echo "<br>db2_fetch_both {$row['SPECIFIC_NAME']} {$row['ROUTINE_CREATED']} {$row[5]}"; } $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); while ($row = db2_fetch_array($stmt)){ echo "<br>db2_fetch_array {$row[1]} {$row[5]}"; } $stmt = db2_exec($conn, $sql, array('cursor' => DB2_SCROLLABLE)); while ($row = db2_fetch_object($stmt)){ echo "<br>db2_fetch_object {$row->SPECIFIC_NAME} {$row->ROUTINE_CREATED}"; } db2_close($conn); ?> The above example will output: db2_fetch_both MATCH_ANIMAL 2006-08-25-17.10.23.775000 2006-08-25-17.10.23.775000 db2_fetch_both MULTIRESULTS 2006-10-17-10.11.05.308000 2006-10-17-10.11.05.308000 db2_fetch_array MATCH_ANIMAL 2006-08-25-17.10.23.775000 db2_fetch_array MULTIRESULTS 2006-10-17-10.11.05.308000 db2_fetch_object MATCH_ANIMAL 2006-08-25-17.10.23.775000 db2_fetch_object MULTIRESULTS 2006-10-17-10.11.05.308000 SEE ALSO
db2_fetch_array(3), db2_fetch_assoc(3), db2_fetch_both(3), db2_fetch_object(3), db2_result(3). PHP Documentation Group DB2_FETCH_ROW(3)
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy