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
ADVERTISEMENT
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
Nov 17, 2012
I am getting bellow error message when trying to connect Sybase through Sql developer: status:failure-test failed:IO Error:The network adapter
View 1 Replies
View Related
Feb 17, 2010
why function does no raise error no_data found when call in select statement.
1) create one function.
CREATE OR REPLACE function fn_sal(v_id NUMBER) RETURN NUMBER
IS
v_sal NUMBER;
BEGIN
SELECT sal INTO v_sal FROM emp where empno=0;
RETURN v_sal;
END;
2) call it in select statement.
SELECT fn_sal(e.sal),e.* FROM emp e
select satement cause no error , it displayes all the records but null for the function cloumn.
why it not gives no_data_found error.
View 4 Replies
View Related
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
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
Jun 26, 2011
WHAT IS THE DIFFERENCE BETWEEN ORA ERROR AND LRM ERROR?
View 9 Replies
View Related
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
View Related
Aug 3, 2012
Is there any way/ tool to migrate from oracle to sybase with Zero Downtime?
View 2 Replies
View Related
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
Jul 18, 2013
I am using Apex 4.2. On a click of button a Dynamic Action is written, which calls a DB Package. The DB package has exception handlers and also the package has two output parametersError Code and Error MsgSo in my code(Dynamic Code) i make a call to the package and checks the value for Erroc Code.
Begin Package call...... If v_error_code <> '0' Then Raise SC_Error; End if;Exception When SC_Error Then RAise_Application_error(v_err_code, v_err_msg);End;
But when i run the page and I click I get an Internal exception errorOutput from Debug -- I am not sure what the Cell in Red colour means, because the package is returning a correct message (before the red line).AJAX call returned server error ORA-20003:
Customer has already been matched for Execute PL/SQL Code.4......is_internal_error: true4......apex_error_code: APEX.AJAX_ SERVER_ ERROR4.. ora_ sqlcode: -200034......ora_sqlerrm: ORA-20003: Customer has already been matched4......error_backtrace: ORA-06512: at line 41 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 973 ORA-06512: at "SYS.WWV_DBMS_SQL", line 999 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 830 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN_UTIL", line 2304 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_ACTION_NATIVE", line 442 4......component.type: APEX_APPLICATION_PAGE_DA_ACTS4......component.id: 231852037977562094......component.name: NATIVE_EXECUTE_PLSQL_CODE4.
Execute Error Handling Callout defined on Page or Application Level4...Execute Statement: begin declare l_error wwv_flow_error_api.t_error; begin l_error := wwv_flow_error_api.g_error; wwv_flow_error_api.g_error_result := apx_error_utils.handleerror ( p_error => l_error ); end; end;4......Values changed by callout:4..
An unexpected internal application error has occurred. Please get in contact with your system administrator and provide reference# for further investigation. 4..display_location: ON_ERROR_PAGE4Stop APEX Engine detected4Final commit4-1 - 59
View 4 Replies
View Related
Aug 23, 2012
Using Apex 4.1 and custom authentication based on Oracle Database users.
I want to be able to show a warning immediately after a user logs in if their password is due to expire in xx days. Oracle raises a warning (ORA-28002) but I don't know how to handle that from the standard Apex login page.
View 1 Replies
View Related
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
Aug 3, 2013
i'm trying to get the difference between two dates so i have two date itemsthen i did daynamic action (set Value) and choose pl/sql function then added the following codeDecalrestart_date date;end_date datebeginstart_date:=to_date(:p20_start_date,'dd/mm/rrrr');select to_date (sysdate,' dd/ mm /rrrr')into end_datefrom dual;return end_date-start_date;end; but when i run the page i got error ora-01861
View 1 Replies
View Related
Sep 6, 2009
I'm trying to connect from Oracle 11g (11.2.0.1.0) to Sybase Adaptive Server Anywhere (9.0.2.3527). My Oracle environment is running on Linux Centos 5.3, the sybase database runs on a Windows Server.
All my attempts have failed so far - both through Oracle Database Gateway for Sybase and via Oracle Database Gateway for ODBC in combination with freeTDS. Using either way I'm ending up with apparently the same error:
ASA Error -611: Transact-SQL feature not supported
When I use db link created via dg4sybs (Oracle Database Gateway for Sybase) I get this:
SQL> SELECT * FROM aaa@hvx;
SELECT * FROM aaa@hvx
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[code]....
When I use db link created via dg4odbc (Oracle Database Gateway for ODBC) and freeTDS driver I get this:
SQL> SELECT * FROM aaa@hvx1;
SELECT * FROM aaa@hvx1
*
ERROR at line 1:
ORA-28511: lost RPC connection to heterogeneous remote agent using
SID=ORA-28511: lost RPC connection to heterogeneous remote agent using
[code]....
It seems both drivers use Transact-SQL instructions which are then denied by ASA. I'm not familiar with Sybase products at all, but as far as what my googling revealed the Transact-SQL is only supported in Adaptive Server Enterprise (enterprise-class version of Sybase's database). I couldn't figure out if there's a way how to disable Transact-SQL in the driver configuration. how to connect from Oracle (10g or 11g) to Sybase Adaptive Server Anywhere?
View 3 Replies
View Related
Aug 31, 2011
explain to me what the "RAISE" command does in PL/SQL for the following code.
EXCEPTION
WHEN OTHERS THEN
INSERT INTO TMP_ERRCHECK(
PP_CD,
IHS_CD,
[code]...
Tried searching for some explanations but I still do not have a clue as to what the RAISE actually does. Do I even need to put it in the code?
View 3 Replies
View Related
Feb 10, 2011
I was going through the link: URL....Here within the box under the title 'Exception Handling -- Quick Facts and Tips', it states, Once you have handled an exception, normal program execution continues. You are no longer in an "exception" situation.
I wanted to verify this and used the below:The DDL and DMLs:
CREATE TABLE emp(empno NUMBER(4), ename VARCHAR2(10));
INSERT INTO emp VALUES(7369,'SMITH');
The program:
DECLARE
x VARCHAR2(10);
BEGIN
SELECT ename INTO x FROM emp WHERE empno=4567;
SELECT ename INTO x FROM emp WHERE empno=7369;
DBMS_OUTPUT.PUT_LINE(x);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('ERROR OCCURED');
END;
The first SELECT will raise NO_DATA_FOUND exception. Even though I have handled it, the second SELECT is not executing.But the link says, that normal program execution will continue. So, Iam expecting the second SELECT statement to work.
View 4 Replies
View Related
May 2, 2009
I'm trying to figure out how to simply check and see if a given item is in a table, and if its not, then raise an exception.
for example i have a table employees and each employee has a primary key employID. I need to write a procedure where employID is given as a parameter and if the one given isnt in the table then raise an exception.
View 3 Replies
View Related
Nov 17, 2011
PROCEDURE test_data(
)
IS
TYPE test_tab IS TABLE OF NUMBER(15);
t1 test_tab;
BEGIN
I have missing elements in a collection that should be reported to the terminal while running the procedure
IF t1.COUNT > 0 THEN
RAISE_APPLICATION_ERROR('Missing Elements: ' || elments from collection t1);
How can I raise an exception with all the missing elements from collection t1 here?
END IF;
END;
View 8 Replies
View Related
Feb 27, 2012
I am working on Forms [32 Bit] Version 11.1.1.4.0 (Production). OS is Win 7 (32 bit). Internet Explorer 8. My Requirement is I need to raise an alert when user close the browser window before closing the Form.
View 2 Replies
View Related
Feb 17, 2012
Why exceptions does not raise in cursors declared by user like in the following program
create or replace function sal (p_id employees.department_id%Type) return number is
----sal1 employees.salary%type:=0;
cursor cx is
select * from employees where department_id=p_id;
begin
for i in cx
[code]...
View 13 Replies
View Related
Jul 5, 2011
How to raise a exception when inserting a record in a table using plsql?
View 11 Replies
View Related
Jul 20, 2010
we are working to increase the security of our oracle application by adding profil and expiration to all our database username.
Expiration is actually set to 60 days.So if i understand it correctly, 60 days is counting from when i change my password. So if I change it at 10:30am it will expire at 10:30am in 60 days.
Our forms application is calling all forms using the command open_form with SESSION parameter to open all forms in new session.
My problem is when the user connect in the system let say at 9:00am. At 10h30am the password will expire and when the user will click to open a new form from the application he will get the message ORA-28001:the password has expired.The new module will open even if password is expired and will raise the error FRM-41352: Failed to create session. So the module will stay in the same session than the caller.
Is there a way to catch the ORA-28001 and force a new logon.Probably with some code in the ON-ERROR of the called module but this mean that i will have to change +400 forms.
View 1 Replies
View Related
Aug 19, 2013
create or replace procedure set_update(p_name in varchar2,p_email in varchar2)is l_data user_details%rowtype; beginselect * into l_data from user_details ud where ud.name = p_name and ud.email = p_email; if l_data.name = p_name and l_data.email = p_email then update user_details set last_login_date = sysdate , date_updated = sysdate where name = p_name and email=p_email; end if; exception when no_data_found then insert into user_details(user_id,name,last_login_date,date_updated,date_created,email) values (l_data.user_id,p_name,l_data.last_login_date,l_data.date_updated,sysdate,p_email);end set_update;
This is my procedure will pass two parameters if it is available in table it will update other wise insert that data in table. My problem is while data is not available that data is inserted into table but that not inserted into table.
View 7 Replies
View Related
Jul 26, 2010
In forms when we need to make the form not to validate we will give the command, raise form_trigger_failure like that if i need to make a report not to validate further what is the command to give?
View 3 Replies
View Related
Feb 25, 2011
We have Forms 10g for our application.
When i raise a exception in a procedure / trigger, i want to show the line number where the exception happened. is there any builtin to show that.
For eg
Exception when others
message('Error in this procedure');
raise;
I want the above exception to raise with line number also. How do i do it. I need some built in procedure in forms.
View 10 Replies
View Related
Jun 12, 2012
My requirement, if there is no record in emp table when validate the EMP_NO_CHK text field, i need to set the focus on that field (EMP_NO_CHK) itself. But while execute the following code, I got error.chieve the task.
--EMP_NO_CHK_WHEN_VALIDATE_ITEM Trigger
-----------------------------------
Declare
cursor c is Select * from emp where Emp_no = :header.empno;
c1 emp%rowtype;
n NUMBER;
[code]...
View 4 Replies
View Related
Apr 25, 2013
what are difference in between oracle 9i and 10g regarding with Sql queries?
View 1 Replies
View Related
Sep 22, 2011
I listen that there is a big diff B/W indexing in oracle 8i and oracle 11g.
what way the indexing is different B/W 8i and 11g.
View 3 Replies
View Related
Dec 18, 2012
When I use this sql: CREATE USER testuser IDENTIFIED BY "welcome1 " to create user in Oracle DB 11.2.0.1.0. I can login with testuser/welcome1, please notice the welcome1 is not end of black space in login.
But when I do the same thing in Oracle DB 11.2.0.3.0. I can't use this user login with any password. I tried welcome1, "welcome1 " but all failed.
Why there are this difference between 11.2.0.1.0 and 11.2.0.3.0, and since in 11.2.0.3.0 the create sql are success, what password is correct when login?
View 7 Replies
View Related