When I attempt this query:
$query = "SELECT * FROM user_objects WHERE object_type = 'TABLE'";
... I get an empty result set.
I have error_reporting() set to E_ALL, so I would assume that if it wasn't connecting correctly, I would be getting an error... right?
I'm using a class given to me by a higher-up that they use for everything,...
Hey guys,
I need to figure out a way to back up and also migrate our Oracle database from our production schema to the dev schema and the other way around.
We have bunch of config tables that drive how systems on our platform run, and when setting up new systems or doing maintenance, we need to update our config tables. We want to be ab...
I'm trying to connect to a load-balanced virtual host specified in tnsnames.ora in my Grails application in DataSource.groovy, with no luck - it (obviously) throws an "Unknown Host Specified" exception.
The tnsnames entry looks like this
someServiceName =
(DESCRIPTION_LIST =
(FAILOVER=ON)
(LOAD_BALANCE=ON)
(DESCRIPTION =
...
I've created a simple example of a table with a xmltype column
--set up the able
CREATE TABLE dept (name varchar2(20), employees XMLTYPE);
--insert a test row
INSERT INTO dept VALUES (
'Sales',
XMLTYPE.createxml(
'<?xml version="1.0" encoding="UTF-8"?>
<People>
<Person>
...
How do I create an ODBC connection using sp_addlinkedserver in SQL using a DSN-LESS connection string?
I assume I am doing something wrong with syntax, here is how I set up the connection:
EXEC master.dbo.sp_addlinkedserver
@server = N'SERVER_NAME',
@srvproduct=N'Oracle',
@provider=N'MSDASQL',
@provstr=N'DataSource=(DESCRIPTION=(AD...
I'm currently trying to connect to an Oracle database. I can connect fine on my development machine, but when I deploy to my Win2k3 sp2 server I get the following error.
Faile to open connection... Oracle.DataAccess.Client.OracleException ORA-12541: TNS:no liestener at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 err...
Hi.
Im using a cursor to go over some data but I need to declare diferents sql statments according to a parameter. The problem seems to be that Im no able to use if statmets into this declaratios:
DECLARE
CURSOR c IS SELECT * FROM TRAFICO
IF TipoConsulta = 'mes' then
BEGIN
WHERE TO_CHAR(FECHA...
I've been assigned the task of making our Java web application work with Oracle Database. I am not sure where to start. I was hoping for an experience similar to working with MySQL or PostgreSQL, but no such luck.
The answer to this question will be list of steps for installing and deploying an Oracle Database for development use, basic...
My Scenario:
Schema name: schema1
Package name: pkg_system
procedure name: proc1
Now I am trying to create a synonyms for my proc1 as below
CREATE PUBLIC SYNONYM call_proc FOR schema1.pkg_system.proc1;
...but it gave me syntax error.
ORA-00933: SQL command not properly ended
I changed the code as below:
CREATE PUBLIC SYNONYM c...
how can do assume sub query as table in mssql?
...
I'm new in Oracle and I really don't have a clear idea how to do this.
The database is this one...
CREATE OR REPLACE TYPE personUdt4 AS OBJECT(
pid varchar(11),
firstName varchar(20),
lastName varchar(20),
dob date)
NOT FINAL;
/
CREATE OR REPLACE TYPE locationUdt4 AS OBJECT(
street varchar(30),
bldg varchar(5),
room varchar(5)...
I want to update the same record using the trigger which fires due to insertion of that record.
When I try to do that using the following code it gives an error
DROP TRIGGER CONTROLLER_UPLOADER;
CREATE OR REPLACE TRIGGER CONTROLLER_UPLOADER
after insert ON CONTROLLER for each row
begin
UPDATE CONTROLLER SET STATUS = 'STARTED' W...
Hi,
Currently,I have this objective to meet. I need to query the database for certain results. After done so, I will need to compare the records:
For example: the query return me with 10 rows of records, I then need to compare: row 1 with 2, row 2 with 3, row 3 with 4 ...
row 9 with 10.
The final result that I wish to have is 10 or less...
Hi !
I have a problem.
Well, I have an VB6 app that connects to an oracle database. Normally it uses just one session to connect to the database, but after running an update query on a table, it opens another one, on wich it runs just one query : SELECT VALUE
FROM SYS.NLS_DATABASE_PARAMETERS
WHERE PARAMETER = 'NLS_NCHAR_CHARACTERSET'...
Hello in the PL/SQL Developer beneath the category synonyms there is a tab (referenced by), which displays referenced views of a synonym.
On my system there is no PL/SQL Developer installed. So is there any function in the normal Oracle SQL Developer or a query how I can retrieve the same information as in the PL/SQL Developer ?
Thanks...
I have a stored procedure with a parameter name which I want to use in a where clause to match the value of a column i.e. something like
where col1 = name
Now of course this fails to match null to null because of the way null works. Do I need to do
where ((name is null and col1 is null) or col1 = name)
in situations like this or i...
I've just started a job and have identified an issue in which the database isn't currently being backed up properly so to speak. We are doing one back up every 6 hours that uses the Oracle native backup utility, but we were also sold a process by a company in which they stated that they could in essence perform "warm" backups of our dat...
Any idea to run those kind of scripts from Oracle PL/SQL? Any solution would be appreciated. Thanks!
...
I would like to know how to check if a ref cursor returns data.
Let's say I have the following code in a PL/SQL package:
type refcursor is ref cursor;
procedure Foo(cursorresult out refcursor) is
begin
open cursorresult for
select *
from table t
inner join t2 on t.id = t2.id
where t.column1 is null;
end;
proced...
Im programing a job in oracle in order to execute a store procedure, but when the time comes it just does not happend any thing for no reason.
Is there some kind of log where I can see if an error happend or something?
Im using the dbms_job package to create the job
Tnks.
...