Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Peter H. Coffin" Newsgroups: comp.databases.ibm-db2 Subject: Re: IBM Data Studio - SQL script Date: Thu, 27 Sep 2018 10:10:00 -0500 Lines: 40 Message-ID: References: <0e1db43c-ab55-476e-802f-fa91c6373122@googlegroups.com> <38dd880e-fabc-4d1b-a9d8-2f0d37080b77@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net /vpLyMgwuqxVESY8RDAmZAOjpwiyyae0QKEbmmfZYpBV9ZJOpN X-Orig-Path: nibelheim.ninehells.com!not-for-mail Cancel-Lock: sha1:8vJzw/EKSBD+CLVk7hLfo8YMdi8= User-Agent: slrn/0.9.9p1 (OpenBSD) Xref: csiph.com comp.databases.ibm-db2:3008 On Thu, 27 Sep 2018 02:01:40 -0700 (PDT), mikeodba@yahoo.com wrote: > On Sunday, 12 August 2018 02:59:24 UTC+1, SANDRO HAIDEN TEIXEIRA > wrote: > >> 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. > > > 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. Data Studio knows how to do things like "start dbm remote hostname
user using ", 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