oracle-sqldeveloper

sql error on script execution. try deleting repository before creating repository

巧了我就是萌 提交于 2019-11-29 17:53:28
问题 I want to migrate my mysql databse to oracle. I have followed the migration demo from this url http://www.oracle.com/technetwork/database/migration/connect-step-mysql-1946352.html but I got this message when try to associate migration repository sql error on script execution. try deleting repository before creating repository I am using Oracle Sql Developer v 4.1.1.19 Oracle express edition 11g releas 2 see the picture bellow what I have tried step by step step1: Creating a user named

halt on compilation error in a sqlplus script

筅森魡賤 提交于 2019-11-29 17:31:00
I am deploying pl/sql code using several sql files that are called with @@file . If a package got a compilation error the script continues to the end. Is there a way to stop on every compilation error? I tried WHENEVER SQLERROR EXIT SQL.SQLCODE but the script still continues. No native sql*plus way I'm aware of. Only workarounds. Like this: 20:42:50 TEST@oars_sandbox> get scr 1 whenever sqlerror exit rollback 2 create or replace procedure my_failed_proc as 3 i number; 4 begin 5 select 1 into i from me_iz_not_exist; 6 end; 7 / 8 @check my_failed_proc 9 create or replace procedure my_correct

SQL Developer script output truncates sys_refcursor width

為{幸葍}努か 提交于 2019-11-29 16:46:07
I have a function defined that returns a sys_refcursor containing 5 text columns. Sorry, I cannot post the contents of it here for business reasons. The columns are casted to varchar2 with specific widths (9,4,10,10,10). The casting allows me to ensure column widths are constant. In SQL Developer 1.5, printing script output (using F5 from SQL worksheet) displays the contents of the cursor nicely as: MY_FUNCTION(input1,input2,input3) --------------------------------- COLUMN1 COLU COLUMN3 COLUMN4 COLUMN5 --------- ---- ---------- ---------- ---------- 18-NOV-14 TEXT SOME_DATA1 SOME_DATA2 SOME

Date query ran in PL/SQL Developer shows time, but does not show in Oracle SQL Developer

大憨熊 提交于 2019-11-29 16:38:38
The same query ran in PL/SQL Developer shows time, however it does not show in Oracle SQL Developer. Is there a way to get the time in SQL Developer? In SQL Developer: In PL/SQL: This is the details of the date field: You can change this in the Tools / Preferences dialog of SQL developer: Select Database / NLS Parameters in the tree view on the left. Then put dd/mm/yyyy hh24:mi:ss into the Date Format field. Press OK to close the dialog. user4550960 To make it simple: use to_char() function, it will work with SQL developer as well as Pl/sql. select to_char(sysdate,'MM-DD-YYYY HH:Mi:SS') from

SPOOL command doesnt save result in query

蹲街弑〆低调 提交于 2019-11-29 15:38:50
I'm using SQL Developer and I'm trying to save result of a query into the text file using spool command. spool D:\file.txt SELECT * FROM TABLE SPOOL OFF When I open created file it only has my query in it: "SELECT * FROM TABLE" but not result of it. What am I doing wrong? Try to execute it with a query which returns fewer rows to see if you have any other problems. After you make it work, try your query. Also there is a difference between Run Statement and Run Script. In the following query spool '/home/atilla/file.txt' SELECT * FROM DUAL; SPOOL OFF If I use Run Statement, I get following file

Remove Column Header into the Output Text file

假装没事ソ 提交于 2019-11-29 13:07:28
I want to create a flat file (text file) of my query from Oracle SQL Developer. I have successfully created the text file using SPOOL, thru a script text file, but i want to remove the header of each column into my output. I am getting this output: Header000001 Header000002 ------------ ------------ Adetail1 Bdetail1 Adetail2 Bdetail2 Adetail3 Bdetail3 But, I want to get this output: Adetail1Bdetail1 Adetail2Bdetail2 Adetail3Bdetail3 I already tried the command "set heading off", but a message says: "SQLPLUS COMMAND Skipped: set heading off". These are the inputs I've issued: spool on; spool C

How to find the error causing ora-06575?

匆匆过客 提交于 2019-11-29 11:41:06
Recently I had to write an oracle function, and the error ora-06575 popped up awfully a lot. Usually it was because of missing colon from assignment, such as: z = 5 (vs. z := 5) Or a missed ';' at the end of a statement. Anyway, I was able to create the function, but it failed during execution with that error, and gave no hint as to where the problem was (except that it was in the function). I wrote same function in MSSQL and Sybase, and both of those actually tried to point me to the place of any errors. So I figure I'm doing something wrong in Oracle - it can't just tell me 'there's an error

What is the setting to view the time part with date in Oracle PL/SQL developer?

时光怂恿深爱的人放手 提交于 2019-11-29 11:37:33
I have a table named AUDIT which saves all the modifications done on an account. There is a field AUDIT_DATE which contains the date on which a particular modification has been done. Now the problem is, in one of my colleagues Oracle PL/SQL developer, I can see the time as well as the date in the AUDIT_DATE column, but in my Oracle PL/SQL developer, I can't see the time part. So I believe some setting is not properly done in my Oracle PL/SQL developer and that's why I can't see the time part. I asked the colleague, but he has no clue about the discrepancy. If you want to see dates with times

How to Query Database Name in Oracle SQL Developer?

会有一股神秘感。 提交于 2019-11-29 10:48:49
问题 How do I query the database name in Oracle SQL Developer? I have tried the following and they all fail: SELECT DB_NAME(); SELECT DATABASE(); Why do these basic MySQL queries fail in SQL Developer? Even this one fails too: show tables; EDIT: I can connect to the database and run queries such as: select * from table_name_here; EDIT 2: The database type is Oracle , this is why MySQL queries are failing. I thought it was related to the database client not the database itself. I was wrong. I'll

Read text file to insert data into Oracle SQL table

烈酒焚心 提交于 2019-11-29 10:23:26
问题 I am studying Oracle SQL developer. What I am doing is reading text file line by line from the folder. Then Inserting data to the SQL table. I am able to compile my PROCEDURE, however, it doesn't seem to be inserting the data to file. Create or Replace PROCEDURE Rfile is f UTL_FILE.FILE_TYPE; s VARCHAR2(200); BEGIN f := UTL_FILE.FOPEN('C:\Projects\','testdatabinary.txt','R'); IF UTL_FILE.IS_OPEN(f) THEN LOOP BEGIN UTL_FILE.GET_LINE(f,s); IF s IS NULL THEN EXIT; END IF; INSERT INTO DATAINSERT