BUG: Export DDL and Data fails for mixed case table/column names

Hi there,
I have found a bug in SQL Developer. See details below.
Description:
When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid.
Steps to reproduce:
- open SQL Developer, connect to DB
- make a table named "lowerCase" (in double quotes, so it won't be automatically changed to capital letters)
- you may also add some columns, for example "lowerCol1", "UpCol2", ALLUPCOL3
- add some data rows to the table
- choose Tools -> Export DDL and Data
- check exporting of tables and data, on "filter" tabs choose your "lowerCase" table
- press "Apply"
Error:
Generated SQL contains invalid INSERTs: mixed-case table and columns are referenced without obligatory double quotes, which yields an error when generated script is executed (see below, relevant line is underlined)
-- DDL for Table lowerCase
CREATE TABLE "DBO_HT"."lowerCase"
(     "lowerCol1" VARCHAR2(100),
     "UpCol2" VARCHAR2(100),
     "ALLUPCOL3" VARCHAR2(100)
-- DATA FOR TABLE lowerCase
-- FILTER = none used
-- INSERTING into lowerCase
Insert into lowerCase (lowerCol1,UpCol2,ALLUPCOL3) values ('lc','uc','auc');
-- END DATA FOR TABLE lowerCase
Remarks
SQL Developer: version 1.2.1, build MAIN-32.13
Oracle DBs: 9.2 & Express
OS: Windows 2000 Professional
If you need any more details/testing, let me know. I'd really appreciate a quick patch for this issue...
Alternatively, do you know of any other simple way of copying a single database (it's called a schema in Oracle, right?) from one computer to another? Possibly something so simple like detaching->copying->reattaching mdf (data) files in SQL Server... I thought that this "Export DDL&Data" function will do, but as you can see I couldn't use it.
I just need a simple solution that works - one operation on source to stuff, get the resulting files to other computer and one operation to have it running there... I think that such scenario is very basic, yet I just can't achieve it and I am simply not allowed to spend more time on it (read: our test project fails, my company rejects my "lobbying" and stays with MSSQL :/ )
Thanks a lot & bye

Thanks for your reply.
ad. 1)
You're right. I just wanted to give some very short feedback on my experiences with SQL Developer, so I didn't think starting new threads would be necessary, but as I was writing it became much bigger than I initially planned - sorry about that. I will make proper threads as soon as possible. Having "Edit post" button on this forum would also be useful.
ad. 2)
Generally, you're right - in most cases it's true that "switching DBMS is a major commitment" and "you will produce terrible code" if you don't learn the new one.
However, I think that you miss one part of market here - the market that I think Express is also targeted on. I'd call it a "fire&forget databases" market; MySQL comes to mind as possibly most common solution here. It's the rather small systems, possibly web-accessed, whose data-throughput requirements are rather modest; the point is to store data at all, and not necesarily in fastest way, because given the amount of data that is used, even on low-end hardware it will work well enough. What's important here is its general ease of use - how easy is to set up such system, connect and access data, develop a software using it, how much maintenance is needed, how easy this maintenance is, how easy are the most common development tasks as creating a DB, moving a DB from test to production server etc. There, "how easy" directly translates to "how much time we need to set it up", which translates to "how much will the development will cost".
Considering the current technology, switching the DBMS in such systems is not necesarily a major commitment and believe me that you will not produce terrible code. In many cases it's as simple as changing a switch in your ORM toolkit: hibernate.dialect = Hibernate.Dialect.OracleDialect vs MySQLDialect vs MsSql2005Dialect
Therefore, in some part of market it's easy to switch DBMS, even on project-by-project basis. The reason to switch will appear when other DBMS makes life easier => development faster. From that point of view, I can understand my colleagues giving me an embarassing look and saying "come on, I won't read all these docs just to have db copied to test server". And it doesn't mean "they are not willing to learn anything new", it's just that they feel such basic task should have self-explaining solution that doesn't require mastering any special knowledge. And if they get such simple solutions somewhere else, it costs them nothing to change the hibernate dialect.
I think Oracle did the great job with introducing the Express to this "fire&forget" market. The installation is a snap, it just works out of the box, nothing serious to configure, opposite to what I remember from installing and working on Oracle 9 a few years ago. In some places it's still "you need to start SQL*Plus and enter this script", but it's definitely less than before. I also find the SQL Developer a great tool, it can do most of what we need to do with the DB, it's also much better and pleasant to use over Oracle 9 tools. Still, a few basic things still require too much hassle, and I'd say taking your schema to another machine is one of them. So I think that, if you do it well, the "schema copy wizard" you mentioned might be very helpful. If I was to give any general advice for Express line of DB/tools, I'd say "make things simple" - make it "a DB you can't see".
That's, IMHO, the way to attract more Express users.

Similar Messages

  • Mixed case table/col names and JDeveloper?

    I am thinking of trying to use mixed case table/column names in my Oracle 8i database.
    My hope is to achieve table/column names consistent with Java conventions (which I am happy with).
    Would this work with Jdeveloper 3.1? 3.2?
    Will JDeveloper/BC4J then generate mixed case names?
    Will I cause my self lots of pain and suffering? (I don't consider having to enter a correct mixed case name a pain; I do consider always having to quote it and/or use TOUPPER, etc. a bit of pain)
    Thanks
    R.Parr
    Temporal Arts
    null

    I do consider always having to quote it and/or use TOUPPER, etc. a bit of pain)<<<JDEV isn't as much the issue. If you have simple applications and don't intend to change things over time, or create lots of interfaces, or support multiple development tools against the same database, mixed cases seem to work fine.
    To give yourself an idea of how cumbersome things will be, go in and
    create "myTable" ( "myField" varchar2(20) );
    now DESC ribe the table,
    select myField from it.
    Putting doublequotes around things all the time gets very irritating. Remember it is also for having special characters and embedded spaces... and I don't know of any PL/SQL SET ( other than the opposite: SQLCASE that forces just about everything to uppercase ).
    Oh, and then you get to encounter fun things like ODBC and JDBC drivers that may or may not like it. Or if you MOVE/EXPORT the data around, your target may or may not be happy.
    Working at several diversified, large organization with MANY database products/targets, I've become very disenchanted with making mixed case attributes and table names!
    All tools should support mixed case correctly. Reality has returned a mixed case of results. grin or not, as the case may be.
    null

  • Creation of a generic extractor and data source for the FAGLFLEXA table

    Hi All,
    Need to create a generic extractor and data source for the FAGLFLEXA table to support AR reporting. This table contains the necessary profit center information to perform LOB reporting against the AR data.
    Please advice on how to do this.
    Regards, Vishal

    Hi Vishal,
    Its seems a simple a work out.
    1.Go to RSO2 & choose the relevant option ie. whether you want to create Transactional DS, Master Data DS or Text DS.
    2. Name it accordingly & then create.
    3. Give description to it & then give table name FAGLFLEXA.
    4. Save it & activate. If you need it to be delta enabled then click over Delta & you can choose accordingly.
    If you still face some problem then do mail me at [email protected]
    Assign points if helpful
    Regards,
    Himanshu

  • How to find unsued Transfer Rules and Data Sources for a Master Table...??

    How to find unsued Transfer Rules and Data Sources for a Master Table...?? My requirement is i need to delete those Transfer rules and Data Sources which are not in use

    Hi
    Go to manage of the Text or attirbute of the master data object, see what are being loaded daily from there and delete the remaining.
    Cheer
    Ans as expected, Please reward

  • Tools - Export DDL (and data) mishandles timestamps

    I used SQLDeveloper to try to do a quick export of some test data. Here is a sample of part of an insert statement created by the export data option:
    to_timestamp('2005-12-31 00:00:00.0','DD-MON-RR HH.MI.SS.FF AM')
    This clearly will not work as the timestamp was retrieved in a format different than the format used in the to_timestamp() function. I tried to fix it, but I found than the utility switched from format to format. Some insert statements were consistent, some formatted the actual data differently, others used different format strings. It looked like I went to each developer and told them to write some code to create insert statements for their tables. Each one came back using a different format. Some were able to code valid SQL statements while others weren't able to create valid SQL. Unfortunately this was all done by one click. I cannot fathom how you all created such a mess because not only is it wrong (sometimes) but it is inconsistent. Actually I would guess someone created a hash table of available formats and randomly picked from the hash table.

    There is actually no error we are using dbms_metadata to see if there are contraints or ref_contraints on the table and this is the way it tells us there are not. We should be capturing this message better and not sending it to the user and I will fix that in the next release.
    However, this error should not be affecting your export if it is or you see missing information from the generated export file please reply.

  • How to list column names and data types for a given table using SQL

    I remember that it is possible to use a select statement to list the column names and data types of databaase tables but forgot how its done. Please help.

    You can select what you need from DBA_TAB_COLUMNS (or ALL_TAB_COLUMNS or USER_TAB_COLUMNS).

  • SQL Dev 1.5.4+: Scripting DDL and data dumps?

    In SQL Dev 1.5.4, can I script a DDL and data dump? If not, what about 2.0? If not 2.0, has anyone requested this functionality so I can vote for it? I find it frustrating that, while doing a Database Export, I can't even pre-declare (e.g. save) the set of objects I want to dump; sometimes, you want to selectively dump, and it's a pain to hunt and peck and select just those you want to dump. Easy if you want to dump everything but 2-3 objects in a large schema. Not so easy if you only need, say, 20 out of 100 objects to be dumped (e.g. for domain or configuration tables--some subset of the whole schema).
    I'm really enjoying SQL Developer 1.5.4 by the way. Despite it's flaws, I'm pretty happy with it. Looking forward to 2.0 and beyond. Good work SQL Dev team.
    Thanks very much.
    Dana

    They're all command line tools, so they can all be wrapped up in a batch or shell script. Bummer you can't access them... Hope you find a better solutionThanks K. I should be getting Oracle 10g Express Edition on my desktop soon--critical because we don't have full access to the Development instance. It's like putting changes through a straw over to the DBAs. I'm not sure why Development is locked-down to developers, but that's the way it is.
    Any chance that Oracle 10g Express Edition comes with scriptable data pump binaries? Will still need authorization, but maybe that's one way to go. I hate trying to write my own Data Pump in Python or any other language. It's seems a bit absurd to me but I suppose there are reasons.
    Dana

  • Exporting audio and video together for Mpeg2 dvd

    Hi, I'm trying to export audio and video together for Mpeg2 dvd.. I changed  multiplexing to DVD but is still exporting seperately is there something im missing? thanksa

    To add, with Multiplexing set to NONE, check what the Audio format is set to. If "PCM", this is an uncompressed .wav file and will result in export of .m2v video and .wav audio (I think Mac uses .aif) and use "Import as Timeline" in Encore for both clips at once. Encore will automatically transcode the audio to Dolby AC-3, do NOT mess with settings in Encore, defaults are correct. If you have CS6, then in AME audio settings, there is an option for Dolby and you can use that to create the .ac3 audio and then Encore does NOT do any transcoding to audio or video. Note that older versions will also show "Dolby" but that is a free trial of a surround encoder, not the same. You just want the stereo option available in CS6, or use PCM option is fine
    Thanks
    Jeff Pulera
    Safe Harbor Computers

  • Question about voice and data plan for Europe

    I am in New York and my boss is going to France for a week and a half. He told me he will not have access to the internet there. He asked me to find out if it would be possible to get a voice and data plan for the month that he will be there, and if so, could someone show me where I could look at the different plans available?
    If it's not possible to do that for just a month, then could someone tell me where I could find the rates are for voice and data in France?
    Thanks

    Hi kevindrosario,
    I appreciate your interest in our International Services.  France, is a GSM country and will only support a Global capable device. Unfortunately, its not clear if your boss has a Global capable device.  If so, here are the details for the voice and data rates for France.
    If your boss doesn't not have a Global capable device, no worries!  We offer an Occasional Global Traveler program, in which we will loan you a Global device for up to 21 days.  I hope this information is helpful.  Please let me know if you have any any additional questions or concerns.
    Thank you,

  • How to avoid the Amount and Date values for VOID Cheques

    Hi All,
    I had created a two window i.e For Amount and Date. If I process the cheque the Amount value and Date should not trigger for VOID CHEQUES.
    Can any one tel me how to avoid the Amount and Date values for VOID Cheques
    Your help will be greatly appreciated.
    Regards
    Yathish

    Hi,
    I dont know which tablel you are referring to, is it PAYR table and the field VOIDR?
    If a cheque is voided, it would have a reason and it is stored in VOIDR field of this PAYR table.
    Check if the field VOIDR is filled, if it is filled, do not print the amount and date.
    Regards
    Subramanian

  • HT4889 Is it possible to use the migration assistant to transfer only some documents and data? For example, I was to transfer my music, but not my word documents. There doesn't seem to be any options to customise what you are transferring - its all or not

    Is it possible to use the migration assistant to transfer only some documents and data? For example, I was to transfer my music, but not my word documents. There doesn't seem to be any options to customise what you are transferring - its all or nothing

    LBraidwood wrote:
    Is it possible to use the migration assistant to transfer only some documents and data? For example, I was to transfer my music, but not my word documents. There doesn't seem to be any options to customise what you are transferring - its all or nothing
    Yes, that's why I recommend one have more than TimeMachine as a backup because if certain files or folders are corrupted on the TM drive, your not logging into your migrated user account or not be able to transfer it what so ever.
    Then it's a REAL PAIN and costs $99 to bit read the TM drive to get the files out, then it's mess to go through and sort all the empty placeholders from the real files as TM doesn't save duplicates in each state, just uses the previous state's copy if there are no changes.
    If you create the same named user account on the new machine, and simply transfer files via a USB thumb drive and place say music contents into the Music folder, then it will work too.
    Look into making clones of your boot drive, the benefit here is it's bootable, you can access the drive directly to pick and choose files, run the computer just like before etc.
    Most commonly used backup methods explained

  • Performing check and potential update for status control table

    Cheers Experts,
    I searched in the forum, but I didn't find an answer.
    I'm working on a 3.0B BW system.
    After updating from PSA to an ODS, in the log I see the following line:
    "Performing check and potential update for status control table" and double clicking on it, it says:
    If data is loaded into an InfoCube, or existing data is edited (aggregated/compressed/deleted/got from a DataMart), then there is a change in  the potential reportability of the data , or the possibility of deleting data by request, or of aggregating or compressing.
    This status of each one of these Cubes is stored in a status table, that is updated when there is any change to the status of a request in the Cube.
    The system now analyzes the requests in the Cube and compares the calculated status with the status table.
    If deviations from the status table arise then you are given the option of adjusting the status table.                                         
    I have 2 questions:
    1) What is BW doing, mainly because I'm working on an ODS and not an Infocube?
    2) What can I do to reduce its execution time, since it lasts several minutes?
    Thanks and greetings.
    Roberto

    Roberto, did you ever find an answer to your question?  We also are experiencing long runtimes during this particular process running 3.x deltas from ODS to ODS and cubes.

  • Syntax of DDL options and related (table) column names

    Hi,
    where can I find something like a mapping between DDL options and related table column names?
    For example I do have the table options PCTFREE, FREELISTS and NOCOMPRESS. The related table columns out of user_tables are PCT_FREE, FREELIST and COMPRESS.
    PCT(_)FREE wins an Underscore, FREELIST(S) wins an "S" and it is "NOCOMPRESS" if COMPRESS has a value "Y(es)".
    Hope somebody can help.

    So far I didn't find any information that is not in
    the DDL script gernerated from
    DBMS_METADATA.get_DDL.Alright, I give you an example:
    I create a table with the following DDL:
    "CREATE TABLE IntBuch (
    int_bunr integer NOT NULL,
    int_sdat double precision NOT NULL,
    int_hblz char(8) NOT NULL,
    int_hkto char(7) NOT NULL,
    int_hdat double precision NOT NULL,
    KtoNr char(7) NOT NULL,
    BLZ char(8) NOT NULL,
    CONSTRAINT PK_IntBuch PRIMARY KEY (int_bunr)
    USING INDEX
    PCTFREE 10
    STORAGE (
    INITIAL 1000
    NEXT 500
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS 4096
    PCTFREE 20
    LOGGING
    CREATE UNIQUE INDEX intid
    ON IntBuch (int_bunr DESC)
    CREATE INDEX hkto
    ON IntBuch (int_hblz,int_hkto)
    COMMENT ON TABLE IntBuch
    IS 'Kommentar zu DB-Tabelle InBuch'
    COMMENT ON COLUMN IntBuch.int_sdat IS 'Kommentar zu DB-Spalte int_sdat'
    ALTER TABLE IntBuch
    ADD CONSTRAINT Gutschrift FOREIGN KEY (int_hkto,int_hblz) REFERENCES Konto
    ON DELETE CASCADE
    ADD FOREIGN KEY (KtoNr,BLZ) REFERENCES Konto
    ADD FOREIGN KEY (int_bunr) REFERENCES Buchung
    ON DELETE CASCADE
    After that I read the DDL with DBMS_METADATA.get_DDL and I get
    " CREATE TABLE "UOENDE"."INTBUCH"
    (     "INT_BUNR" NUMBER(*,0) NOT NULL ENABLE,
         "INT_SDAT" FLOAT(126) NOT NULL ENABLE,
         "INT_HBLZ" CHAR(8) NOT NULL ENABLE,
         "INT_HKTO" CHAR(7) NOT NULL ENABLE,
         "INT_HDAT" FLOAT(126) NOT NULL ENABLE,
         "KTONR" CHAR(7) NOT NULL ENABLE,
         "BLZ" CHAR(8) NOT NULL ENABLE,
         CONSTRAINT "PK_INTBUCH" PRIMARY KEY ("INT_BUNR")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE,
         CONSTRAINT "GUTSCHRIFT" FOREIGN KEY ("INT_HKTO", "INT_HBLZ")
         REFERENCES "UOENDE"."KONTO" ("KTONR", "BLZ") ON DELETE CASCADE ENABLE,
         FOREIGN KEY ("KTONR", "BLZ")
         REFERENCES "UOENDE"."KONTO" ("KTONR", "BLZ") ENABLE,
         FOREIGN KEY ("INT_BUNR")
         REFERENCES "UOENDE"."BUCHUNG" ("BU_NR") ON DELETE CASCADE ENABLE
    ) PCTFREE 20 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS"
    If there are no more DDLOptions possible than that, it is fine for me. If not, but all kinds of options are to find in only one or two tables of the database ( user_tables for table options, dba_constraints and dba_segments for column options, primary and foreign keys, user_indexes and user_segments for indexes ...), that is fine for me, too. (As long as I get to know which tables are "sufficient" for that.) If it is different than both of that, that's bad.
    However if you want to use defaults instead of
    absolut values, it is better to remove certain parts,
    like the storage clause, from the generated output.I understand this, but I am more interested to have all and not leaving out some of them in order to have the defaults in the database after running the DDL.
    A totally different approach could be to
    a) create a database link from one DB to another.
    b) create table <new_table> as select * from
    <old_table@dbLink> where 1=2;I keep that in mind, thanks for that hint.

  • Remain case for table column name

    Hello, i am a java developer. I had helped my company to develop a java application all the while and before this we are using ms sql server database. Recently, we want to migrate the database to oracle database. The problem is, in our application, we use the resultsetmetadata to retrieve all the table column name and respective data and store in hashtable, but in ms sql server the table column name is not all in uppercase. When our application try to get the data using hashtable.get("aColumnName"), it will fail because in oracle the column name is all in uppercase. There are more than 1000 jsp page and java code that used the same method to get data, so if i want to change all the code to uppercase, it will consume a lot of unproductive time, is there any way to solve this?

    I assume that your code builds an SQL statement like "select * from ??? where table_name = '????';".
    If this is correct just wrap the table_name in UPPER(table_name).
    If my assumption is incorrect then please give more information.
    James.

  • Finding source database table/column name for a column in a view

    Hi i need to be able to identify the original database table/column name for a column in a view.
    e.g. say i have a view like this
    create v1 as select a.name fname, b.name bname, c.name cname,......
    from u1.names a, u2.names b. u3.names c
    where .....
    Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
    But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
    Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.

    But i need to be able to do it for any view. Short of
    parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt.

Maybe you are looking for

  • How can I delete an old alias?

    I'm getting lots of spam to an old MobileMe alias. I'd like to delete this alias, but I can't figure out how. It is not in the list of 5 aliases provided by icloud. I think with mobileme we had 6 aliases, and this alias must be the sixth. Any help ap

  • How do I import video from my new Canon FX300?

    How do I import video from my Canon FX300 into FCP?

  • Grey color change When i turn on my computer

    Hi. I have a strange problem When i turn on my computer. The screen is grey bit suddenly turns to otee just for a second and the Apple logo turns pink, after the screen returns grey and everythings is ok. Why happens this? Must i send my computer to

  • Is it possible to remotely control an Ipod from a PC?

    Is it possible to remotely control an Ipod from a PC?

  • Airport Extreme disconnects IChat

    My AEBS is connected to a router which gets its WAN from a VOIP Wan connection. I had to put the VOIP box inbetween the cable modem and the router because it will only work correctly that way. My AEBS works fine for everything EXCEPT I cannot logon t