Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IBM Data Studio - SQL script

165 views
Skip to first unread message

SANDRO HAIDEN TEIXEIRA

unread,
Aug 11, 2018, 9:59:24 PM8/11/18
to
Regarding IBM Data Studio 4.1.3 Client, do I really need to be connected to a database in order to run an sql script?

Because when I want to create another database through the script, Data Studio requires me to connect to a database. Is there any way to disable this requirement?

grateful for the attention.

Joachim Tuchel

unread,
Aug 12, 2018, 12:50:22 PM8/12/18
to

There is not much point in issueing an SQL statement "into the universe". You need a table to select/insert/delete/update from/into (DML) or a database to make any changes to (DDL).

The few exceptions that come to mind are create and/or drop database, force application or start/stop DBM. In Data Studio, you can do that visually in the left pane, but afaik not per SQL script. You still need to be talking to an existing DB Server or Instance.

Joachim

mike...@yahoo.com

unread,
Sep 27, 2018, 5:01:42 AM9/27/18
to
If you are a competent scripter, you do not need to use DataStudio to run an SQL script. If the script contains only SQL, it requires a database-connection (which you can create outside of the script if you know what you are doing). If the script contains *commands* (i.e. NOT SQL) then some commands do not need a pre-existing database connection (such as create database, drop database, backup database etc.). For those kinds of scripts , DataStudio may not be the correct tool for the job.

Peter H. Coffin

unread,
Sep 27, 2018, 11:25:07 AM9/27/18
to
Data Studio knows how to do things like "start dbm remote hostname
<address> user <user> using <password>", so there's quite a lot it can
do as long as the remote system is at least fully booted and properly
configured, so I don't see why a script counldn't also. It's just very
insistant about having a database connection DEFINED before it lets you
get to the meat of the tool. But you don't have to be connected yet. You
can, for example, define the connection you want to run Data Studio to
eventually, then (before actually opening the connection), start the
database manager instance, create the target database there, THEN twist
open the actual connection you defined earlier.

--
26. No matter how attractive certain members of the rebellion are,
there is probably someone just as attractive who is not desperate to
kill me. Therefore, I will think twice before ordering a prisoner
sent to my bedchamber. --Peter Anspach's Evil Overlord list
0 new messages