38 responses

  1. David Grimberg
    July 17, 2013

    Odd I was thinking that Unit Testing might be the biggest use of the CLI for use in continuous integration environments.

    It’s probably a toss up between the two :)

    • thatjeffsmith
      thatjeffsmith
      July 17, 2013

      Well, we already had a way to run unit tests for CI, but 1)way more people use reports over unit tests and 2)see #1 :)

  2. Andrey Goryunov
    July 17, 2013

    Thanks for the description, Jeff! Is there a chance to create pdf using cli? what would be the option to use in command line call?

    Thanks,
    Andrey

  3. thatjeffsmith
    thatjeffsmith
    July 17, 2013

    I think PDF output is the next logical step Andrey – it’s just not done yet.

    • Chuy Sanchez
      April 2, 2014

      Do you have an idea of when the ability to save to PDF will be added?

      Thanks,

      • thatjeffsmith
        thatjeffsmith
        April 3, 2014

        I’ll add your vote to the list Chuy :)

  4. Vishal Gupta
    July 18, 2013
  5. Michael
    July 22, 2013

    I know it’s important to keep developers motivated, but is there a risk that you’re losing focus on what the product is for? First and foremost it’s an IDE – and v3 is the least popular SQL IDE in my office by a long distance. I’ve not seen v4 yet, but v3 has enough bugs/annoyances to keep you busy for a long time. Your feature request list is very long – is there really a lot of people asking for a CLI? Sorry to be grumpy – just my two cents.

    • thatjeffsmith
      thatjeffsmith
      July 22, 2013

      I welcome your candor, and don’t take it as grumpy.

      When you say version 3 – exactly what version of 3 are you talking about? We closed out over 500 bugs from v3.2 to 3.2.20.09 and spent more than 3 months in dedicated bug ‘fix it’ mode. So believe me when I say we consider stability first and new features second.

      What would be the more popular IDEs in your office, and why?

      Are there a lot of people asking for a CLI? Yes. I’d say it’s one of the most requested features we get. Folks build things, and then they want to automate what they’ve built.

      • Michael
        July 22, 2013

        We’re on the latest of v.3. I guess it’s a case of different users for different use cases. We’re IT developers and designers, and we have enterprise products for building and automating. All we want from SQL Dev is a nice environment to build and test in. As a free product, maybe you have a lot of customers who are students, or (god-help-us) business users who are looking for ways of playing with database features and extracting data/reports. They want multi-pupose – we want lean and productive…

        We previously used Toad and SQL Navigator but lost them due to cost-cutting. Other colleagues have fond memories of PLSQL Developer.

        p.s. I have no complaints about stability – it’s a lot more reliable than SQL Navigator in the long-run.

      • thatjeffsmith
        thatjeffsmith
        July 22, 2013

        Again, thanks for continuing the conversation Michael – if that is indeed your real name :)

        We have several million users, and a majority of them would classify themselves just as you have described. I guess I’m confused, how does enhancing an existing CLI prevent you from building and testing your applications?

        I’d argue we’re pretty lean. If you think we’re fat, you can always disable the extensions you don’t use. That will give you a simpler UI and a faster load-time for the tool. Of the 3 tools you mentioned, I’d say we have a pretty good argument for a case of being the leanest…so if you have no complaints around stability, what are your complaints again?

  6. Michael
    July 23, 2013

    I think I could have distilled my rant into the following key themes: 1. Productivity: we feel that a lot of our regular tasks are made unnecessarily complex – when v4 is ready we’ll hope to see a difference. 2. Focus: until we see productivity improving, I’ll selfishly resent every minute you spend developing new features! I’ll use the OTN forum to raise specific problems, but will wait and see what v4 has to offer first.

    • thatjeffsmith
      thatjeffsmith
      July 23, 2013

      Great. So can you relate on a few workflows you see as overly complex? I hate extra clicks and complexity for the sake of such.

  7. Dan
    July 25, 2013

    Hi Jeff,

    The Cart feature is intruiging.

    I would be really interested in an explanation of the envisaged use case for this and its features, and where its likely (envisaged) to sit in the existing toolset – considering we can use Data Modeler to create DDL for deployment.

    Im confused as to where it sits and what gap it fills within development.

    ie. what can we actually use the cart for.

    While im asking – is there any work on-going to introduce a CLI for data modeler?
    That would make continous integration a snip with its fancy synchronize feature.

    Thanks
    Dan

    • thatjeffsmith
      thatjeffsmith
      July 25, 2013

      The cart also does data, think ad hoc deployment scripts.

      “Hey Jeff, your beer table looks yummy. Can I have it?”

      OK, here you go. Drags and drops beer table to cart, adds where filter clause to not share my private stash, hits deploy, and whammo, there’s the ZIP file all ready for them to use as they see fit. Now imagine I want to send someone a dozen or more tables, and I don’t want to have to worry about dependencies, creation order, etc. The cart takes care of all of that.

      The modeler can now take advantage of our CLI, so now all we need is to build use cases. Can you say a bit more about how you’d envision using it?

      • Dan
        July 25, 2013

        Thanks Jeff, I get it now about the cart.

        Ok, use cases for CLI for modeler. (and other useful things while I am thinkign about it).

        Use:
        Continous Integration and Build of Database from v1.0 to v1.1

        2 scenarios
        1. Sync all dev databases as soon as a model change is checked in.
        a) use a CI tool to monitor subversion
        b) When a change is detected and committed in the model, we could invoke the CLI to sync (or just produce DDL for sqlplus to run) against a database connection (or set of connections) – which then distributes that change to other devs immediately and invokes further toolchains (unit tests etc).

        2. Daily integration build of all committed changes
        a) Each day(night) we could restore v1.0 database (plus data),
        b) use CLI to produce diffs between model 1.0 and model 1.1
        c) run diffs
        d) use CLI to sync model 1.1 to integration database (exit criteria here would be no changes detected – therefore succesful deployment)

        3. Are we able to generate a report of the diffs between model and database connection?, and diffs between 2 models. That would sure be useful.

        4. CLI to create connections for use in other CLI operations would be good as well. Passwords change and build environments can “go and get the passwords”, but it still requires a human to edit the connection in sql developer.

      • Jorge
        March 4, 2014

        Hi Dan and Jeff,
        I’m really happy only listening the possibility to include a CLI in datamodeler,
        I have exactly all these needs in my projects and I think with this features will be impossible to fail trying to convince all the architects to use this tool for datamodeling Oracle databases.

        Whith these features implemented in datamodeler we can say that for Continous integration the differences between datamodel and code are smaller than ever, even ridiculous.

        Thanks in advance

      • thatjeffsmith
        thatjeffsmith
        March 4, 2014

        What CLI methods would you want to see implemented in the Modeler specifically?

      • Jorge
        March 5, 2014

        Hi Jeff,

        both scenarios from Dan are already applicable to my ideas

        1)compare and merge models or data dictionary option with script as a result file will be amazing,
        this will help us to generate the deployment’s builds, in our developments we split the relational model and the physical model generating a tag of each version not taking into account in which physical environment we want to deploy, we leave the build into a binary repository prepared to be installed from scratch (not delta script), but this version could be deployed in different physical environments, with this option we could use the continuous integration server to run the compares of the models and upgrade the environments to the related version of the model unattended,

        2) Generate the scripts to create all the model from a branch or directly from the trunk

        3)Compare models from different branches generating a report to make easier the documentation of the release notes by a non expert personal, we could compare the branches now but the differences in the XML files are not as clear as a report directly from the tool talking about tables or fields.

        I will try to think a little bit more in depth about what could be useful and I will post it ,

        anyway Jeff, thanks for your support and for your interest,
        I hope we can celebrate the new feature in SDDM early

        Regards

      • Libor Stefek
        May 20, 2014

        I would be glad to see an option for “Export Relational Design to Reporting Schema” from CLI. We are using Oracle Designer’s Repository (for years) to get a lot of information into our custom tools and reports. All done automatically; before moving to Modeler we need to have replacement of that.

      • thatjeffsmith
        thatjeffsmith
        May 20, 2014

        Thanks for the feedback, I’ll see what we can do!

      • Thomas M
        November 10, 2014

        Hi Jeff,

        I read all the comments and we are also interested in a “cli” utility for SQL Datamodeler, the post of Dan described the same needs as our needs.

        So the questions is : do you plan to add this feature in future release of Data Modeler ? If yes, is there already an estimate date for this ?

        Thanks !

        Thomas

  8. stephan
    December 17, 2013

    I’m interested in the command line reports capability, but… we do not store passwords in SQLD. We’d need a ways to pass the password as an argument to sdcli. Any likelihood of that in the future?

    • thatjeffsmith
      thatjeffsmith
      December 17, 2013

      How would you like to do that and keep the password secure, and not exposed in a shell script?

      • stephan
        December 18, 2013

        Hi Jeff,

        We have a framework in place where the batch script retrieves the password from a administrative DB (OS authentication, only a small handful of users have access) and stores it as a variable that is then used as part of the connect string. It may not be perfect security, but… We’re still working on locking things down.

        Anyway, if we could pass username and password to sdcli, we could use some of these reports, which would be very nice.

  9. Steve O
    January 2, 2014

    Are these “reports” only pre-canned reports? I’m looking for the ability to run things like dumps to excel, or even fire off a standard sql script. I know that most folks use sql plus for that, but I like the way sql developer creates nice spreadsheets verses a csv. Does “Demo for 4.0 Take Three” (from the example above) refer to a file with a report specification in it?

    • thatjeffsmith
      thatjeffsmith
      January 2, 2014

      Command Line Interface support is only for the pre-defined Reports, no support for ad hoc queries and the CSV or Excel formatters. You can do a dump to Excel (that sound wrong by the way) using the Cart and the CLI though. So, if you have a View or Table you’re exporting, that would work. If it’s a query, you could rig it up as a database view to get around the limitation. My report demo is using a defined report, yes.

  10. Rick
    March 6, 2014

    There seems to be no CLI in the Linux version. Is there a way to run it on that platform? I want to cron running some reports and email them to a set of users.

    • thatjeffsmith
      thatjeffsmith
      March 6, 2014

      It’s there, in the /bin directory, just run ./sdcli

  11. JohnPeter
    May 15, 2014

    Hello, this is great. We are exploring a SQLDEVELOPER CLI use especially doing these tasks, however, we would like some help with syntax for the following:

    Migration: Database Migration Tasks
    Unit test: Unit Testing Batch Tasks
    Database Cart Batch Tasks
    Basic Batch DBA Tasks

    Thank you

    • thatjeffsmith
      thatjeffsmith
      May 15, 2014

      Help is built into the cli, just run sdcli dba, and you get back supported commands with the required parameters and an example

  12. Kamal
    May 20, 2014

    C:\Test_tools\sqldeveloper\sqldeveloper\sqldeveloper\bin>sdcli64.exe
    java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at oracle.ide.osgi.extension.internal.ClassLoaderProxy.loadMetaClass(
    ssLoaderProxy.java:121)
    at javax.ide.util.MetaClass.toClass(MetaClass.java:104)
    at javax.ide.util.MetaClass.toClass(MetaClass.java:95)
    at javax.ide.util.MetaClass.newInstance(MetaClass.java:138)
    at oracle.ide.javaxide.Util.createInstance(Util.java:62)
    at oracle.ide.javaxide.Util.createInstance(Util.java:42)
    at oracle.ideimpl.cmd.ShutdownHookHook.start(ShutdownHookHook.java:30
    at oracle.ideimpl.extension.LayerReader.callElementStart(LayerReader.
    a:339)
    at oracle.ideimpl.extension.LayerReader.scan(LayerReader.java:310)
    at oracle.ideimpl.extension.LayerReader.scanChildren(LayerReader.java
    0)
    at oracle.ideimpl.extension.LayerHookRegistry.scanHooks(LayerHookRegi
    y.java:343)
    at oracle.ideimpl.extension.LayerHookRegistry.loadHooks(LayerHookRegi
    y.java:278)
    at oracle.ideimpl.extension.LayerHookRegistry.fullyLoad(LayerHookRegi
    y.java:393)
    at oracle.ideimpl.extension.ExtensionManagerImpl._loadExtHooksCached(
    ensionManagerImpl.java:2005)
    at oracle.ideimpl.extension.ExtensionManagerImpl._loadExtensionHooks(
    ensionManagerImpl.java:1930)
    at oracle.ideimpl.extension.ExtensionManagerImpl.__loadExtensionHooks
    tensionManagerImpl.java:1902)
    at oracle.ideimpl.extension.SameThreadExtensionQueueLoadStrategy.load
    meThreadExtensionQueueLoadStrategy.java:28)
    at oracle.ideimpl.extension.ExtensionManagerImpl.fullyLoadExtension(E
    nsionManagerImpl.java:1651)
    at oracle.ide.IdeCore.startupImpl(IdeCore.java:1841)
    at oracle.ide.Ide.startup(Ide.java:758)
    at oracle.dbtools.headless.HeadlessStarter.startIde(HeadlessStarter.j
    :32)
    at oracle.ide.osgi.Activator.start(Activator.java:190)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(B
    leContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startAc
    ator(BundleContextImpl.java:702)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(B
    leContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bu
    eHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(Abs
    ctBundle.java:390)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Fr
    work.java:1177)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeB
    les(StartLevelManager.java:559)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeB
    les(StartLevelManager.java:544)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL
    artLevelManager.java:457)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetSt
    Level(StartLevelManager.java:243)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalS
    t(EquinoxLauncher.java:271)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(Equ
    xLauncher.java:241)
    at org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)
    at org.netbeans.core.netigso.Netigso.start(Netigso.java:190)
    at org.netbeans.NetigsoHandle.startFramework(NetigsoHandle.java:198)
    at org.netbeans.ModuleManager.enable(ModuleManager.java:1189)
    at org.netbeans.ModuleManager.enable(ModuleManager.java:1011)
    at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:34
    at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276)
    at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:3

    at org.netbeans.core.startup.Main.getModuleSystem(Main.java:181)
    at org.netbeans.core.startup.Main.getModuleSystem(Main.java:150)
    at org.netbeans.core.startup.Main.start(Main.java:307)
    at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:1

    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
    at oracle.dmt.dataminer.runner.RunManager.(RunManager.java:71
    … 50 more

    I got the above error when starting the command line interface. Can anyone help?.

    Thanks, Kamal

    • thatjeffsmith
      thatjeffsmith
      May 20, 2014

      Yes, but this isn’t the best place to do that. I would advise:

      1. If you have Support, open a Service Request with My Oracle Support
      2. If you don’t have support, you can try posting this on the OTN forums
      • Kamal
        May 20, 2014

        Okay.

  13. subrahmanyam
    October 13, 2014

    15.21-x64\sqldeveloper\sqldeveloper\bin>sdcli64.exe reports generate -report “Demo for 4.0 Take Three” -db migratio_demo -file “C:\users\spattapu\html_Report\sqldev4.html”
    Command failed:
    java.lang.Exception: ‘Demo for 4.0 Take Three’ not found
    at oracle.dbtools.raptor.report.headless.ReportsProcessor$GenerateReport
    Task.model(ReportsProcessor.java:121)
    at oracle.dbtools.raptor.report.headless.ReportsProcessor$GenerateReport
    Task.doWork(ReportsProcessor.java:78)
    at oracle.dbtools.raptor.report.headless.ReportsProcessor$GenerateReport
    Task.doWork(ReportsProcessor.java:39)
    at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:
    193)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTa
    sk.run(RaptorTaskManager.java:554)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
    1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
    java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
    .java:615)
    at java.lang.Thread.run(Thread.java:745)

    I am trying to generate html report I am facing the above error.Please suggest me.

    • thatjeffsmith
      thatjeffsmith
      October 13, 2014

      Demo for 4.0 Take Three – that’s the name of my report. The error message says it can’t be found. You need to run the report using the name of your report.

  14. Ravi Shankar
    December 3, 2014

    When we are tyring to run sdcli from Jenkins windows prompt it is not able to find the connection.
    When the same bat file is run from normal command prompt it is working properly without any issues.
    We are invoking the same bat file from both the places.
    so not sure how to fix this issue.

  15. Tony
    January 21, 2015

    I am using SQL Developer on Mac OS X Yosemite.
    I am unable to run sdcli.sh.
    sdcli.sh was not executable, so I changed it with chmod u+x sdcli.sh.
    Now it will run, but I get this error:

    $ ./sqlcli.sh
    Listening for transport dt_socket at address: 8000

    and then it never goes anywhere.

    Any tricks up your sleeve to make this work?

    Oracle SQL Developer 4.1.0.17
    Version 4.1.0.17
    Build MAIN-17.29

    IDE Version: 12.2.1.0.42.141118.0806
    Product ID: oracle.sqldeveloper
    Product Version: 12.2.0.17.29

    Version
    ——-

    Component Version
    ========= =======
    Oracle IDE 4.1.0.17.29
    Java(TM) Platform 1.8.0_25

    NOTE: current production release (not early adopter) Oracle SQL Developer 4.0.3.16, Version 4.0.3.16, Build MAIN-16.84 on the Mac does not have the sdcli.sh at all.
    $ pwd
    /Applications/Oracle_Tools/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin
    $ ls -ltr
    total 2464
    -rw-r–r–@ 1 holbrook staff 83456 Sep 15 06:47 sqldeveloper64W.exe
    -rw-r–r–@ 1 holbrook staff 1175 Sep 15 06:47 sqldeveloper.conf
    -rw-r–r–@ 1 holbrook staff 340 Sep 15 06:47 sqldeveloper.boot
    -rw-r–r–@ 1 holbrook staff 445 Sep 15 06:47 sqldeveloper.bat
    -rw-r–r–@ 1 holbrook staff 204 Sep 15 06:47 sqldeveloper-nondebug.conf
    -rw-r–r–@ 1 holbrook staff 661 Sep 15 06:47 sqldeveloper-debug.conf
    -rw-r–r–@ 1 holbrook staff 415 Sep 15 06:47 sqldeveloper-Darwin.conf
    -rw-r–r–@ 1 holbrook staff 3220 Sep 15 06:47 sqldeveloper
    -rw-r–r–@ 1 holbrook staff 71205 Sep 15 06:47 splash.png
    -rw-r–r–@ 1 holbrook staff 71205 Sep 15 06:47 splash.gif
    -rw-r–r–@ 1 holbrook staff 363 Sep 15 06:47 logging.conf
    -rw-r–r–@ 1 holbrook staff 440 Sep 15 06:47 logging-debug.conf
    -rw-r–r–@ 1 holbrook staff 0 Sep 15 06:47 jdk.conf
    -rw-r–r–@ 1 holbrook staff 49279 Sep 15 06:47 SQLDeveloperIcons.icns
    -rw-r–r–@ 1 holbrook staff 854 Sep 15 06:48 sdcli.conf
    -rw-r–r–@ 1 holbrook staff 446 Sep 15 06:48 sdcli.boot
    -rw-r–r–@ 1 holbrook staff 99 Sep 15 06:48 sdcli-Darwin.conf
    -rw-r–r–@ 1 holbrook staff 586 Sep 15 06:48 sdcli
    -rw-r–r–@ 1 holbrook staff 136 Sep 15 06:52 version.properties

    $ more sdcli
    #!/bin/bash

    #=============================================================================
    # Launcher for Oracle SQL Developer
    # Copyright (c) 2005, Oracle. All rights reserved.
    #=============================================================================

    . “sqldeveloper”

    #—————————————————————————–
    # product-specific function overrides
    #—————————————————————————–
    GetFullProductName()
    {
    echo “Oracle SQL Developer”
    }

    GetShortProductName()
    {
    echo “SQL Developer”
    }

Leave a Reply

 

 

 

Back to top
mobile desktop