oracle

Cannot Connect with TOAD but Can with Other Tools/Apps

I am able to connect to an Oracle database using several tools, but am unable to connect using Toad for Oracle 8.5.3 (though before a login/logout to Windows I was able to). I am not using TNSNAMES.ORA to connect. I have two Oracle homes: C:\Oracle\product\10.2.0\client_1 (OraClient10g_home1) and C:\Oracle\product\10.2.0\client_...

Is there a way to view relationships in Oracle SQL Developer?

I want to find which tables are related to a specific table. I can see all the foreign key constraints easily enough, but what about table for which the table I am looking at is the primary key table and the other table is the referenced table. ...

Oracle vs. Hypersonic SQL

I need to select by date in a SQL query, for example SELECT * FROM foo WHERE date = '2009-09-09' That query works in my Hypersonic test database, but not Oracle, which seems to requires: SELECT * FROM foo WHERE date = TO_DATE('2009-09-09', 'yyyy-mm-dd') Is there a way to select by date uniformly across these two databases? ...

Openquery works much faster than a query straight to a linked table

Trying to figure out why there is such a significant difference between select * from linkedserver..tablename and select * from openquery(linkedserver, select * from tablename). 4 minutes vs 13 seconds. ...

What Does This Oracle SQL Statement Do?

I am migrating a MSSQL script to Oracle SQL and I can't figure out what one line in the script is doing. I am very new to SQL. CREATE TABLE HA_BACKUP_PROCESSES ( ID numeric (10, 0) NOT NULL , PROCESS_ID numeric (10, 0) NOT NULL , BACKUP_PROCESS_ID numeric (10, 0) NOT NULL , CONSTRAINT HA_BCK_PROC_PK PRIMARY KEY (ID)...

oracle 10g xe install on ubuntu. problems logging in and creating database

objective: to install oracle 10g xe on ubuntu. method followed :www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html problem: The installation went fine and at 1 point it asked me for a password for the system account and I gave it lets say 'securepassword' that. Now, I have 2 problems: I want to create a database. There is ...

Using a ref cursor as input type with ODP.NET

Hi all I'm trying to use a RefCursor as an input parameter on an Oracle stored procedure. The idea is to select a group of records, feed them into the stored procedure and then the SP loops over the input RefCursor, doing some operations to its records. No, I can't select the records inside the SP and thus avoid having to use the RefCur...

How to encode string in Oracle?

Hello, I have problem with encoding data in Oracle database. I want to xor string with another string (mask) and then encode it with base64. In Python this looks like: def encode_str(s, mask): xor_mask = mask while len(xor_mask) < len(s): xor_mask += mask chrs2 = [] for i in range(len(s)): chrs2.append(chr(or...

How to automatically store data from Oracle in SQL Server (according to a schedule)

Hello, I'm new here, so sorry, if my question is too basic. However, maybe you have some advice, example, links, which could help me... I'm trying to find something helpfull for few days, but no results as for now. I'm working in a distributed environment. I have a Oracle server hundreds of miles away and a MS SQL server close to me. I'...

Creating a logging handler to connect to Oracle?

So right now i need to create and implement an extension of the Python logging module that will be used to log to our database. Basically we have several python applications(that all run in the background) that currently log to a random mishmash of text files. Which makes it almost impossible to find out if a certain application failed o...

Faster 'select distinct thing_id,thing_name from table1' in oracle

I have this query: select distinct id,name from table1 For a given ID, the name will always be the same. Both fields are indexed. There's no separate table that maps the id to the name. The table is very large (10 of millions of rows), so the query could take some time. This query is very fast, since it's indexed: select distinct...

Is there an Oracle wrapper for Python that supports xmltype columns?

It seems cx_Oracle doesn't. Any other suggestion for handling xml with Oracle and Python is appreciated. Thanks. ...

SQL Server 2000/2005 - Maintaining Development Version and Production Version

I am used to using Oracle Designer by creating database object definitions, then creating DDL SQL required by connecting to a database instance. For eaxmple, when adding a new column to a table, first I add it to the table definition, then generate the DDL SQL against the development version and run it, then after testing I point to the...

Rookie Oracle Variable Question

I have a simple SQL Statement that works perfectly in SQL Server: DECLARE @ID VARCHAR(10) SET @ID = '12345' SELECT * FROM theTable WHERE ID = @ID Can someone please tell me how to do this extremely basic thing in Oracle? ...

Using Projections on Formula Properties

I have a property in my XML mapping file like <property name="CreatedByLogin" formula="(select x.fst_name || ' ' || x.last_name from sebl_dev.S_CONTACT x where x.ROW_ID=CREATED_BY)" type="String" /> and I want to use a projection on this particular name like .Add(Projections.Property("CreatedByLogin"), "CreatedByLogin") and I do g...

How to get Oracle create table statement in SQL*Plus

I have a table that exists in an Oracle database, but doesn't show on my list of tables in the tool SQL Developer. However, if I go to SQL*Plus, and do a select table_name from user_tables; I get the table listed. If I type desc snp_clearinghouse; it shows me the fields. I'd like to get the create statement, because I need to a...

relations in oracle objects?

how to make relations 1 to n and n to n in oracle objects? ...

Using Oracle session state, and SessionStateStoreProviderBase in my web.config

Hey guys, Does anyone know or ran into an issue with images not getting rendered when using a custom session state. (I'm using oracle session provider) <sessionState cookieless="UseUri" timeout="20" mode="Custom" customProvider="MyOracleSessionStateStore" regenerateExpiredSessionId="true"> <providers> <add name="MyOracleSessionStateSto...

How can I efficiently query for contiguous sets of dates in my data set?

site_id | start_date | end_date 1 | oct 1, 08 | oct 2, 08 1 | oct 2, 08 | oct 3, 08 ... 1 | oct 30, 08 | oct 31, 08 2 | oct 1, 08 | oct 2, 08 2 | oct 2, 08 | oct 3, 08 ... 2 | oct 30, 08 | oct 31, 08 I have a table that contains 1 record per site per day of the month (per month of the year)...

What is the best online SQL tutorial for learning to write complex reporting queries?

My SQL skills are rather limited and since I find myself working with a DB (Oracle) a lot lately I would like to get beyond the basic select statements. I want to write queries that do things like get data from multiple tables, sum quantities, compare dates, group, filter etc. What sites can you recommend for getting SQL reporting skil...