# Toad error to SQL Optimizer window.

**URL:** <https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889>\
**Category:** Toad for IBM DB2\
**Created:** [May 4, 2018, 12:53pm UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889 "2018-05-04T12:53:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn.venkatramani](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@glenn.venkatramani](https://forums.toadworld.com/u/glenn.venkatramani)\
**Post date:** [May 4, 2018, 12:53pm UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/1 "2018-05-04T12:53:22Z")

</div>

I use Toad for DB2 LUW 6.3. While I have SQL query on the SQL Edit and when I click on mouse over which says “Optimize the current statement” It give away the following error then a pop-up windows comes in with user id , password and Database Alias. The connect button is freeze and while I click on Close open up the “Quest SQL Optimizer for IBM DB2 LUW 4.3”

May I know what am I doing wrong here ?

[IBM][CLI Driver] SQL1531N The connection failed because the name specified with the DSN connection string keyword could not be found in either the db2dsdriver.cfg configuration file or the db2cli.ini configuration file. Data source name specified in the connection string: “DBNAME”.

---

<div class="post-metadata">

**Author:** ![ken.taiquest.com](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@ken.taiquest.com](https://forums.toadworld.com/u/ken.taiquest.com)\
**Post date:** [May 7, 2018, 2:43am UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/2 "2018-05-07T02:43:34Z")

</div>

Hi Glenn,

I can’t reproduce this error. Would you please download latest v4.3.1 version SQL Optimizer for DB2 LUW and try again?

Regards,

Ken

---

<div class="post-metadata">

**Author:** ![glenn.venkatramani](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@glenn.venkatramani](https://forums.toadworld.com/u/glenn.venkatramani)\
**Post date:** [May 8, 2018, 2:24pm UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/3 "2018-05-08T14:24:53Z")

</div>

Ok I wish to know how to connect to the database. The query optimizer from Toad 6.5 is opening the version – 4.3. However I’m not able to connect to the database.

The clicking on Connect I get the following error.

Failed to connect to database.

[IBM][CLI Driver] SQL1531N The connection failed because the name specified with the DSN connection string keyword could not be found in either the db2dsdriver.cfg configuration file or the db2cli.ini configuration file. Data source name specified in the connection string: “CMSDB”.

Glenn

Gopalan Venkatramani | DB Administrator

Allegiant Travel Company

1201 N. Town Center Drive, Las Vegas, NV 89144

Direct # +1 702 830 8712 Cell # +1 908 205 7691

[Glenn.Venkatramani@allegiantair.com](mailto:Glenn.Venkatramani@allegiantair.com)  
|[www.allegiant.com](http://www.allegiant.com/)

**From:** [ken.tai@quest.com](mailto:ken.tai@quest.com) [[mailto:bounce-kentaiquestcom@toadworld.com](mailto:bounce-kentaiquestcom@toadworld.com)]

**Sent:** Monday, May 07, 2018 2:44 AM

**To:** [toaddb2@toadworld.com](mailto:toaddb2@toadworld.com)

**Subject:** RE: [Toad for IBM DB2 - Discussion Forum] Toad error to SQL Optimizer window.

**[RE: Toad error to SQL Optimizer window.](https://community.toadworld.com/products/toad-for-ibm-db2/f/18/p/35307/70393#70393)**

Reply by [ken.tai@quest.com](mailto:ken.tai@quest.com)

Hi Glenn,

I can’t reproduce this error. Would you please download latest v4.3.1 version SQL Optimizer for DB2 LUW and try again?

Regards,

Ken

To reply, please reply-all to this email.

[Stop receiving emails](https://community.toadworld.com/products/toad-for-ibm-db2/f/18/t/35307?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for IBM DB2 Forum](https://community.toadworld.com/products/toad-for-ibm-db2/f/18?subscribe=false) notifications altogether.

Toad for IBM DB2 - Discussion Forum

[Flag](https://community.toadworld.com/products/toad-for-ibm-db2/f/18/p/35307/70393?AbuseContentId=924f9d1e-f645-4f29-bfc2-a6827c4e93d5&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

---

<div class="post-metadata">

**Author:** ![ken.taiquest.com](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@ken.taiquest.com](https://forums.toadworld.com/u/ken.taiquest.com)\
**Post date:** [May 8, 2018, 7:57pm UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/4 "2018-05-08T19:57:46Z")

</div>

Hi Glenn,

SQL Optimizer use system default DB2 client but Toad can define which DB2 client to use if you have more than one DB2 client installed in your system. SQL Optimizer will fail if “CMSDB” not defined in current default DB2 client. An easy way to check it is check is “CMSDB” in the “Database Alias” drop-down list.

If you still have problem, please contact support and create a support case.

Regards,  
Ken

---

<div class="post-metadata">

**Author:** ![glenn.venkatramani](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@glenn.venkatramani](https://forums.toadworld.com/u/glenn.venkatramani)\
**Post date:** [May 8, 2018, 9:48pm UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/5 "2018-05-08T21:48:40Z")

</div>

So in other words TOAD for DB2 LUW uses the TYPE 4 driver with DBNAME / port number but SQL Optimizer is looking for TYPE 2 driver which can be connected only via DB2 client.

TOAD LUW – TYPE 4 driver

SQL Optimizer – TYPE 2 driver.

Glenn

Gopalan Venkatramani | DB Administrator

Allegiant Travel Company

1201 N. Town Center Drive, Las Vegas, NV 89144

Direct # +1 702 830 8712 Cell # +1 908 205 7691

[Glenn.Venkatramani@allegiantair.com](mailto:Glenn.Venkatramani@allegiantair.com)  
|[www.allegiant.com](http://www.allegiant.com/)

**From:** [ken.tai@quest.com](mailto:ken.tai@quest.com) [[mailto:bounce-kentaiquestcom@toadworld.com](mailto:bounce-kentaiquestcom@toadworld.com)]

**Sent:** Tuesday, May 08, 2018 7:59 PM

**To:** [toaddb2@toadworld.com](mailto:toaddb2@toadworld.com)

**Subject:** RE: [Toad for IBM DB2 - Discussion Forum] Toad error to SQL Optimizer window.

**[RE: Toad error to SQL Optimizer window.](https://community.toadworld.com/products/toad-for-ibm-db2/f/18/p/35307/70444#70444)**

Reply by [ken.tai@quest.com](mailto:ken.tai@quest.com)

Hi Glenn,

SQL Optimizer use system default DB2 client but Toad can define which DB2 client to use if you have more than one DB2 client installed in your system. SQL Optimizer will fail if “CMSDB” not defined in current default DB2 client. An easy way to check it is check is “CMSDB” in the “Database Alias” drop-down list.

If you still have problem, please contact support and create a support case.

Regards,

Ken

To reply, please reply-all to this email.

[Stop receiving emails](https://community.toadworld.com/products/toad-for-ibm-db2/f/18/t/35307?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for IBM DB2 Forum](https://community.toadworld.com/products/toad-for-ibm-db2/f/18?subscribe=false) notifications altogether.

Toad for IBM DB2 - Discussion Forum

[Flag](https://community.toadworld.com/products/toad-for-ibm-db2/f/18/p/35307/70444?AbuseContentId=d482dcd5-78c3-4f24-956c-ae0a691b20ec&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

---

<div class="post-metadata">

**Author:** ![ken.taiquest.com](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@ken.taiquest.com](https://forums.toadworld.com/u/ken.taiquest.com)\
**Post date:** [May 8, 2018, 11:06pm UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/6 "2018-05-08T23:06:21Z")

</div>

SQL Optimizer need you catalog database in DB2 client.

---

<div class="post-metadata">

**Author:** ![Ondrej.Zizka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/ondrej.zizka/32/314_2.png) [@Ondrej.Zizka](https://forums.toadworld.com/u/Ondrej.Zizka)\
**Post date:** [May 9, 2018, 1:25am UTC](https://forums.toadworld.com/t/toad-error-to-sql-optimizer-window/40889/7 "2018-05-09T01:25:14Z")

</div>

You wrote:

* * *

_TOAD LUW – TYPE 4 driver_

_SQL Optimizer – TYPE 2 driver._

* * *

Neither Toad for DB2 nor SQL Optimizer uses JDBC.

SQL Optimizer requires [IBM Data Server Client](https://www.ibm.com/services/forms/preLogin.do?source=swg-idsc97). Toad for DB2 is able to work both with [IBM Data Server Driver Package (DS Driver)](https://www.ibm.com/services/forms/preLogin.do?source=swg-idsdpds) and [IBM Data Server Client](https://www.ibm.com/services/forms/preLogin.do?source=swg-idsc97) client.

Regards

Ondrej
