Forum Stats

  • 3,827,902 Users
  • 2,260,838 Discussions
  • 7,897,403 Comments

Discussions

How to export app & its tables and data?

DannyS-Oracle
DannyS-Oracle Member Posts: 165
edited Aug 1, 2016 6:10PM in APEX Discussions

Hi Apex gurus, experts, masters, and professors,

I am trying to export one application from my workspace to my co-worker's workspace, but so far we can only export & import the application (pages) - without the tables and data. It seems there is no straightforward way to export tables from the Object Browser. I already tried the Generate DDL script from menu SQL Workshop > SQL Script, chose the tables, but got this error when my co-worker tried to install the script to his own workspace:

image001.png

I also looked into this thread: Export APEX application, DDL and data, which suggest SQL Developer to do the table and data export. But the problem is I am using Oracle Cloud Apex as a Service. I don't know how to make remote connection to it.

Is there an easier solution for this? Any help will be appreciated!

P.S. I am using Apex v5.0.3

Answers

  • Mahmoud_Rabie
    Mahmoud_Rabie Cloud Solution Architect, Member Posts: 3,216 Bronze Crown
    edited Aug 1, 2016 12:45PM

    Hi Danny

    I would recommend

    ApexLib Schema Export

    The ApexLib Schema Export Tool helps you to extract EVERYTHING out of one database schema.

    With a simple click you get one .SQL File containing all Tables, Views, Triggers, Packages, DATA and APEX Applications.

    Thanks to Patrick.

    Reference

    ApexLib - Tools

    Regards

    Mahmoud

  • Mike Kutz
    Mike Kutz Member Posts: 6,195 Silver Crown
    edited Aug 1, 2016 1:07PM

    Why are you not giving your co-worker the CREATE _____ scripts that exist in your local code repository?

    MK

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,981 Red Diamond
    edited Aug 1, 2016 1:17PM
    Danny Sindra-Oracle wrote:I am trying to export one application from my workspace to my co-worker's workspace, but so far we can only export & import the application (pages) - without the tables and data. It seems there is no straightforward way to export tables from the Object Browser. I already tried the Generate DDL script from menu SQL Workshop > SQL Script, chose the tables, but got this error when my co-worker tried to install the script to his own workspace:
    image001.png

    I also looked into this thread: Export APEX application, DDL and data, which suggest SQL Developer to do the table and data export. But the problem is I am using Oracle Cloud Apex as a Service. I don't know how to make remote connection to it.

    Is there an easier solution for this? Any help will be appreciated!

    P.S. I am using Apex v5.0.3

    The "File is not a valid Application Express application export file" error message and the "ion" fragment visible in the image suggests that your co-worker is trying to import the SQL Script into the Application Builder as an application export rather than as a SQL script via the SQL Workshop SQL script repository.

    This is an example of why posting incomplete screenshots is the wrong way to go about getting help. There's no context for that error message. If the entire browser window is posted then there's less need for us to launch into Sherlock Holmes mode. We'd be able to tell exactly what had occurred. More importantly, as well as being a huge waste of bandwidth for mobile users, screenshots are completely inaccessible. What if the person with the answer to your question is visually impaired and using a screen reader? Those images convey nothing to them. If you can't express the problem clearly and completely in a textual description then reproduce it in a shared workspace on apex.oracle.com.

  • DannyS-Oracle
    DannyS-Oracle Member Posts: 165
    edited Aug 1, 2016 2:18PM

    Hi @Mahmoud_Rabie, is this tool only works for locally installed Apex? I am using Apex as a service, provided by Oracle in apex.oraclecorp.com. I don't have the privilege to install anything on the server ...

    Mike Kutz, as I described to Mahmoud as well, the Apex is not installed locally. My co-worker and I used Oracle Apex as a Service, and we do not have access to the files and we cannot install any extra tools there.

    @fac586 Thanks for the suggestion, I already instructed my co-worker to install as SQL script before, but I just sent him another email to verify if he followed the instruction correctly or made mistake like you mentioned. Sorry for the cropped image, that's the only one I got from my co-worker, so please no need to be rude (I notice it seems you often did this to other members as well). I have reasons to not recreate the problem in a shared workspace:

    • Data privacy - I cannot share some company sensitive data.
    • Time - Because I cannot share the data, I will have to spend quite a time to think and recreate the same condition in the other workspace. My team and I simply do not have the luxury of time to do it for every question we have.
    • Efficiency - so far all the questions I posted here can be answered without providing a shared workspace. Why should I start every question by making in the shared workspace? I will do if someone ask for it, though. But so far the community able to answer them without needing it.

    And even though I am aware I might lose help from the mobile-user or visually-impaired members here, I am willing to take that risk for the given reasons.

  • DannyS-Oracle
    DannyS-Oracle Member Posts: 165
    edited Aug 1, 2016 2:39PM

    Ok, so just confirmed with my co-worker. He did it wrongly like @fac586 predicted. But after he imported it via the SQL script, the tables are still not installed.

    As final resort, I decided to let him login to my workspace as developer, duplicate my existing app and tables in the workspace, and then he will continue work and modify from it to suit his client's need. This is not the ideal export / import like we expected at all, as I am sharing storage and everything with him from now on, but this is the only working solution we can come up for now.

    I am wondering why Apex makes basic things for teamwork so difficult, from version control to simple import/export between workspaces. Hopefully these issues will be resolved soon. Sorry for the rant, and thanks again for the suggestions guys! Really appreciate it.

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,981 Red Diamond
    edited Aug 1, 2016 4:11PM
    Danny Sindra-Oracle wrote:Ok, so just confirmed with my co-worker. He did it wrongly like fac586 predicted. But after he imported it via the SQL script, the tables are still not installed.

    The script has to be executed after import.

  • DannyS-Oracle
    DannyS-Oracle Member Posts: 165
    edited Aug 1, 2016 6:10PM

    Yep, he ran it after the import. No error, but no tables installed. I already make sure to check all the tables to include in the script before export ...

This discussion has been closed.