"Time" Command in Cygwin in Windows Command Line
<p>I want to run a query using db2 in WINDOWS COMMAND LINE:</p>

<p>code:</p>

<pre><code>db2 connect to sample;
db2 "Select * from TB1";
</code></pre>

<p><a href="https://i.stack.imgur.com/77YYS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/77YYS.png" alt="enter image description here"></a></p>

<p>I am currently doing the IBM Lab activity in Data Concurrency and Locking and I want to determine and quantify the waiting time of the executed command using the "time command" in linux.</p>

<p>I have heard of the Cygwin and successfully installed it in my computer to execute UNIX/LINUX command. I test if "Time" Command can be successfully read by windows cmd using "bash"</p>

<p><a href="https://i.stack.imgur.com/bsDsl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bsDsl.png" alt="enter image description here"></a></p>

<p>I tried to execute this command to get the execution time of the query:</p>

<p><a href="https://i.stack.imgur.com/12Rja.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/12Rja.png" alt="enter image description here"></a></p>

<p>I also tried to include the connect to database </p>

<p><a href="https://i.stack.imgur.com/rvkqM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rvkqM.png" alt="enter image description here"></a></p>

<p>but still it keeps on saying </p>

<blockquote>
  <p>SQL1042N A database connection does not exist. SQLSTATE=08003</p>
</blockquote>

<p>I am really new in DB2 and unfamiliar with Linux command... any help would bee greatly appreciated</p>

<p>Thank You</p>