0

I'm migrating our SQL Server production DB to oracle using oracle SQL Developer , I fixed many problems (oracle 30 charachters objects name limit ... ) but still have trouble with this : When I migrate an object named transaction in my Sql Server DB I get TRANSACTION in my oracle DB (I'm using Entity Framework as ORM so my code is case sensitive and I can't change it) I need to know if there is a way to keep my object names (Tables,Columns,SPs,Constraints ...) while Online migration. Thanks for your help.

Boneist
  • 22,910
  • 1
  • 25
  • 40
  • Consider this re: the capitalization (and double-quoting thereof): http://stackoverflow.com/questions/13346273/force-identifier-case-sensitivity-in-oracle – Marc Mar 15 '16 at 17:21
  • You'll have to explain how exactly you perform the migration. In general you'll need to quote identifiers to prevent Oracle from converting them to upper case: `create table "transactions"...`, `select * from "transactions"...` – mustaccio Mar 15 '16 at 17:23
  • Thanks for your feedback.. I'm using SQL developper Online migration I can't change generated script (This is possible using Offline method) so I can't add quotes.. well i think i have to do renaming all objects manually to lower case or using a script comparing names in sql server with oracle and renaming them – salah smiti Mar 15 '16 at 17:25
  • I personally wouldn't bother worrying about the case sensitivity of your Oracle objects; If you don't use double-quotes around the object name when referring to them and you don't have objects that would resolve to the same upper case name (eg. two tables "Table1" and "TABLE1") then it shouldn't matter that they are case insensitive in the database. – Boneist Mar 15 '16 at 17:26
  • Oracle and sql server are case insensitive : i have no problem there : my code (Repositories) are calling entities from the EDMX so when i call context.transaction it differs from context.TRANSACTIOn – salah smiti Mar 15 '16 at 17:30

1 Answers1

1

You can double quote the name and this will retain the case sensitivity. This is not recommended when working within Oracle as only the double quoted name will work.

What you want

select "myschema"."mytable"."mycolumn" from "mytable"

or

Create table "mytable" as...

if you do this then when using SQL developer

select * from "mytable" works......

select * from mytable is not recognized.

kevinskio
  • 4,431
  • 1
  • 22
  • 36
  • My problem is in my code (**Repositories**) I'm calling EDMX entities from the repositories so when i call context.transaction it differs from context.TRANSACTION – salah smiti Mar 15 '16 at 17:34