Can SQL Dev compare difference of 2 sql scripts?
I need to compare structure of table that has changed by someone but I don't know which table has been modified. I found that SQL Dev can export meta data into sql file and have version control either. I'm not sure can we compare this 2 sql scripts with version control to detect some change in table structure or not?
Or if has any others solution, Please help.
Regards,
Sutthisak S.
If you open the script in sqldev, you get a History tab next to the Worksheet. Selecting a revision will compare against that.
To compare against another file, select File - Compare With - Other File.
If the internal compare doesn't convince you, there are free alternatives out there, like WinMerge, or my personal favourite (but commercial) Beyond Compare.
Have fun,
K.
Similar Messages
-
Can SQL Dev Data Modeler be used to reverse engineer Windchill PDMLink
Does anyone know if SQL Developer Data Modeler be used to reverse engineer Windchill PDMLink Oracle database? I need to get the DDL and ERDs from Windchill PDMLink.
Can SQL Developer Data Modeler be used to reverse engineer object oriented Oracle databases?SQL Developer Data Modeler be used to reverse engineer Windchill PDMLink Oracle databaseprobably you mean Windchill PDMLink tables in Oracle database - yes, it's possible to get the structure of tables.
Can SQL Developer Data Modeler be used to reverse engineer object oriented Oracle databases?It's not clear for me - you can reverse engineer definition of object and collection types, definitions of tables and views including those that use object and collection types in their definition.
You can try it.
Philip -
Can't Upload SQL scripts or application scripts in APEX 3.1
I have installed APEX 3.1 on an Oracle 10g database.
I can log in to APEX, create applications, and run applications.
One application I import is the sample OEHR application which imports correctly at the hosted site.
However, when I try to upload an SQL script or import the sample application I get
"Page not Found" for this page http://csora:7777/pls/apex/wwv_flow.accept
I've included my dads.conf below and also some Apache error entries
Alias /i/ "e:\oracle\product\10.1.0\Db\Apache\Apache\images/"
AddType text/xml xbl
AddType text/x-component htc
<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString csora:1521:ORCL ServiceNameFormat
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_object$
PlsqlDatabaseUsername APEX_PUBLIC_USER
plsqlDefaultPage apex
PlsqlDatabasePassword hocking
Allow from all
</Location>
I:[Mon Apr 14 15:52:35 2008] [error] [client 10.116.101.158] [ecid: 1208202755:198.30.4.195:2696:2864:2873,0] File does not exist: e:/oracle/product/10.1.0/db/apache/apache/htdocs/pls/htmldb/builder/topnav2.gif
[Mon Apr 14 15:52:35 2008] [error] [client 10.116.101.158] [ecid: 1208202755:198.30.4.195:2696:2924:2771,0] File does not exist: e:/oracle/product/10.1.0/db/apache/apache/htdocs/pls/htmldb/builder/left_curve.gif
[Mon Apr 14 15:52:35 2008] [error] [client 10.116.101.158] [ecid: 1208202755:198.30.4.195:2696:2944:2767,0] File does not exist: e:/oracle/product/10.1.0/db/apache/apache/htdocs/pls/htmldb/builder/left_curve.gif
[Mon Apr 14 15:52:35 2008] [error] [client 10.116.101.158] [ecid: 1208202755:198.30.4.195:2696:2972:2750,0] File does not exist: e:/oracle/product/10.1.0/db/apache/apache/htdocs/pls/htmldb/builder/right_curve.gif
[Mon Apr 14 15:52:35 2008] [error] [client 10.116.101.158] [ecid: 1208202755:198.30.4.195:2696:2940:2762,0] File does not exist: e:/oracle/product/10.1.0/db/apache/apache/htdocs/pls/htmldb/builder/right_curve.gif
[Mon Apr 14 16:19:33 2008] [error] [client 10.116.101.158] [ecid: 1208204373:198.30.4.195:2696:2924:2773,0] File does not exist: e:/oracle/product/10.1.0/db/apache/apache/htdocs/pls/htmldb/builder/topnav2.gif
[Mon Apr 14 16:21:48 2008] [error] [client 10.116.101.158] [ecid: 1208204507:198.30.4.195:2696:2948:2801,0] mod_plsql: /pls/apex/wwv_flow.accept HTTP-404 ORA-00942: table or view does not exist
[Mon Apr 14 16:23:29 2008] [error] [client 10.116.101.158] [ecid: 1208204609:198.30.4.195:2696:2788:2760,0] mod_plsql: /pls/apex/wwv_flow.accept HTTP-404 ORA-00942: table or view does not exist
[Mon Apr 14 16:23:29 2008] [error] [client 10.116.101.158] [ecid: 1208204609:198.30.4.195:2696:2788:2761,0] mod_wchandshake: incorrect uri: name="p_t04" passed in.
[Mon Apr 14 16:23:29 2008] [error] [client 10.116.101.158] [ecid: 1208204609:198.30.4.195:2696:2788:2761,0] Invalid URI in request -data; name="p_t04"
Am I missing some files or directories from the 3.1 install? Any help would be appreciated since I think I'm close to having APEX fully functional.Val,
In this line:
PlsqlDocumentTablename wwv_flow_file_object$
...that needs to be wwv_flow_file_objects$
Scott -
Can SQL Developer be used for Oracle Support "HTML Output" Diag Scripts ?
Hi All,
Oracle Support has asked me to run a diagnostic script (OTL_Diag.sql for anyone familar with the script) that produces output in HTML format using SQL*Plus to help troubleshoot an OTL problem we are having. Unfortunately I don't have SQL*Plus installed and my company is not on board with me installing it because of the SQL*NET connection required. Instead I have access to SQL Developer 3.1.0.7. While this works fine for most situations I'm having problems generating the required .html output file that Support needs.
I've tried runing the OTL_Diag.sql a couple of ways using SQL Developer. First, I opened the file from SQL Developer and using the Run Script functionality (F5) I executed the code that way. This method did give me an opportunity to input the necessary parms and it did create the 'start' of the HTML file on my (Windows) file system, but the script seemed to abort with a java error that indicated some sort of format error (sorry, I'm not a java person so I can't provide any more info, but I'll be glad to get the exact error message if anyone thinks that will help solve my issue).
My second approach was to open a SQL Window where I typed in @C:\OTL_Diag.sql without quotes. This approach also gave me the opportunity to enter the necessary input parms and it seemed to end normally. It also created the 'start' of the diaganostic output file on my Windows file system, but it 'completed' before any of the 'real' diaganostic output was written to the .html file.
The Metalink note clearly specifies that the OTL_Diag.sql script is to be run with SQL*Plus 10.2 or above so I don't think I can complain too loudly to Oracle about this...but given that I don't have access to this product (and it is useless for me to again ask to install it) I am hoping someone out there has some ideas or insight as to how I can use SQL Developer to execute this diag script in a manner that will produce the required .html output file.
Thanks in advance to anyone taking time to read my post !!
Jeff
Edited by: user13111861 on Jul 10, 2012 6:43 PM
Edited by: user13111861 on Jul 10, 2012 7:51 PM>
As a result, at this point in time my only available tool to run the OTL_Diag.sql script (provided by Oracle Support) is SQL Developer
>
Then you will have to edit the script, break it into pieces, execute each piece manually and save the output to feed into the next piece as required based on what the script is actually doing. Don't post the script or contents as that will likely violate your support agreement.
As I already mentioned the script may be using syntax and/or commands that are simply not supported by sql*developer. One likely area is the script may be producing intermediate output scripts that are then processed by a later portion of the script. If that is the case then my suggestion to execute the pieces manually should work but you will need to do some trial-and-error to see.
Even if you appear to be successful you will still have an issue when you communicate the results of your 'test' to Oracle support and they determine you didn't follow their instructions to use the proper tool.
Sounds like your management is either ignorant or incompetent so I suggest you cover yourself by documentating the instructions from Oracle support and the direct orders you were given to disregard those instructions. No need to discuss that issue further but clearly there are resources available somewhere in the org that has the proper privileges or they wouldn't be able to maintain and support the database. If they want to pay for support they should heed their advice. Nuff said. -
How can I run a SQL script file...
How can I run a SQL script file from a location on my computer without providing the whole path?
Is there some way I can set a "Working folder" in SQL Plus??
Thanks!
TomYou can create an environment variable called "SQLPATH" which is a list of directories that SQL*Plus will search for your .SQL
scripts.
I would like to use another directory than the oracle/bin...
How can I do this ??
Hello,
U can do this by this way:
Save odm_script.sql file to the default Oracle
directory i.e. Oracle-Home/bin and Run following command
through SQL Plus.
SQL>@Script_Name
I hope this will resolve ur problem.
Regards,
Omer Saeed Khan. -
Can SQL Developer Data Modeler work with OBIEE?
Can SQL Developer Data Modeler work with OBIEE? Can we export the data model from the Data Modeler and import it into OBIEE? Or export the OBIEE metadata to the Data Modeler for Data Model defining?
no
Philip -
Can SQL Developer 3.1 Early adopter be used on production ?
Can SQL Developer 3.1 Early adopter be used on production ?
Can , sure. Advisable , not officially.
Your call...
Regards,
K. -
Can we execution sql script through java ?
Hi All,
Can we execute sql script ("name.sql") through java programe.
I am not talking about reading sql script one by one and excute.
I just want to send this sql script to oracle console.
Or any body can give other alternative I have to lot of db operation in less time.
- Vikas Kumar SahuKumar,
not sure whether this is any help, but you can try and use the code below.
I've knocked it together in about an hour so it's far from production ready (particularly, assumes one-line comments starting with '#' and nothing else - queries are assumed multi-line, but terminated by ';' the following would cause trouble:
SELECT * FROM table; SELECT *
FROM another_table;
and, of course, you can't get to the ResultSet.
But, hey, it's a start!
Best,
Marco.
(www.infinitebw.com)
admin (at) infinitebw.com
package com.ibw.database;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.*;
import com.ibw.exception.DatabaseException;
public class SqlScript {
public final static char QUERY_ENDS = ';';
private File script;
private Connection conn;
private Statement stat;
* @param args
* @throws SQLException
public SqlScript(String scriptFileName) throws SQLException {
script = new File(scriptFileName);
// this is a 'custom' class, just use instead getConnection() from the
// DriverManager instead
conn = ConnectionManager.getConn("test");
stat = conn.createStatement();
public static void main(String[] args) {
try {
SqlScript sqlScript = new SqlScript("C:/temp/myscript.sql");
sqlScript.loadScript();
sqlScript.execute();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
protected void loadScript() throws IOException, SQLException {
BufferedReader reader = new BufferedReader(new FileReader(script));
String line;
StringBuffer query = new StringBuffer();
boolean queryEnds = false;
while ((line = reader.readLine()) != null) {
if (isComment(line))
continue;
queryEnds = checkStatementEnds(line);
query.append(line);
if (queryEnds) {
stat.addBatch(query.toString());
query.setLength(0);
private boolean isComment(String line) {
if ((line != null) && (line.length() > 0))
return (line.charAt(0) == '#');
return false;
public void execute() throws IOException, SQLException {
stat.executeBatch();
private boolean checkStatementEnds(String s) {
return (s.indexOf(QUERY_ENDS) != -1);
} -
Can SQL*PLUS deal with 'flat ASCII files' (input ) in UNIX ? and how?
Can SQL*PLUS deal with 'flat ASCII files' (input ) in UNIX ? and how?
No, but PL/SQL can. Look at utl_file.
John Alexander www.summitsoftwaredesign.com -
How can I extract the full SQL script for a schema?
Hi,
How can I extract the full SQL script for a schema?
I am looking for some method that needs jus SQL*Plus and preferably doesn’t need any extra tool.
Thank you,
AlanHow can I extract the full SQL script for a schema?What are you looking for? PL/SQL code? DDL for objects?
-
Difference between ';' and '/' in the SQL scripts
Hi All,
Could anyone please let me know the difference between placing ';' and '/' in the sql scripts.
I am placing couple of insert statements in a textfile with .sql extension and running it from the sql prompt.
Which one( ';' or '/') should be keep at the end of each statement in the script.
SQL> SELECT SYSDATE FROM DUAL;
SYSDATE
12-MAY-13
SQL> SELECT SYSDATE FROM DUAL
2 /
SYSDATE
12-MAY-13Thanks,968217 wrote:
My doubt is how it understands or the difference b/w the below two view statements one with ';' and another one with '/'. Sorry if i am unclear.They are identical in SQL*Plus. These characters mean "+send entered/buffered text to Oracle to parse and execute+".
So - SQL*Plus sends "+create or replace view ev1 as select ename , sal from emp+" to the server (via a cursor execute):
create or replace view ev1 as select ename , sal from emp
/And again, SQL*Plus sends "+create or replace view ev1 as select ename , sal from emp+" to the server (via a cursor execute):
create or replace view ev2 as select ename , sal from emp;These are identical statements.
As I mentioned in the post I referred you to. Oracle also uses the ";" character in the PL/SQL language. So when you enter PL/SQL code in SQL*Plus, you do not want SQL*Plus to send each line of PL/SQL code to the server. Instead, you want it to wait till the last statement has been entered and then send the the whole block to the server to be parsed and executed,
SQL*Plus has a basic parser itself. It uses that to figure out what you have entered, and whether a ";" you enter is an instruction from you to it, to send the text to the server - or when you enter a ";", it is part of the text for the server and that it should not react to it.
Thus when you enter the following, SQL*Plus recognises that you are using the SQL language, and as this language does not use ";" characters, a ";" character when entered means that it needs to send the text to the server to be parsed and executed:
SQL> select * from emp;
// ; character instructs SQL*Plus to create and execute cursor "select * from emp"When you enter PL/SQL code, SQL*Pus recognises that and knows that ";" characters entered indicates end-of-statement for PL//SQL and that it should not act on that,
SQL> begin
2 null;
3 end;
4 /
// SQL*Plus ignores the ";" character - and the "/" character is used to
// instruct SQL*Plus to create and execute cursor"begin<LF>null;><LF>end;" -
Can SQL Server Express Send Emails?
I am fiddling around with one of my SQL Server Express instances, and I'm trying to get it to send me an email. I just read these links.
http://execsql.org/configure-send-database-email-sql-server-2012-express-edition
http://www.databasejournal.com/features/mssql/article.php/3626056/Database-Mail-in-SQL-Server-2005.htm
I followed all the steps there, and now, as I'm trying to send myself an email, I get this message.
The mail could not be sent to the recipients because of the mail server failure. Exception Message: Could not connect to mail server.
When I run this:
SELECT * FROM msdb.dbo.sysmail_event_log;
I see this:
description
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2015-01-21T14:25:36). Exception Message: Could not connect to mail server. (The requested name is valid, but no data of the requested type was found).
Any idea what's wrong? Can SQL Server Express even send emails???
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.Hello,
You can make use of CLR Integration for sending email from SQL Server Express.
http://www.sqlservercentral.com/articles/SQL+Server+Express/71341/
http://www.vnypatel.com/sending-emails-with-clr-sql-server-express-editions
SQL Server Express does not support database mail.
https://msdn.microsoft.com/en-us/library/cc645993.aspx
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc
Hi,
Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc.
Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?
12.1.4 / 11g db
Appreciate your inputs.
Thanks,
KCan SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc. It should work.
Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, What is the issue you have with R12?
an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?What was Oracle feedback? Did they say it is certified and can be used?
Thanks,
Hussein -
How can I convert a mysql sql script to a oracle sql script
Hi,
We have a bunch of tables with data running on a mysql server.
This should now be moved to an oracle 9 db.
are there any tools to convert the import script of a mysql db
to a format of the sql script that work for oracle ?
Thanks
MichaelOracle has a tool called Migration Toolbench, which supports MySQL 3.22 and 3.23:
http://otn.oracle.com/tech/migration/workbench/content.html
On this same topic, I was wondering if anybody has tried migrating from PostgreSQL to Oracle 9i. The workbench doesn't seem to support it, and feeding a pg_dump file directly into SQL*Plus is not working. -
How can I read/write data files (text file) from PL/SQL Script
I had an oracle forms pl/sql program to read/write a data file (text file). When this code is run on a command line as a PL/SQL script using the SQL*Plus I am getting an error:
-- sample.sql
DECLARE
vLocation VARCHAR2(50) := 'r:\';
vFilename VARCHAR2(100) := 'sample.dat';
vTio TEXT_IO.FILE_TYPE;
vLinebuf VARCHAR2(2000);
vRownum NUMBER := 0;
-- use array to store data FROM each line of the text file
TYPE array_type IS VARRAY(15) OF VARCHAR2(100);
vColumn array_type := array_type('');
PROCEDURE prc_open_file(p_filename IN VARCHAR, p_access IN VARCHAR2) is
BEGIN
vTio := TEXT_IO.FOPEN(vLocation||p_filename,p_access);
EXCEPTION
WHEN OTHERS then
-- raise_application_error(-20000,'Unable to open '||p_filename);
message(sqlerrm);pause;
END;
PROCEDURE prc_close_file is
BEGIN
IF TEXT_IO.IS_OPEN(vTio) then
TEXT_IO.FCLOSE(vTio);
END IF;
END;
BEGIN
--extend AND initialize the array to 4 columns
vColumn.EXTEND(4,1);
prc_open_file(vFilename,'r');
LOOP
LTEXT_IO.GET_LINE(vTio,vLinebuf);
vColumn(1) := SUBSTR(vLineBuf, 1, 3);
vColumn(2) := SUBSTR(vLineBuf, 5, 8);
vColumn(3) := SUBSTR(vLineBuf,10,14);
Insert Into MySampleTable
Values
(vColumn(1), vColumn(2), vColumn(3));
EXIT WHEN vLinebuf IS NULL;
END LOOP;
prc_close_file;
END;
SQL> @c:\myworkspace\sql\scripts\sample.sql;
PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declaredIt works on the oracle forms but not on the SQL*Plus. Is there an alternative method using a PL/SQL script? A simple sample would help. Thanks.Did you ever noticed the search box at the right side of the forum?
A quick search (limited to this years entries) brought up this thread for example
Re: UTL_FILE Examples
Maybe you are looking for
-
How do I stop Itunes from changing my library location
Is there just no answer to what should be a simple setting change?? No matter what I do, Itunes insists on changing my library location the instant there's any problem talking to my network share where all of my music is. This is absolutely ridiculou
-
Hi all, i have a zoom H4 that i am using as an interface at the moment. all was fine untill i updated my computer to 10.5.6 around christmass. in my last post a few days ago someone said to update the H4 but it has the current drivers already (2.20)
-
Creating video from DVD files?
Someone sent me a DVD of some video he shot for a show that I was in. Is there a way to convert the files from the DVD to a video file that I can edit and post on Facebook?
-
Hi Team , I have SQL Cluster 2012 server running with Couple of Critical data base instance . Each instance installed in different drive. One of my application database is having mdf of size 1 Gb and ldf is 250 GB . Database is set to full recovery m
-
Sorry for error in Darren McNally's name
I spell checked my original message about being able to flash 9, but did not catch the error in Mr. McNally's name. I highly recommend to those who are still having install problems to follow his instructions about Download Center problems. Just be s