I'm trying to connect to Oracle from OS X. I have this file here:
/usr/local/oracle/network/admin/TNSNAMES.ORA
Online I've seen references to this file with the filename in both upper and lower case. Which is correct?
...
On OS X should my ORACLE_HOME env variable be...
/usr/local/oracle
or...
/usr/local/oracle/instantclient_10_2
...
I've been trying to get sqlplus to connect to Oracle from my OS X machine. I asked another question about it here.
One person suggested that I try telnet. Consulting the man page, I tried:
[ ethan@gir ~ ]$ telnet DBHOST:1521
Trying xxx.xxx.xxx.xxx...
telnet: connect to address xxx.xxx.xxx.xxx: Operation timed out
telnet: Unable to conn...
I understand that database views are read-only, or at least read-only by default.
Is it possible to enable the change of data brought by an oracle view?
Rephrasing: If I make a view of just one table, just to hide some columns, will changes to this data be updated on the table?
...
My query:
CREATE VIEW cambiodatos AS
SELECT
a.last_name||','||a.first_name AS "Nombre",
a.salary AS "Salario",
b.name AS "Nombre Departamento",
c.name AS "Nombre de Region"
FROM
s_emp a, s_dept b, s_region c
WHERE
a.dept_id = b.id AND b.region_id = c.id
UPDATE
cambiodatos
SET
name = 'North Am...
Oracle's instructions specify setting LD_LIBRARY_PATH. This makes my application dependent on random users' configuration and is very troublesome to set up.
How can I avoid having to set any environment variables?
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html
related note for OS/X: http:...
There's several pages on the net that discuss this, but most are out of date or inaccurate in some what.
What's the scoop?
...
and how does it differ from the regular connection string?
update: name/pass@//host:1521/instance
...
I have the following two PL/SQL Oracle Queries that return a count:
SELECT count(*)
INTO counter_for_x
FROM Table_Name
WHERE Column_Name = 'X';
SELECT count(*)
INTO counter_for_y
FROM Table_Name
WHERE Column_Name = 'Y';
Is it possible to write a single query that returns both the counts and populates the respective counter ...
Calling all Oracle Gurus!
I am in the process of clustering a well tested application on WebSphere. The application in question made it about half way through processing 1k of JMS messages from a queue before this happened.
---- Begin backtrace for Nested Throwables
java.sql.SQLException: ORA-01654: unable to extend index DABUAT.INDEX1...
Say I have the following data
Name Value
===============
Small 10
Medium 100
Large 1000
Imagine that these represent the volumes of boxes. I have some items that I want to put in the boxes, and I want the smallest box possible. I need an SQL query that will:
Return the row with the smallest row greater than my ...
CREATE TABLE DEPARTMENTS (
dept_num NUMBER (8)
dept_name VARCHAR2 (20) NOT NULL,
dept_loc VARCHAR2 (25),
dept_phone CHAR (13),
CONSTRAINT dept_num_pk PRIMARY KEY (dept_num)
) ;
...
I am working with an Oracle database that stores HTML as a Long datatype. I would like to query the database to search for a specific string within the HTML data stored in the Long.
I tried, "select * from TABLE where COLUMN like '%form%'". This causes the following Oracle error because "like" is not supported for Long datatypes.
O...
I have SQL SERVER database that have a huge proliferation of stored procedures. In my Oracle databases it's not a problem because Oracle supports packages.
Even if SQL Server didn't support the cool features of packages like State and encapsulation, what do programmers do to get around this obvious deficiency?
...
Which SQL would be faster to validate if a particular column has a null value or not, why?
1) SELECT * FROM TABLE1 WHERE COL1 IS NULL
Execute this query and then check if you are able to read any records. If yes there are null values.
2) SELECT COUNT(COL1) FROM TABLE1 WHERE COL1 IS NULL
Read the count which is returned to determine i...
Suppose I am doing the following:
using (OracleConnection conn = new OracleConnection(connStr))
{
OracleTransaction trans = conn.BeginTransaction();
OracleCommand command = new OracleCommand(cmdTxt, conn, trans);
// this statement is executed in a transaction context:
command.ExecuteNonQuery();
}
// the using statement w...
I am trying to decide between two possible implementations and am eager to choose the best one :)
I need to add an optional BLOB field to a table which currently only has 3 simple fields. It is predicted that the new field will be used in fewer than 10%, maybe even less than 5% of cases so it will be null for most rows - in fact most of...
I have a table with a RAW column for holding an encrypted string.
I have the PL/SQL code for encrypting from plain text into this field.
I wish to create a trigger containg the encryption code.
I wish to 'misuse' the RAW field to pass the plain text into the trigger. (I can't modify the schema, for example to add another column for th...
I need to dynamically populate an Oracle cursor (Oracle 10g). The SQL statement changes, based off of the input value to pull from different tables, and columns. What I don't want to do is have to maintain a temporary table that I truncate and load everytime the sproc is executed. Here is what I am currently doing, but if there is ano...
Hello Everyone,
I have set up Oracle Linked server on Sql Server 2005 box using Oracle provider oledb and its working fine from sql server 2005 to oracle 9i, i.e. When i run distributed query from sql server i get data from oracle server to sql server. Now I don't have any clue how do i run distributed query from Oracle server and get d...