SQL Developer scripts
Dear budddiesI need to migrate a few hundred tables in SQL Server 2005 to Oracle 10 g, both residing on different servers.
My requirement of companies is such, that they be able to redo the migration at any point in time, so they prefer to use anything as a script.
If I use the script Developer SQL for DLLS and scripts to move data, will I be able to recreate them at any point in time in a database?
I need only the tables and data.
Please advice.
Nith
Of course, I don't see why not. But better try it yourself instead of always depend on the forum posts.
Kind regards
K.
Tags: Database
Similar Questions
-
PL/SQL in Sql Developer 4 script, works not sqlplus command line.
Hello guys, Xev here.
I hope I meet new people there into that in this space. I hope this is the appropriate space to ask this, I see that others have asked about sqlplus and they where permitted to post...
I have a pl/sql script that runs in sql developer 4, but the exact same script will not run in the sqlplus command line?
When I run the script, it gives me this, but as you can see with this script that works fine with sql developer, he is not running sqlplus command line.
ERROR at line 3:
ORA-06550: line 3, column 28:
PLS-00201: identifier 'DYNAMIC_COUNTS' must be declared.
ORA-06550: line 3, column 4:
PL/SQL: Ignored Element
ORA-06550: line 39, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 39, column 1:
PL/SQL: Statement ignored
ORA-06550: line 41, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 41, column 1:
PL/SQL: Statement ignored
ORA-06550: line 43, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 43, column 1:
PL/SQL: Statement ignored
ORA-06550: line 45, column 17:
PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.
ORA-06550: line 45, column 1:
PL/SQL: Statement ignored
ORA-06550: line 82, column 15:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 82, column 3:
PL/SQL: SQL statement ignored
Here is the script I use... You define a type of thing in the sqlplus command line?
Set serveroutput size unlimited
run the DBMS_OUTPUT. ACTIVATE (buffer_size = > NULL);
DECLARE
TYPE nt_tab IS TABLE OF dynamic_counts % ROWTYPE;
v_nttab nt_tab: = nt_tab();
FND_LOOK INTEGER.
v_incr NUMBER: = 0;
------------------------------------------------------------------------------------------------------------------------
BEGIN
FOR t IN (SELECT master, table_name, column_name
From all_tab_columns
Owner WHERE = UPPER ('& SCHEMA_NAME'))
------------------------------------------------------------------------------------------------------------------------
LOOP
BEGIN
EXECUTE IMMEDIATE ' with an ACE (select case when REGEXP_LIKE (' | t.column_name |))
-This search 1 letter and 12 figures-
', "^ ([[: alpha:]] |) [[: alpha:]] ({3}) [0-9] {12} $")
then "match"
another "no matches found" end up as output of ' | t.Owner | '.' || t.table_name | ')
Select count (*) in a where a.output = "Match Found" clause '
IN FND_LOOK;
------------------------------------------------------------------------------------------------------------------------
IF FND_LOOK > 0 THEN
v_incr: = v_incr + 1;
v_nttab. EXTEND;
v_nttab (v_incr) .t_owner: = t.owner;
v_nttab (v_incr) .t_table_name: = t.table_name;
v_nttab (v_incr) .t_column_name: = t.column_name;
v_nttab (v_incr) .fnd_govids: = FND_LOOK;
END IF;
------------------------------------------------------------------------------------------------------------------------
/ * This is for DBMS output, thus we have 2 different ways, one can see the results in the table dynamic_counts
and in the dbms_output
*/
IF FND_LOOK > 0 THEN
Dbms_output.put_line (t.owner |) '.' || t.table_name | ' ' || t.column_name | ' ' || FND_LOOK);
END IF;
------------------------------------------------------------------------------------------------------------------------
/ * Exception Handeling * /.
EXCEPTION
WHILE OTHERS
THEN
Dbms_output.put_line)
"Generic error".
|| t.column_name
|| "from".
|| t.Owner
|| '.'
|| t.table_name);
END;
END LOOP;
------------------------------------------------------------------------------------------------------------------------
FORALL i IN 1.v_nttab. COUNTY
INSERT INTO dynamic_counts (t_owner,
t_table_name,
t_column_name,
fnd_govids)
VALUES (v_nttab (i) .t_owner,
v_nttab (i) .t_table_name,
v_nttab (i) .t_column_name,
v_nttab (i) .fnd_govids);
COMMIT;
END;
/
Are you sure that you are connected to the database to the same user with both clients?
-
Script SQL Developer runs all the lines
I have a group of scripts that I want to execute in the order since a main script. I created a file referencing these scripts as follows below. My problem is that when I run this script (via F5 or another script referencing it), it runs only the first line and stops. I have excluded questions with my references to file by changing the order - always the first runs and stops. I have tried such as displayed below and with a semicolon; to separate each command. I have scoured the web and can not find any reason why it does not work. Each of the scripts listed below contains multiple statements separated by a; that wraps a file to a NAS where he is picked up by our external file transfer program. It all works properly - the only thing that I have problems with using 1 script to call several files and run them in order.
Any help is greatly appreciated!
@EMSTATUS.sql
@EMPLOYEE.sql
@HREMPUSF.sql
@HRHISTORY.sql
@HRSUPER.sql
@JOBCLASS.sql
@JOBCODE.sql
@PAACTREAS.sql
@PAEMPLOYEE.sql
@PAEMPPOS.sql
@PCODES.sql
@PCODESDTL.sql
@PERSACTHST.sql
@PRDISTRIB.sql
@PRPAYCODE.sql
@PSGRELATE.sql
@REVIEW.sql
Hello
Note You can place in the path: Tools-> preferences-> database-> spreadsheet-> "path select default to search scripts"
I tried the following:
c:\tmp\calltwoscripts. SQL
set echo on
@zone.sql
@ztwo.sql
Select 'done' double.
c:\tmp\zone. SQL:
Select 'one' double;
c:\tmp\ztwo. SQL:
Select 'two' SQL;
executed in a worksheet:
@c:/tmp/calltwoscripts.sql
Output:
> @zone.sql
> select "one" of the double
'A '.
-----
one
> @ztwo.sql
> Select "both" of the double
"TWO".
-----
two
> select 'done' double
'DONE '.
----------
Finish
The things that could go wrong:
Your scripts could end with "quit".
Paths can mingle: try (not @) and full of paths.
You could hit a code issue, the spreadsheet does not recover-in which case you should get the output on the command line and or Page logging of messages in the view.
Turloch
SQLDeveloper - team
http://www.thatjeffsmith.com/archive/2012/06/how-to-collect-Debug-Info-for-Oracle-SQL-Developer/
http://totierne.blogspot.co.UK/2013/07/user-check-on-sqldeveloper-worksheet.html
-
Out of the script SQL more not displaying is not operating in SQL Developer
Hello
I have a script el_ccn.sql with the content...
Select count (*) in the NCC;
When I run @el_ccn.sql in a SQL Developer the option worksheet dependencies execute the Script (F5)
all that is displayed is
COUNT (*)
----------
When I run it in SQL, I see...
COUNT (*)
----------
2285
1 selected line.
I can 'open' the script and then run OK but I test it before implementing more complex SQL script files, so would like to know if this is possible with SQL Developer. A colleague does not have access to SQL over, so I need to check they can do this with SQL Developer before you start a COMPUTER call helps bring sqlplus.
There must be something simple, that I do not correctly.
Thank you, Elaine
Published by: E Langford on 5 June 2013 01:57Hi Elaine,.
Whenever unexpected behavior occurs is not a known bug, I always suspect corruption in the migrated settings / preferences of the user. Is the best way to test this
1. export definitions of connection, you do not want to lose.
2. Add the following line to your sqldeveloper.conf file...AddVMOption - Dide.user.dir =
3. restart the product without migrating all settings
The conf file is
\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf. IDE.user.dir must be available in writing being given to whatever your username has privileges (and preferably on a drive off-grid) and must be different from the value default SQL Developer uses (for example, on Windows 7, C:\Users\ Developer \AppData\Roaming\SQL). If el_ccn.sql script works correctly with the own user preferences, by default, then you can return to the editing of the conf file, delete or rename the folder system3.2.20.09.87 in the ide.user.dir original or default folder, and then restart the product, migrate or does not migrate settings from a previous installation as desired.
Hope this helps,
Gary -
Dear friends,
I need migrating from SQL Server to Oracle. Please kindly guide me, how I can use the script of the options available in SQL Developer.
I clicked on tools-> Migration-> third party data Capture offline - > Create Database Scripts to capture and saved scripts to a folder.
It generated 4 files as shown below:
OMWB_OFFLINE_CAPTURE.bat
Properties.SQL
SQLServer2005.OCP
SS2K5_BCP_SCRIPT.bat
How can I use them? I should run then in Oracle or SQL Developer?
I tried to click on the file (OMWB_OFFLINE_CAPTURE.bat) bat and nothing happened. Not sure if I made the right choice.
Please guide me. I just need to move the tables as well as its data.
Thank you very much.
Kind regards
NithTutorials on OTN show how to make a screenshot in offline mode. (http://www.oracle.com/technology/products/database/sql_developer/files/obe.html)
and follow the Migration of the SQL Server.Sue
-
How to save templates scripts sql in PL/SQL Developer
I use PL/SQL Developer of full automation to develop in pl/sql.
I would like to know if it is possible to save a script model. I mean if I want to save a query regarding a certain table, I can write the SQL and then save it using the button "Save as query Standard." But what I would do is, for example, to save a script like:
declare
cursor c_cur is
+ Select * +.
Of
--+
v_cur c_cur % ROWTYPE;
--+
Start
Open c_cur;
loop
extract the c_cur in v_cur;
When the exit c_cur % NOTFOUND;
--+
--+
end loop;
close c_cur;
--+
end;
+/+
and to be able to open it when I want it to. Is it possible to save the scripts in such 'model' anywhere in PL/SQL Developer?
Thank you!Tools-> preferences-> files-> directories-> templates, then mention some directory say C:\MyTemplates.
Put your scripts as *.tpl format in this directory (say script1.tpl).
Tool-> model then lists. -
How to flush the output of the script in sql developer
Greetings from a newbie,
How can I empty out the script in sql developer?
Kind regards
ValerieFlush? You can clear the output pane by pressing 'Clear' (Eraser pencil) icon: the first icon on the mini-bar to the tab tools.
That answer your question?
K. -
How to get the script to a table or view in SQL Developer?
Dear friends/expert,
Could you tell me how to get the script from a view or a table easily in SQL Developer as pressing F4 in TOAD?
I found that I can press SHIFT + F4 to view in SQL Developer and get the script of the view in the Details tab. But how to move the script to the SQL worksheet to change? It is very easy to do in TOAD.
And I have not found a way to get the script for a table up to now. Is it possible to do?
Thanks in advance.
Best regards
NingThere are people a lot better out there to answer on this point than I am - but here's how I do it.
I'm just in the browser/browser for interest table, choose the script on the right side tab (which shows all the SQL for the table) and then cut and paste what I want or need in my editor window.
-
Can I create a script of commands SQL Developer?
I have a frequently repeated process where I:
Open SQL Developer (v3.2.2 due to requirements of 32 bits),
to connect to a database previously defined connection,
to connect to a previously defined MS Access database connection,
Select 3 tables in Access
Use the context menu to copy Oracle
Specify Append on the conflict
and I'm done.
I would like to automate this process. Can it be done?
Thank you!
There is no command line interface in version 3.2, but we don't have one in version 4.0.
And version 4.0 does not have some of the migration features available to call from the CLI, but I do not see a "copy to oracle" action available.
-
Order that SQL Developer Modeler generates objects in DDL download
Little annoying question... When I have an existing data model that includes all of my table definitions and ALSO my package definitions, I try to make a DDL download and load it into an instance of Oracle 11g and get an error on a procedure declaration does not have a column type.
What I see is when I open the prepared ddl script, the package is created until the table is under construction. Is it possible I can tell SQL Developer Data Modeler to build like objects together (table, then sequences and then triggers and packages and procedures/functions?
SQL Developer Data model version 4.1.3 Oracle database 11g r2...
Thank you
Tony Miller
Los Alamos, NMHi Tony,.
Data Modeler generates at the beginning of the Package definitions in the DDL file, so that they appear before the objects such as Tables, views, and triggers that may refer to them.
And the Package body are generated at the end, so that they can refer to Tables and views.
Unfortunately there is no option to change the sequence of generation.
In general, the Data Modeler takes dependencies between objects into account to generate the DDL file objects in a proper order.
However, it does not detect the dependencies TYPE %. I connected an enhancement request to add to its dependency checking (22581821).
Kind regards
David
-
How to install utilities PL/SQL Developer SQL v1.6.0 in the database
in fact I'm looking
HTTP_UTIL_PKG
CSV_UTIL_PKG
to download excel file in Oracle 11 g r2 11.2.0.1.0 feature
Downloaded from https://code.google.com/p/plsql-utils/downloads/detail?name=plsql-utils-v160.zip & can = 2 & q =
How to install utilities PL/SQL Developer SQL v1.6.0 in the database
If we install in sys or particular schema in which I need to use
and how to run the script
ReemaPuri wrote:
in fact I'm looking
HTTP_UTIL_PKG
CSV_UTIL_PKG
to download excel file in Oracle 11 g r2 11.2.0.1.0 feature
Downloaded from https://code.google.com/p/plsql-utils/downloads/detail?name=plsql-utils-v160.zip&can=2&q=
then download the zip file and then extract the contents
Both are contained in it.
Then add them to the schema of your choice.
-
SQL * more the 'timing' in SQL Developer command
I installed SQL Developer version 4.1.1.19. In the sql worksheet, how can I use SQL * more order 'timing' in a script to see a time elapsed SQL? The "Timing" on 'set' did not return any info after running SQL, and 'calendar beginning mon_timer' back 'command Timing is obsolete. Help, please.
Thank you
- As you can see, there is no calendar information in the script output log.
- Then I tried on the discussion forum, found it can be enabled in "tool > preference > Database > startup script" and set as startup script:
Set serveroutput on
set timing on
- However, 2 questions are:
- the calendar that he returned is NOT the elapsed time of my stored procedure to run. He simply choose the 2 time points its time, before and not after MS point run. Set timing on is therefore not a solution for me.
- He did not follow the instructions in the startup script. After that I put the calendar in the startup script, stop & restart SQL Developer, same laptop charging, timing still on. The only way to turn off now is to configure it to NOT use
any startup script.
- Then I developed my own coding as a solution:
3. control of the COIL
VAR bv_start_ts VARCHAR2 (30)
VAR bv_end_ts VARCHAR2 (30)
VAR bv_elps_ts VARCHAR2 (30)
DECLARE
v_start_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_start_ts FROM DUAL;
: bv_start_ts: = v_start_ts;
END;
/
IMPRESSION bv_start_ts
EXEC pmsmmi.rpt.rpt_ethncty_race_smry (15);
DECLARE
v_end_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_end_ts FROM DUAL;
: bv_end_ts: = v_end_ts;
END;
/
IMPRESSION bv_end_ts
EXEC: bv_elps_ts: = TO_CHAR (TO_TIMESTAMP (: bv_end_ts, 'yyyymmddfxDyhh24miss.ff6')-TO_TIMESTAMP (: bv_start_ts, 'yyyymmddfxDyhh24miss.ff6'), 'hh:mi:ss.ff6');
IMPRESSION bv_elps_ts
SPOOL OFF
- Then I got what I want, the answer is in the 'PRINT ': bv_elps_ts
SQL > VAR bv_start_ts VARCHAR2 (30)
SQL > VAR bv_end_ts VARCHAR2 (30)
SQL > VAR bv_elps_ts VARCHAR2 (30)
SQL > DECLARE
v_start_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_start_ts FROM DUAL;
: bv_start_ts: = v_start_ts;
END;
/
PL/SQL procedure successfully completed.
Elapsed time: 00:00:00.031
SQL > PRINT bv_start_ts
BV_START_TS
-----------
20150702Thu112617.775545
SQL > EXEC pmsmmi.rpt.rpt_ethncty_race_smry (15)
PL/SQL procedure successfully completed.
SQL > DECLARE
v_end_ts VARCHAR2 (30);
BEGIN
SELECT TO_CHAR (SYSTIMESTAMP, 'yyyymmddfxDyhh24miss.ff6') INTO v_end_ts FROM DUAL;
: bv_end_ts: = v_end_ts;
END;
/
PL/SQL procedure successfully completed.
Elapsed time: 00:00:00.062
SQL > PRINT bv_end_ts
BV_END_TS
---------
20150702Thu112630.805786
SQL > EXEC: bv_elps_ts: = TO_CHAR (TO_TIMESTAMP (: bv_end_ts, 'yyyymmddfxDyhh24miss.ff6')-TO_TIMESTAMP (: bv_start_ts, 'yyyymmddfxDyhh24miss.ff6'), 'hh:mi:ss.ff6')
PL/SQL procedure successfully completed.
SQL > PRINT bv_elps_ts
BV_ELPS_TS
----------
+ 00:00:13.030241000 000000
SQL > SPOOL OFF
-
Cannot display the results in SQL Developer
Hello Experts - I installed Oracle SQL Developer, just ran simple query. Nothing appears in the results window. Can you please let me know why?
Select * of the double
Done «I installed...» "mean you use 4.1.0? Or is it an older version, perhaps even an Early Adopter version? Have you installed in an empty folder? Were there no migration of user settings step? Did you run the SQL statement (even if it is technically incorrect, as posted here, I guess the Oracle manages Analyzer) using the declaration of implementation (Ctrl + Enter) or run (F5) Script?
So, you do not have much to do, but...
1. try to use the latest version of production, installed in an empty folder. In fact, the 4.1.1 patch comes out.
2. try to click on the little black down, arrow down to the left of the box of the spreadsheet to see if that exposes a results pane.
3. try window > Windows reset factory settings if you think that the layout of fenestration of the product is somehow screwed up.
4. try view > log to see which makes its appearance in the statements of the Log pane tab when you run the SQL (version 4.1.0 & upward).
-
ADR installation failed with SQL Developer - password must be in quotes
ADR installation through SQL Dev, go to this step of the process:
Update of the oracle.dbtools.common.config.file.ConfigurationFilesBase June 9, 2015 11:14:37
INFO: update of configurations: by default, apex_pu, apex
June 9, 2015 11:14:37 oracle.dbtools.installer.Installer installORDS
INFO:
Installation of Oracle version 3.0.0.121.10.23 REST Data Services
Journal of the oracle.dbtools.installer.Runner June 9, 2015 11:14:37
INFO:... Log file written to C:\Users\P00264Sumner\ordsinstall_2015-06-09_111437_00351.log
Journal of the oracle.dbtools.installer.Runner June 9, 2015 11:14:39
INFO:... Prerequisite database verified
Journal of the oracle.dbtools.installer.Runner June 9, 2015 11:14:40
INFO:... Oracle Data Services schema IS created
Journal of the oracle.dbtools.installer.Runner June 9, 2015 11:14:47
INFO:... Privileges Oracle REST Data Services
Journal of the oracle.dbtools.installer.Runner June 9, 2015 11:14:57
INFO:... REST Data Services created Oracle database objects
null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
Caused by: java.io.IOException: the script runtime error: ords_create_rest_users.sql error: ORA-00911: invalid character
Error at startup to the line: 48 in command.
create user ORDS_PUBLIC_USER identified by < CENSORED > account unlock temporary tablespace default tablespace USERS TEMP
Command line error: column 48: 49
Error report-
SQL error: ORA-00911: invalid character
Refer to the log file C:\Users\P00264Sumner\ordsinstall_2015-06-09_111437_00351.log for more details
at oracle.dbtools.installer.Runner.executeSQLScript(Runner.java:130)
at oracle.dbtools.installer.Runner.executeScripts(Runner.java:75)
at oracle.dbtools.installer.Runner.executeScripts(Runner.java:38)
at oracle.dbtools.installer.Installer.installORDS(Installer.java:104)
at oracle.dbtools.installer.Installer.execute(Installer.java:59)
at oracle.dbtools.rt.config.setup.SchemaSetup.install(SchemaSetup.java:62)
at oracle.dbtools.rt.config.setup.Setup.execute(Setup.java:193)
at oracle.dbtools.cmdline.DefaultCommand.execute(DefaultCommand.java:104)
at oracle.dbtools.cmdline.Commands.execute(Commands.java:172)
at oracle.dbtools.cmdline.Commands.main(Commands.java:135)
at oracle.dbtools.cmdline.Commands.main(Commands.java:299)
... 5 more
The chosen password falls into the category where there are.
On the issue of installing the password being quoted will be fixed in the next update.
On the second question, "in addition, an attempt to remove using SQL developer...» »
with the uninstall, it specifies the username, use SYS AS SYSDBA. -This will be also set for our next update. -
call a procedure stored since SQL developer UI
I have a stored procedure that is created with a date in parameter.
Then I tried running SQL Developer by right-clicking the stored procedure, then it comes out a parameter window and I tried to enter the value in the entry value field by entering January 1, 2015 "because I know our server date format is DD-MON-RR."
But it shows a window of incorrect format: Please use date format YYYY-MM-DD,
Why is this?
The generated SQL Developer code is less after I ' 2015-01-01'
DECLARE
DATE OF P_DATESTORED;
BEGIN
P_DATESTORED: = to_date('2015-01-01','yyyy-MM-dd');MySproc)
P_DATESTORED = > P_DATESTORED
);
-restoration;
END;I can just use below: for the date, the Server format is DD-MON-RR.
Begin
MySproc('01-JAN-2015')
End;
Thank you
We use oracle 11g 2, the window environment.
The code is generated (SQL Developer) client-side. This code generation, by design, does not count the current NLS_DATE_FORMAT of the session. Instead, it uses the date coded hard YYYY-MM-DD format. It seems to be a design decision.
If you want to enter this date value in a particular format, use the following snippet directly in the SQL worksheet (F5: run script), modified for your desired date format, or omitted date format - I really discourage the to do.
DECLARE
DATE OF P_DATESTORED;
BEGIN
P_DATESTORED: = to_date ('& myinput', 'YYYY-MM-DD');
MySproc)
P_DATESTORED-ONLINE P_DATESTORED
);
-restoration;
END;
/
Maybe you are looking for
-
How can I change the mail account name electronics thunderbird due to marriage
-
Don't remember my iPod access code
So basically, I have an iPod Touch (4th generation) and I don't remember the password. -I entered incorrectly a password enough times now that when I turn it on, it says "iPod is disabled. Connect to iTunes. " -It would be nice, but I threw the compu
-
Welcome screen does not update the recent list
For a while, starting VBAI 2010, list "Recent Inspections", paragraph "Configuration control" was not being updated forcing me to use the browse option. I found the list in the Builder.ini Vision and modified, i.e., lightened in a bit, and while my
-
My advance, answer and reply all buttons have disappeare from my Inbox how their return if I can do these things
-
More great conflicting provisions with the liquid code {module_product}
HelloI have the following module below on the great layout to use several models for the products...It is now, it renders nothing if any liquid is used in the large Layout Page.The tag is used as follows:{module_product catalogId = productid "{tag_ca