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_OBJECT(3)							 1						       DB2_FETCH_OBJECT(3)

db2_fetch_object - Returns an object with properties representing columns in the fetched row

SYNOPSIS
object db2_fetch_object (resource $stmt, [int $row_number = -1]) DESCRIPTION
Returns an object in which each property represents a column returned in the row fetched from a result set. PARAMETERS
o $stmt - A valid stmt resource containing a result set. o $row_number - Requests a specific 1-indexed row from the result set. Passing this parameter results in a PHP warning if the result set uses a forward-only cursor. RETURN VALUES
Returns an object representing a single row in the result set. The properties of the object map to the names of the columns in the result set. The IBM DB2, Cloudscape, and Apache Derby database servers typically fold column names to upper-case, so the object properties will reflect that case. If your SELECT statement calls a scalar function to modify the value of a column, the database servers return the column number as the name of the column in the result set. If you prefer a more descriptive column name and object property, you can use the AS clause to assign a name to the column in the result set. Returns FALSE if no row was retrieved. EXAMPLES
Example #1 A db2_fetch_object(3) example The following example issues a SELECT statement with a scalar function, RTRIM, that removes whitespace from the end of the column. Rather than creating an object with the properties "BREED" and "2", we use the AS clause in the SELECT statement to assign the name "name" to the modified column. The database server folds the column names to upper-case, resulting in an object with the properties "BREED" and "NAME". <?php $conn = db2_connect($database, $user, $password); $sql = "SELECT breed, RTRIM(name) AS name FROM animals WHERE id = ?"; if ($conn) { $stmt = db2_prepare($conn, $sql); db2_execute($stmt, array(0)); while ($pet = db2_fetch_object($stmt)) { echo "Come here, {$pet->NAME}, my little {$pet->BREED}!"; } db2_close($conn); } ?> The above example will output: Come here, Pook, my little cat! SEE ALSO
db2_fetch_array(3), db2_fetch_assoc(3), db2_fetch_both(3), db2_fetch_row(3), db2_result(3). PHP Documentation Group DB2_FETCH_OBJECT(3)
All times are GMT -4. The time now is 08:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy