SQL & PL/SQL :: Migrate Sybase To Oracle Conversion

Apr 23, 2010

i want to migrate sybase stored procedure to oracle stored procedure.

sybase stored procedure:

create proc checkcontract @titleid tid
as
delete from titile where titile_id=@titleid
return 0

we need to migrate this procedure to oracle stored procedure. If we are using return 0 in SP in oracle means, it returns the end of the procedure statements(according to oracle statements). but sybase indicates that return 0 does not return 0 value during the run time. The return 0 implies that SP completed successfully. In oracle, i have converted stored procedure into SP and also stored functions.

Oracle Scripts:
Stored Procedure:

create or replace procedure checkcontract(v_titile varchar2)
as
begin
delete from titile where titile_id=v_titleid;
end;
/

Stored Functions:

create or replace functions checkcontract(v_titile varchar2)
as
return number
begin
delete from titile where titile_id=v_titleid;
return 0
end;

Give the comments which one is correct or accurate.

Oracle SQL developer also recommeds STORED FUNCTION. But in my application code, don't assign any output variable to this procedure. If i am using Stored Functions, we need to assign value and assign the output of the SF. we don't want to change the application code.

View 4 Replies


ADVERTISEMENT

SQL & PL/SQL :: Sybase To Oracle Conversion

May 6, 2010

I am converting sybase to oracle database. during the migration, i have small doubt in triggers.

sybase source

create trigger testss_dt
on test
for delete
as
if @@rowcount = 0
return
insert into test
select id from deleted
return

I have converted oracle code here

create or replace trigger testss_dt
before delete on test
for each row
begin
insert into test
values(:old.test);
end;

But i have ignores @@rowcount concepts in oracle. what @@rowcount indicates in trigger?

View 10 Replies View Related

SQL & PL/SQL :: What Would Be The Sybase Str Equivalent In Oracle

Mar 4, 2010

What would be sybase str(approx_numeric [, length [, decimal] ]) equivalent in oracle.

Sybase call :

select str(10000.5555, 6, 3) as Test.

Tset
-------
10001

View 4 Replies View Related

Zero Downtime Migration From Oracle To Sybase

Aug 3, 2012

Is there any way/ tool to migrate from oracle to sybase with Zero Downtime?

View 2 Replies View Related

SQL & PL/SQL :: Difference Between Sybase Raise Error And Rasie_application_error In Oracle?

May 6, 2010

I try to convert sybase raiseerror into oracle raise application error.

sybase code :

raiserror 20100 "can't add a contact number that's in the contact"

oracle

raise_application_error (
-20002, ':can''t add a contact number that''s in the contact');

the sybase error number 20100 unable to use in oracle due to the limitation of error number.RAISE_APPLICATION_ERROR should be negative and between -20000 and -20999.

how to use sybase error number in oracle?

View 2 Replies View Related

Replication :: Golden Gate - Replicate Data From Oracle To Sybase

Oct 17, 2007

Implemented the Golden Gate replication tool? In particular, to replicate data from Oracle to Sybase?

No details are needed, just a quick nod indicating "yes, it has been done successfully".

View 1 Replies View Related

Server Utilities :: Migration From Sybase To Oracle 1 Table Fails With SQL Error ORA-01841

Jul 17, 2012

im trying to migrate Sybase 12.5 to oracle 11G R2 on linux all tables are fine expect one which fails with error

"SQL Error: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
01841. 00000 - "(full) year must be between -4713 and +9999, and not be 0"
*Cause: Illegal year entered
*Action: Input year in the specified range"

i have change the data type from CHAR to VARCHAR2 etc as for the datatype date shows as date on the tool - I'm using sqldeveloper from oracle.

View 8 Replies View Related

Security :: Moving Application Security To Oracle From Sybase

Aug 18, 2010

In Sybase, my application was using system tables to perform application login security. Those tables obviously don't exist in Oracle. I am looking for ways to provide the following functionality in an Oracle world:

1. How to determine 'x' days of inactivity based on "last login date"?

2. How to determine when a new user logs in for the first time and force them to change their password?

3. If we need to reset a users password, how can we require the user to change their password?

4. Is there any other option other than storing a user-id/password in the application code for locking a user's account if their account needs to be locked due to inactivity?

5. In the USER_USERS view there is a status column. What the different status's can be?

View 3 Replies View Related

Migrate From Oracle To Postgres

May 4, 2011

I want to migrate my database from oracle to postgres.There is a lot of compatibility issues. I heard about the tool ora2pr. have been trying to use it but not able to achieve my goal.Has any one used this tool?

View 1 Replies View Related

SQL & PL/SQL :: Migrate Oracle DB To MS/Sql Server?

Mar 5, 2010

We have and oracle 8i database that has an application that has part of it developed by PL/SQL and the other part on portal 309,is it possible to convert to MS/Sql Database,what tool can we use or what steps do we have to go through to achieve this.

View 1 Replies View Related

PL/SQL :: How To Migrate From Sql Server To Oracle

Aug 8, 2012

My requirement is we are planning to migrate the sql server data to oracle. what is the way to do migration from sql server to oracle. if any tools are there for migration.Previous we used sql developer( which is provided by oracle i.e. freeware ) tool but it was created only table structures not ported any data.

View 3 Replies View Related

Migrate MySQL 5.0 Objects To Oracle 11g

Jan 23, 2013

I`m migrating a mysql 5.0 database to Oracle 11g. I used Oracle's Sql developer and with a workaround i could convert tables, constraints, indexes, some triggers and created sequences.

My question is, what happen with stored procedures and functions, they didn't pass. I've been searching and i found here hey have to be rewritten. Is there any way to convert those objects ? I can't afford to do it manually because the mysql database has almost 400 of them and they aren't small.

View 2 Replies View Related

Migrate A DB ORACLE 8i To 10g (things To Change)?

Jul 14, 2010

In this moment, I am migrateing a DB ORACLE 8i to ORACLE 10g.I have read that this version (10g) no need HINT SENTENCE.For this reason I am looking for a SCRIPT to remove (or disable) all of HINTS from the DB (10g), But I could not.

View 2 Replies View Related

Oracle Documentation To Migrate RAC To NON-RAC Keeping ASM

Aug 29, 2013

Oracle Documentation to Migrate RAC to NON-RAC keeping ASM.

View 2 Replies View Related

How To Migrate Postgres DB Schema To Oracle 11g

Oct 10, 2012

how to Migrate Postgres DB Schema to Oracle 11 g?

View 1 Replies View Related

Migrate MySQL And Access Databases Over To Oracle 9i

Oct 2, 2008

I need to migrate MySQL and Access databases over to Oracle 9i. Is there a tool that will do this and also migrate sql scripts?

I heard of Oracle Workbench as one tool I could use?

View 4 Replies View Related

Server Utilities :: Migrate Table From 10g Xe To Oracle 9i?

Dec 1, 2011

how to migrate a table from 10g xe database to a oracle9i database.Both the database are stand alone and we cannot create a dblink.

View 2 Replies View Related

Backup & Recovery :: How To Migrate Oracle Database From 10g To 11g

May 25, 2012

how to migrate oracle database from 10g to 11g

View 1 Replies View Related

SQL & PL/SQL :: Migrate Data From Oracle Server To MySql?

Feb 1, 2013

I need to migrate data from oracle server to MySql.

View 14 Replies View Related

Server Administration :: Migrate Two Different Databases To Oracle?

Jul 11, 2012

I have to migrate two different databases to oracle.i have made two Migration Repository for each to do the migration, migration is done.but i would like to know can it be done with one migration repository.if yes then with one is best way to do it.data of two databases is different but table and sp are 99% same.

View 3 Replies View Related

SQL Server To Oracle Conversion

Aug 29, 2013

I have one query in SQL server. I want to convert that query to Oracle. Well i am not that good with writing queries in Oracle. Following is the query in SQL server.

DECLARE @StartYear AS INT = 2010;
DECLARE @EndYear AS INT = 2014;

WITH
years
AS (SELECT YYYY = @StartYear
UNION ALL
SELECT yyyy + 1
FROM years
WHERE yyyy < @EndYear)
[code].......

Which Gives output in following format.

id_datedateYearMonthNumberMonthDayOfMonthDayOfWeekNumberDayOfWeekWorkingDay
201001011/1/201020101January16Friday1
201001021/2/201020101January27Saturday0
201001031/3/201020101January31Sunday0
201001041/4/201020101January42Monday1
201001051/5/201020101January53Tuesday1

View 3 Replies View Related

Conversion From SQL Server To Oracle

Nov 6, 2011

is there any licensed version tool available to convert objects from sql server to oracle especially procedures? I have tried with open source tools but that tool didn't convert properly.

View 7 Replies View Related

Server Administration :: Migrate And Upgrade Oracle 9i Database To 10g?

Mar 10, 2011

I am looking to migrate and upgrade an Oracle 9i database to 10g.

Would there be any fallout if the characterset were changed from US7ASCII to UTF8?

View 2 Replies View Related

Migrate From Oracle 10gR2 In Windows To 11gR2 In Linux

Jun 22, 2012

Question: to migrate from oracle 10gR2 in Windows to oracle 11gR2 in Linux . Steps are:

1.     need to expdp all schemas/users from oracle 10gR2 in Windows,
2.     then impdp each schema/user into oracle 10gR2 in Linux first,
3.     then upgrade the oracle 10gR2 in Linux to oracle 11gR2 in Linux ?
4.     Do I need to pre-create all the same tablespaces first in oracle 10gR2 in Linux ?

Is it correct ? or I can migrate straight all schemas/users from oracle 10gR2 in Windows to oracle 11gR2 in Linux using impdp ?

View 5 Replies View Related

SQL & PL/SQL :: Oracle Database To Mysql Conversion

Dec 21, 2012

Is it possible to convert oracle data base to MySql?

View 1 Replies View Related

SQL & PL/SQL :: Oracle Date Conversion Errors

Mar 14, 2011

I am having a strange issue with date conversion. The errors encountered are :

PLS-00382: expression is of wrong type
PLS-00306: wrong number or types of arguments in call to '>'

The situation or test case is as follows:

create table sand_programs(prog_code varchar2(20), prog_end_dt date);

create table sand_program1(prog_code varchar2(20), filing_date number(15));
Result : Both the tables are created.

Now I create a procedure below as mentioned, to check if the filing_date is greater than the prog_end_dt or not.If the filing_date is greater than prog_ end_dt, then it should go to the 1st "dbms_output.put_line" message else it should go to the 2nd "dbms_output.put_line" message.

Here's my procedure:

create or replace procedure test_sand(p_program_cd in number) is
v_prog_end_dt date;
v_filing_date number;
begin
[code]....

View 6 Replies View Related

SQL & PL/SQL :: Date Conversion From Unix To Oracle

Jun 14, 2010

I have a UNIX shell script as following,

#runs the selected process
${ORACLE_HOME}/bin/sqlplus -s ${USER_PASS} >${TMP_FILE} <<EOF
set pause off
set verify off
set pagesize 0
set linesize 2000
set timing off
[code].........

I am passing a Date to the Oracle Procedure in `date +'%b_%d-%H:%M:%S'` format.

rmsqa813.2 /home/ashlaksh> echo `date +'%b_%d-%H:%M:%S'`
Jun_14-02:26:37

The oracle Procedure's SQL is as following,

SELECT ffdh.fiscal_doc_id INVOICE_ID,
ffdh.location_id LOCATION_ID
FROM fm_fiscal_doc_header ffdh,
fm_schedule fs
[code]........

The above SQL is not getting the data as the Date format "AND ffdh.last_update_datetime <=i_last_update_datetime " is not matching..

Do I need to convert the Date ? ( But i_last_update_datetime is DATE)

View 1 Replies View Related

JDeveloper, Java & XML :: Oracle PL/SQL Conversion

Jun 24, 2011

How to revert the following so that the output should be '<testPrice>1000</testPrice>'.

select htf.escape_sc('<testPrice>1000</testPrice>') from dual;
<testPrice>1000</testPrice>

View 4 Replies View Related

SQL & PL/SQL :: Oracle Functions Date Conversion

Jan 20, 2011

the data in the column is in below format
---------------------
2/10/2009 9:28:41 PM
mm/dd/yyyy

my requirement is
--------------------
20090210
YYYYMMDD

View 5 Replies View Related

Client Tools :: How To Migrate Data From SQL Server To Oracle Database

Jun 13, 2013

how to migrate sql server database to oracle database?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved