Is there a graphical tool (GUI) to execute ij 'describe' commands on Derby DB, outside the ij prompt?
I tried to use Netbeans, SQuirreL and DbVisualzer but it doesn't seem to help.
The error is always:
[Error Code: -1, SQL State: 42X01] Syntax error: Encountered "describe" at line 1, column 1.
For all tools.
Is ij the only way to execute this command?
Although you cannot execute describe in SQL, SQuirreL should be able to present just the same information for you (like this screenshot).
Is ij the only way to execute this command?
Yes, because it is not a SQL command but an ij command.
Related
I have been using flyway for a while and have managed to successfully execute migrations. This past week or so whenever I try and use flyway the command executes successfully but I get no output at all!
This is not such a big issue for the migrate command, I can just go and check in the database what has been done from the flyway_schema_history table. It is quite frustrating when using the info command however. Previously I'd used this to sort of pre-view what was about to happen.
I've tried running the command in as many ways as I can think of.
I've now tried three versions of flyway too!
I am currently using flyway-9.7.0 on a windows 10 computer. I am trying to execute my migration scripts on an Oracle 19C database.
I am executing these commands:
flyway migrate -url=jdbc:oracle:thin:#//<URL>:<PORT>/<DB_NAME> -user=<DB_USER> -password=<Password>
-locations=filesystem:C:\flyway-9.7.0\migrations -outputFile=C:\flyway-9.7.0\migrations\out.log
flyway info -url=jdbc:oracle:thin:#//<URL>:<PORT>/<DB_NAME> -user=<DB_USER> -password=<Password>
-outputFile=C:\flyway-9.7.0\migrations\out.log
Both of these commands execute successfully (apparently).
For the "migrate" command the database objects are created in the database, an entry is added to the schemas flyway_schema_history table and a log file is created as specified (but is empty)
For the "info" command the log file is again created (empty)
I get nothing written to the windows CMD window that I am executing the command in however!
Please, what can I do to see some feedback from my commands?
Sometimes I have to apply this kind of sql script that has in another folder more scripts:
PROMPT "--------------------------------------"
PROMPT " APLICANDO Edward"
PROMPT "--------------------------------------"
#./Packages/Edward.sql
#./Packages/Edward2.sql
.
.
.
prompt "------------------------------------------------------"
prompt " FIN DE APLICA Edward"
prompt "------------------------------------------------------"
Usually I had to put that .zip file on the server and execute it in sqlplus, but I don't know if could execute them in SQLDeveloper (in a windows environment). Is there some way to do it in that tool?
If you are not running the scripts using SQL Developer in production, I would not recommend using SQL Developer to test the scripts. You always want your testing to be as close as possible to production.
You had said that SQLPlus will be used run the scripts in production, so I would recommend installing the same version of SQLPlus on your machine to test out the scripts. Running scripts from SQL Developer runs them using SQLcl so the behavior could be slightly different than SQLPlus. Oracle says SQLcl it is 99% compatible with SQLPlus, but without knowing what is in your scripts and what version of SQLPlus/SQLcl/SQL Developer you are using, we can not know for sure.
If you are determined on running your scripts from SQL Developer, in a SQL Worksheet, you just need to change directories to where your scripts live, then execute them just like you would from the command line. If you are on an older version of SQL Developer (pre-SQLcl) this may not work so you will need to upgrade your version of SQL Developer.
I'm trying to write a pipeline script that runs a query on an oracle db. I have a slave where I've installed the Oracle JDBC driver jar.
In global settings on the master, I've set the "Additional groovy classpath" field to the path to the driver jar on the slave.
I then ran my pipeline script, which so far is very simple:
import groovy.sql.Sql;
node ("sqlplus") {
stage ("RUN QUERY") {
def sql = Sql.newInstance("jdbc:oracle:thin:#...", "..", "..", "oracle.jdbc.driver.OracleDriver")
query = "SELECT count(*) from ..."
println sql.rows(query)
sql.close()
}
}
This compiles, but it fails with "java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver".
So, do I have to restart something to get this to work, or is this not going to work the way I'm expecting?
I forgot about this question that I posted, and even posted a very similar question just a couple of months later: Need a working strategy to execute SQL scripts in Jenkins pipeline script .
I more thoroughly investigated this problem in the later posting, where I came to the conclusion that it's just not practical to execute Sql queries in "the Java way" inside the pipeline script. The only reasonable alternatives are directly executing the database command-line client ("sqlplus" or "mysql", for instance) and piping scripts into it, or writing tasks in a Gradle build script to execute the queries.
Some environment details:
LINQPad v4.47.02(AnyCPU)
OS Name Microsoft Windows Server 2012 Standard
Version 6.2.9200 Build 9200
System Type x64-based PC
I am trying to figure out how I might diagnose an issue I am encountering when launching a script via the lprun.exe command line utility. When I run the script from the IDE interactively it runs and completes without any exceptions.
When the same script is run under the same user from the command line using: lprun.exe
I get this output.
c:\SQLTasks\Linqpad\Demographics\Demo_GenerateDemographicsSubset.linq(880,20) :
error CS0029: Cannot implicitly convert type 'string' to 'char?'
Due to how LINQPad compiles the script I cant easily locate the area in my script that might be causing this and I'd really like to know if possible what mechanisms might allow it to work interactively and fail from the command line.
Please refer to the discussion on the LINQPad forum: http://forum.linqpad.net/discussion/437/lprun-exe-runtime-error-doesn-t-hapen-when-script-is-run-from-linqpad-ide#latest
Edit: this was due to a bug in how LINQPad reads configuration settings in command-line mode. The bug was fixed as of v4.48.
I have h2 installed on Ubuntu. I am trying to figure how to use runscript.
my command:
runscript from ~/dkjs/kjsdgh/lala.sql;
it keeps returning an syntax error 42001.
What am I missing?
You need to quote the file name:
runscript from '~/dkjs/kjsdgh/lala.sql';
It needs to be single quotes.