Book a Demo

Author Topic: Producing a usable SQL file [ddl] for a DBA to use  (Read 3871 times)

tabb1458963

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Producing a usable SQL file [ddl] for a DBA to use
« on: September 18, 2015, 08:59:51 pm »
The .sql file which is produced does not reatin the formatting and the DBa's i work with are unable to use the file.  How can this be?  Any advice on what i might be doing wrong?  

I am following the tutorial and have reviewed this online.
No one seems to be able to advise?  

we purchased this tool with the intention of producing db scripts for a separate team to use.  if it cannot do this then that is an issue. :-?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Producing a usable SQL file [ddl] for a DBA to
« Reply #1 on: September 18, 2015, 09:10:46 pm »
It would probably help others to help you if you define what "unable to use" means.

q.

tabb1458963

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Producing a usable SQL file [ddl] for a DBA to
« Reply #2 on: September 18, 2015, 09:14:29 pm »
When you view the file [within e.a.] it has formatting like you would expect to see it.  When opening the .sql file produced outside of e.a the file is in one long narrative.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Producing a usable SQL file [ddl] for a DBA to
« Reply #3 on: September 18, 2015, 10:54:04 pm »
It's meant to be read by a machine, isn't it?

q.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Producing a usable SQL file [ddl] for a DBA to
« Reply #4 on: September 24, 2015, 09:17:25 am »
Quote
It's meant to be read by a machine, isn't it?
Careful about the way you describe our DBAs.
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

MMA

  • EA User
  • **
  • Posts: 63
  • Karma: +3/-0
    • View Profile
Re: Producing a usable SQL file [ddl] for a DBA to
« Reply #5 on: September 30, 2015, 02:58:41 pm »
Quote
When you view the file [within e.a.] it has formatting like you would expect to see it.  When opening the .sql file produced outside of e.a the file is in one long narrative.


I could reproduce your problem in Windows' Notepad.

The reason is that the exported file is using "\n" (line feed) as line separator, your system (editor) might expect "\r" (carriage return) or "\r\n" (carriage return + line feed) .

You can easily get around of this issue by changing an editor. E.g. it  formats well on my Windows and Notepad++. Or you can use EA to open (Ctrl + Alt + O) this .sql file.

You can submit a ticket requesting the format be controlled by Tools | Options | Code Engineering | "output files use both CR & LF". If the option is ticked, it should generate "\r\n" instead of "\n", then it will work for all editors.

Hope that helps  ;)
« Last Edit: September 30, 2015, 03:23:29 pm by milesma »