Forum Stats

  • 3,840,396 Users
  • 2,262,599 Discussions
  • 7,901,263 Comments

Discussions

SQL Developer Reports - Queries lost

hermanmol
hermanmol Member Posts: 25 Bronze Badge
edited May 18, 2022 7:45AM in SQL Developer

I am using my Windows 10 laptop for SQL Developer and I am a "heavy" user of the Reports. I create an use lots of the User Defined Reports and store the ones I want to keep in a sub-folder of User Define Reports (makes it easy to export). I use drilldown and child.

Today I started SQL Developer and ... the User Defined Reports report definitions are there (the tree is build in the Report panel) but all the SQL queries are EMPTY :-0

OMG... and I did not make a backup last weeks....

The standard reports that come with SQL Developer all seem to work fine.

So...

What I did yesterday and might be the cause of this - since I never did it before and it crashed - is that I wanted to "Generate DB Doc ..." from the r-click popup menu of a connection. It worked for a small DB-schema, but when ran it for the most interesting -large!- schema, the process aborted. I tried it first running in the foreground and second running in the background.

Two questions:

  1. is there any possibility I can get my reports back? Are they still somewhere?
  2. is this a bug? How to fix this?


My SQL Developer Configuration is in the attached file.

Thanks,

Herman

Best Answer

  • User_2DKLA
    User_2DKLA Member Posts: 47 Blue Ribbon
    Answer ✓

    Hi,

    User Reports are persisted by SQL Developer in the UserReports.xml file, under %APPDATA%\SQL Developer if using Windows.

    That single file contains all your User Reports, and it is rewritten by SQL Developer whenever anything pertaining to User Reports is changed, e.g. after adding a new report, modifying an existing one, deleting, importing, creating a folder, etc.

    So, yes, having backups of that file may turn out to be very useful at times.

    Alternatively, always export your reports to separate XML files after you have made any serious work in them.

    Regards,

Answers

  • Mike Kutz
    Mike Kutz Member Posts: 6,198 Silver Crown

    I can't help you.

    IIRC - I Export the reports and add that Export file to a code repository

  • hermanmol
    hermanmol Member Posts: 25 Bronze Badge

    Hi Mike, thanks for the reply.

    Indeed ... I know ... Unfortunately this happened before I did that.

    Do you know of any batch (powershell? cmd?) that can be executed so these reports are automatically exported (and subsequently the XML is included in my regular, scheduled backup?

    Or perhaps which SQL Developer folder I should include in my scheduled backup?

    Kind regards,

    Herman

  • Mike Kutz
    Mike Kutz Member Posts: 6,198 Silver Crown

    I would have to check what sql developer command line can do.

    Someone from the SQL Developer team (eg @thatJeffSmith-Oracle ) should be able to tell you which folder(s) would need to be included. I suspect they are under /users/person/roaming

  • User_2DKLA
    User_2DKLA Member Posts: 47 Blue Ribbon
    Answer ✓

    Hi,

    User Reports are persisted by SQL Developer in the UserReports.xml file, under %APPDATA%\SQL Developer if using Windows.

    That single file contains all your User Reports, and it is rewritten by SQL Developer whenever anything pertaining to User Reports is changed, e.g. after adding a new report, modifying an existing one, deleting, importing, creating a folder, etc.

    So, yes, having backups of that file may turn out to be very useful at times.

    Alternatively, always export your reports to separate XML files after you have made any serious work in them.

    Regards,

  • hermanmol
    hermanmol Member Posts: 25 Bronze Badge

    Hi,

    Thank you @Mike Kutz and @User_2DKLA . I have checked and in that XML the query nodes are all empty CDATA's . So what exactly happened that caused this, remains unknown - for now. I suspect the crashes when trying the DBDoc from the r-click popup menu of a connection to a large schema...

    I will add the XML's in %APPDATA%\SQL Developer to my regular backup.

    Regards,

    Herman