Quantcast
Channel: Toad for IBM DB2 Forum - Recent Threads
Viewing all 389 articles
Browse latest View live

delete 1st line of text file in an automated job

$
0
0

Hello,

I have created a procedure to extract and update a table.  I added the Procedure into a job , and the next step is to extract the data from that table into a text file with pipe delimited fields. What I cant find is how to delete the 1st line of the text file. 

example:

line1: 1
line2: 14466869-99999-2|1|

Thank you !


RE: I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0

Was this issue resolved? I pretty much have a similar issue.

I am able to connect to the zOS db2 via command line and not through the toad app.

RE: I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0


Don't know why but IBM DB2 in recent years not responding as expected. A data base is suppose to be easy to configure and maintained and not no rocket science. Something smelling fishy around DB2

--Beresford 

I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0

Hi Team,

 I have installed Toad for DB2 Freeware 6.0 in one of our VM windows box and installed db2client and catalogued the databases.

I could see those catalogued databases in Toad for DB2 window but when I was trying to connect I am getting the following error.

Could anyone please help me to check and suggest me what could be the issue.

System.ArgumentOutOfRangeException
Length cannot be less than zero.
Parameter name: length
Stack Trace:
at IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, String& szConnectionString, DB2ConnSettings& ppSettings, Object& ppConn)
at IBM.Data.DB2.DB2Connection.Open()
at Quest.Toad.Db.Connection.OpenConnection(IDbConnection connection)
at Quest.Toad.DB2.DB2ToadConnection.OpenConnection(IDbConnection connection)
at Quest.Toad.Db.Connection.AllocConnection()
at Quest.Toad.Db.Connection.Connect(Boolean notify)
at Quest.Toad.Db.Provider.BackgroundConnector.CreateBackgroundConnection()

**********************************************************************
Exception Information
**********************************************************************
Exception: System.ArgumentOutOfRangeException
Message : Length cannot be less than zero.
Parameter name: length
Stack Trace:
at IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, String& szConnectionString, DB2ConnSettings& ppSettings, Object& ppConn)
at IBM.Data.DB2.DB2Connection.Open()
at Quest.Toad.Db.Connection.OpenConnection(IDbConnection connection)
at Quest.Toad.DB2.DB2ToadConnection.OpenConnection(IDbConnection connection)
at Quest.Toad.Db.Connection.AllocConnection()
at Quest.Toad.Db.Connection.Connect(Boolean notify)
at Quest.Toad.Db.Provider.BackgroundConnector.CreateBackgroundConnection()

**********************************************************************
NOTE: We are eliminating automatic support case creation by email. Before sending your Support Bundle, ensure your subject line includes an opened CaseID:### or a Service Request ID:###. Without the CaseID or Service Request ID your Support Bundle request will be declined.

The quickest way to open a new service request is through our online Support Portal support.software.dell.com/Manage-Service-Request.

You can also contact Support for assistance to create a new case, please visit support.software.dell.com/.../contact-technical-support. Post case creation you will continue to have all communication options available including email, phone, or through the Support Portal to manage the lifecycle of your case.


**********************************************************************
Support Bundle: Toad for DB2 6.0.0.373 Freeware
11/14/2016 12:53:52 PM
**********************************************************************

**********************************************************************
System Information
**********************************************************************
Operating System
Microsoft Windows Server 2012 R2 Datacenter 6.3.9600 AMD64
Manufacturer: Microsoft Corporation
Computer Name: WHSE-WKSTN-DEV
Windows Directory: C:\Windows

Computer System
Computer Manufacturer Name: Microsoft Corporation
Computer Model: Virtual Machine
System Type: x64-based PC
Total Physical Memory: 7,339,572 KB
Domain: WORKGROUP
User Name:

System Processor
Manufacturer: GenuineIntel
Computer Processor: Intel64 Family 6 Model 63 Stepping 2
CPU Speed: 2.397 GHz
**********************************************************************
Connection Information
**********************************************************************
No open connections.

DB2 Client:
DB2 Client Type:
**********************************************************************
Loaded Assemblies
**********************************************************************
Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll
ActiproSoftware.Docking.WinForms, Version=12.1.302.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763 C:\Windows\assembly\GAC_MSIL\ActiproSoftware.Docking.WinForms\12.1.302.0__c27e062d3c1a4763\ActiproSoftware.Docking.WinForms.dll
ActiproSoftware.Shared.WinForms, Version=12.1.302.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763 C:\Windows\assembly\GAC_MSIL\ActiproSoftware.Shared.WinForms\12.1.302.0__c27e062d3c1a4763\ActiproSoftware.Shared.WinForms.dll
ActiproSoftware.SyntaxEditor.WinForms, Version=12.1.302.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763 C:\Windows\assembly\GAC_MSIL\ActiproSoftware.SyntaxEditor.WinForms\12.1.302.0__c27e062d3c1a4763\ActiproSoftware.SyntaxEditor.WinForms.dll
Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null Location is not supported for given Assembly
BouncyCastle.Crypto, Version=1.7.4114.6375, Culture=neutral, PublicKeyToken=0e99375e54769942 C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\BouncyCastle.Crypto.dll
CustomMarshalers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_32\CustomMarshalers\v4.0_4.0.0.0__b03f5f7f11d50a3a\CustomMarshalers.dll
Dell.FastETL, Version=7.2.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Dell.FastETL.dll
Dell.NamedPipeRPC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Dell.NamedPipeRPC.dll
Dell.SecTech, Version=4.3.0.448, Culture=neutral, PublicKeyToken=99d4728064788932 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Dell.SecTech\v4.0_4.3.0.448__99d4728064788932\Dell.SecTech.dll
Dell.ToadCommunication, Version=7.0.10.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Dell.ToadCommunication.dll
Dell.ToadGeneral, Version=7.0.10.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Dell.ToadGeneral.dll
DevExpress.BonusSkins.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.BonusSkins.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.BonusSkins.v13.1.dll
DevExpress.Charts.v13.1.Core, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.Charts.v13.1.Core\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.Charts.v13.1.Core.dll
DevExpress.Data.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.Data.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.Data.v13.1.dll
DevExpress.Utils.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.Utils.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.Utils.v13.1.dll
DevExpress.XtraBars.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraBars.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.XtraBars.v13.1.dll
DevExpress.XtraEditors.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraEditors.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.XtraEditors.v13.1.dll
DevExpress.XtraGrid.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraGrid.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.XtraGrid.v13.1.dll
DevExpress.XtraTreeList.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\DevExpress.XtraTreeList.v13.1\v4.0_13.1.5.0__b88d1754d700e49a\DevExpress.XtraTreeList.v13.1.dll
FastData, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\FastData.dll
IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208 C:\Program Files\IBM\SQLLIB\BIN\netf40_32\IBM.Data.DB2.dll
IBM.Data.DB2, Version=9.7.4.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208 C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\IBM.Data.DB2.dll
Interop.StdVCL, Version=4.0.0.0, Culture=neutral, PublicKeyToken=298428818506a441 C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\Interop.StdVCL.dll
ManagedQP5, Version=5.2.5.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\managedqp5.dll
Microsoft.Win32.TaskScheduler, Version=1.9.4.17032, Culture=neutral, PublicKeyToken=0d013ddd5178a2ae C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Microsoft.Win32.TaskScheduler.dll
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Windows\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll
PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll
PresentationFramework.AeroLite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.AeroLite\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.AeroLite.dll
Quest.Compare.General.Sys, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\Quest.Compare.General.Sys.dll
Quest.Compare.General.SysInterfaces, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\Quest.Compare.General.SysInterfaces.dll
Quest.Compare.Schema.Common.PlInterfaces, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\Quest.Compare.Schema.Common.PlInterfaces.dll
Quest.Compare.Schema.DB2.DBModel, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\Quest.Compare.Schema.DB2.DBModel.dll
Quest.Data.DB2.Admin, Version=5.5.0.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\Quest.Data.DB2.Admin.dll
Quest.PersistentCache, Version=3.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Quest.PersistentCache.dll
Quest.Toad.Interop.AxSHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c862883b2ae69822 C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Quest.Toad.Interop.AxSHDocVw.dll
Quest.VersionControl, Version=1.1.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Quest.VersionControl.dll
QuestElevation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\QuestElevation.exe
SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c862883b2ae69822 C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\SHDocVw.dll
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll
System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Design\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Design.dll
System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll
System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll
System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll
System.Runtime.Serialization.Formatters.Soap, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Formatters.Soap\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Formatters.Soap.dll
System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll
System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll
System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll
System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll
Toad, Version=7.4.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\toad.exe
ToadBlue2014, Version=13.1.5.0, Culture=neutral, PublicKeyToken=95fc6c5621878f0a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\ToadBlue2014.dll
ToadCore, Version=7.4.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\ToadCore.dll
ToadDB2, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\ToadDB2.dll
ToadDB2Provider, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\ToadDB2Provider.dll
ToadDB2Wrapper, Version=5.2.0.0, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\Plugins\DB2\ToadDB2Wrapper.dll
ToadGreen2014, Version=13.1.5.0, Culture=neutral, PublicKeyToken=95fc6c5621878f0a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\ToadGreen2014.dll
ToadPlugin, Version=6.0.0.373, Culture=neutral, PublicKeyToken=ef645eb5653fd56a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\ToadPlugin.dll
ToadTan2014, Version=13.1.5.0, Culture=neutral, PublicKeyToken=95fc6c5621878f0a C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\ToadTan2014.dll
UIAutomationTypes, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll
WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll
WindowsFormsIntegration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsFormsIntegration\v4.0_4.0.0.0__31bf3856ad364e35\WindowsFormsIntegration.dll
QP5, Version=5.270.14245.40037, C:\Program Files (x86)\Dell\Toad for DB2 Freeware 6.0\qp5.dll
**********************************************************************
Licensing
**********************************************************************
Freeware

LUW Freeware

RE: I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0

I know I am coming late to the game here, but which version of the db2 driver are you using?

I know that TOAD will only work with the "IBM Data Server Runtime Client" driver.  I know this cause I spent A LOT of time researching this topic.

Here is the link to the driver download:

http://www-01.ibm.com/support/docview.wss?uid=swg21385217

It basically is because the IBM catalogs got changed in the latest version of the driver.  

Give that driver a try instead and it should work!  

RE: I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0
I am using 11.1 etcetera running some test and comparing Oracle with variable Windows version on the fly. Hate to build a working database only to come and find it gone. 

RE: I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0

I tried installing the latest runtime client and that shows licensing errors. It was working good until I installed a local express C and had to remove it because I was having issues (license errors).

RE: I was not able to connect to the db2 databases using Toad for DB2 6.0

$
0
0
We are in the same boat; a Java and windows 10 clash


RE: delete 1st line of text file in an automated job

$
0
0

I do not understand your issue.

Can you post the DDL for the table along with insert statements to populate the values in the first several rows of that table.

Then we can investigate extracting from that table a bit on our side.

Thanks.

Need to get all Currency codes for a given Merchant ID from a DB2 table ...

$
0
0

    I have a DB2 table TBL1. It has Merchant ID(MRCHNT_ID) and Currency_Code and few other columns. My requirement is for every Merchant Id, I need its list of Currency codes. Ex:
    
    MRCHNT     CURRENCY
      ID         CODE   
    ---------  --------
    001812310  036      
    001812310  124      
    001812310  554      
    001812310  826      
    001812310  840      
    001812310  978
    
    So for this I need to get the resultant as:
    
    MRCHNT     CURRENCY CURRENCY  CURRENCY
      ID         CODE1   CODE2      CODE3
    ---------  -------- -------- -------- and etc..
    001812310  036      124         554
    
    I am getting this below resultant:

     MRCHNT                                                         
       ID       COL1  COL2  COL3  COL4  COL5  COL6  COL7  COL8  COL9
     ---------  ----  ----  ----  ----  ----  ----  ----  ----  ----
     001812310                                                  USD
     001812310                                            GBP       
     001812310                                NZD                   
     001812310              EUR                                     
     001812310        CAD                                           
     001812310  AUD

    When I run this query:
    
    SELECT DISTINCT(MRCHNT_ID),
    CAST(DECODE(A.CURRENCY_CODE,'036','AUD',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'124','CAD',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'978','EUR',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'344','HKD',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'392','JPY',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'554','NZD',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'702','SGD',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'826','GBP',' ')AS CHAR(3)),
    CAST(DECODE(A.CURRENCY_CODE,'840','USD',' ')AS CHAR(3))     
    FROM FX.FX_ACCOUNT A
    WHERE A.MRCHNT_ID = 001812310
    GROUP BY CURRENCY_CODE, MRCHNT_ID
    WITH UR;
    Need your expertise advice to get the resultant in the below format

    MRCHNT     CURRENCY CURRENCY  CURRENCY
      ID         CODE1   CODE2      CODE3
    ---------  -------- -------- -------- and etc..
    001812310  036      124         554

    Thanks in advance !!!

RE: Need to get all Currency codes for a given Merchant ID from a DB2 table ...

$
0
0

Hi Mohan;

Please try the following -

Table entries:

MRCHNT_IDCURRENCY_CODE
ABCD001
ABCD002
ABCD003
ABCE002
ABCE003
ABCE004

select MRCHNT_ID,
MAX(DECODE(CURRENCY_CODE, '001', 'USD')) AS C1,
MAX(DECODE(CURRENCY_CODE, '002', 'CAD')) AS C2,
MAX(DECODE(CURRENCY_CODE, '003', 'EUR')) AS C3,
MAX(DECODE(CURRENCY_CODE, '004', 'GBP')) AS C4
from FX.FX_ACCOUNT a
group by MRCHNT_ID;

Of course you can change the DECODE to represent CURRENCY_CODE vs currency acronym, and add as many currencies as you want.

RE: Toad Automation Scripts

$
0
0

Hi Mimi,

I use automation scripts in a similar way to you. We have several queries that run every day and get saved as excels to a a public share. You can add the date as a suffix to the file that is saved, but we had a problem with the time format.

With the help of Jeff, I was able to use a workaround which included assigning the current time / date to a variable at the beggining of the automation script.

It took me an hour to fiddle with it to figure out how to get it going, but it is was time very well spent becuase I learned how to define variables for selects or updates that I run quite often.

I'll try to find the post and put a link here.

Sincerely,

Shimon

RE: Need to get all Currency codes for a given Merchant ID from a DB2 table ...

$
0
0

Dear yahya.nattagh,

Bulls Eye !!! It worked :)

Thank you so much !!!


Regards,

Mohan Prasath

TOAD for DB2 - Getting Stack Trace Error in V3.3.0.1526

$
0
0

I am receiving the following error when I log into TOAD for DB2:

System.BadImageFormatException
Could not load file or assembly 'Quest.Data.DB2.Admin.dll' or one of its dependencies. Invalid access to memory location. (Exception from HRESULT: 0x800703E6)
Stack Trace:
   at Quest.Toad.DB2.DB2ConnectionControl.RefreshCatalog()
   at Quest.Toad.DB2.DB2ConnectionControl.InitDB2Data()
   at Quest.Toad.DB2.DB2ConnectionControl.InitUI(ConnectMediator connectOptions, ConnectionFormStyle displayStyle)
   at Quest.Toad.ConnectionManager.ConnectionPropertiesControl.CreateContainer(ConnectMediator connectOptions)
   at Quest.Toad.ConnectionManager.ConnectionPropertiesControl.ShowContainer(ConnectMediator connectMediator)
   at Quest.Toad.ConnectionManager.ConnectionPropertiesControl.AssignConnectOptions(Node node, ConnectionFormStyle style)
   at Quest.Toad.ConnectionManager.ConnectionForm.RefreshUI()
   at Quest.Toad.ConnectionManager.ConnectionForm.connectionControl1_FocusChange(Object sender, ConnectionControlSelectionArgs e)
   at Quest.Toad.ConnectionManager.ConnectionControl.RaiseFocusChanged(Node node)
   at Quest.Toad.ConnectionManager.ConnectionControl.connectionList_FocusedNodeChanged(Object sender, FocusedNodeChangedEventArgs e)
   at DevExpress.XtraTreeList.TreeList.RaiseFocusedNodeChanged(TreeListNode oldNode, TreeListNode newNode)
   at DevExpress.XtraTreeList.TreeList.InternalSetFocusedRowIndex(Int32 newFocusedRowIndex)
   at DevExpress.XtraTreeList.TreeList.set_FocusedRowIndex(Int32 value)
   at DevExpress.XtraTreeList.TreeList.SetFocusedNode(TreeListNode node)
   at DevExpress.XtraTreeList.TreeList.set_FocusedNode(TreeListNode value)
   at Quest.Toad.ConnectionManager.ConnectionControl.SelectTreeNode(TreeListNode treeNode)
   at Quest.Toad.ConnectionManager.ConnectionControl.SelectTreeNode(ConnectMediator connectInfo)
   at Quest.Toad.ConnectionManager.ConnectionForm.InitializeForm(ConnectMediator connectInfo, Boolean allowReconnect, Boolean hideGroups)
   at Quest.Toad.ConnectionManager.ConnectionForm..ctor(ConnectMediator connectInfo, Boolean allowReconnect)
   at Quest.Toad.ConnectionManager.ConnectionForm.ShowConnectionDialog(ConnectMediator connectInfo, Boolean allowReconnect)
   at Quest.Toad.Gui.MainForm.bbiShowConnectionsDialog_ItemClick(Object sender, ItemClickEventArgs e)
   at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
   at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This is preventing me from connecting to any database.

RE: Reducing the HWM in DMS Table Spaces in db2 9.5 version

$
0
0

Hello Deepshikha,

Shrinking of tablespaces is different in v9.5 from later versions of Db2. In this case, it is necessary to use DB2DART.  

It is necessary to find and ID of the tables pace (if you don't know it). So, connect to the database and run command
db2 list tablespaces show detail

In my case, I found, that the ID is 3.

Tablespace ID = 3
Name = IBMDB2SAMPLEREL
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 12288
Useable pages = 12256
Used pages = 672
Free pages = 11584
High water mark (pages) = 11424
Page size (bytes) = 8192
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1

As you can see there is 672 used pages, but HWM is 11424. I would like to have desired HWM 1000 pages. So i need to run:

[db2inst1@localhost ~]$ db2dart sample /LHWM /TSI 3 /NP 1000

The requested DB2DART processing has completed successfully!
Complete DB2DART report found in:
/home/db2inst1/sqllib/db2dump/DART0000/SAMPLE.RPT
[db2inst1@localhost ~]$

In file you can find something like this:

Highwater Mark: 11424 pages, 357 extents (extents #0 - 356)


Lower highwater mark processing - phase start.
Current highwater mark: 356
Desired highwater mark: 31
Number of used extents in tablespace: 21
Number of free extents below original HWM: 336
Number of free extents below desired HWM: 13
Number of free extents below current HWM: 336


Step #1: Object ID = 5

=> Offline REORG of this table (do not specify a temporary tablespace
and do not use the LONGLOBDATA option).

Table: DB2INST1.TESTHWM

DAT object size: 2
INX object size: 0
XDA object size: 0
LF object size: 0
LOB object size: 0
LOBA object size: 0
BMP object size: 0

Total size of object parts: 2
Minimum number of extents that will move by this operation: 2

Current highwater mark: 20
Desired highwater mark: 31
Number of used extents in tablespace: 21
Number of free extents below original HWM: 336
Number of free extents below desired HWM: 11
Number of free extents below current HWM: 0


** Run the suggested offline REORG for the table first, and then run LHWM
for the suggestion on other objects.

As you can see, you need to run offline reorg of the table DB2INST1.TESTHWM to allow the lowering of HWM.

[db2inst1@localhost ~]$ db2 reorg table testhwm
DB20000I The REORG command completed successfully.

Then if you ran the db2dart command again (with the same parameters), the output stored in the will include:

Highwater Mark: 11424 pages, 357 extents (extents #0 - 356)


Lower highwater mark processing - phase start.
Current highwater mark: 356
Desired highwater mark: 31
Number of used extents in tablespace: 21
Number of free extents below original HWM: 336
Number of free extents below desired HWM: 11
Number of free extents below current HWM: 336


Final highwater mark: Extent #20 (21 extents, 672 pages).

That is good... But we are not at the end of the process. The tablespace still looks like this:

Tablespace ID = 3
Name = IBMDB2SAMPLEREL
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 12288
Useable pages = 12256
Used pages = 672
Free pages = 11584
High water mark (pages) = 672
Page size (bytes) = 8192
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1

We lowered the HWM, but the container is still big. Now it is time to run ALTER TABLE.

[db2inst1@localhost ~]$ db2 alter tablespace IBMDB2SAMPLEREL reduce
DB20000I The SQL command completed successfully.

Now the result is as expected:

Tablespace ID = 3
Name = IBMDB2SAMPLEREL
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Detailed explanation:
Normal
Total pages = 704
Useable pages = 672
Used pages = 672
Free pages = 0
High water mark (pages) = 672
Page size (bytes) = 8192
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1

Hope it helps.


Sources:

db2dart - https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0003477.html

ALTER TABLESPACE - https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000890.html


RE: "Processing was cancelled due to an interrupt" with SQL0952N

RE: "Processing was cancelled due to an interrupt" with SQL0952N

$
0
0

"FUNCTION: DB2 UDB, sort/list services, sqlsOptimizeNumMergeRuns, probe:10
MESSAGE : ADM9000W Prefetching was disabled during sort merge; performance may 
be suboptimal. If this message persists, consider increasing the 
buffer pool size for temporary table space "TEMPSPACE1" (ID "1") or 
increase the value of the SORTHEAP DB configuration parameter to 
reduce the extent of sort spilling."

This is a warning. Not an error. Try the following:

  1. Get the value of SORTHEAP param for the database. On Linux:
    db2 get db cfg for <dbname> | grep SORTHEAP

  2. Increase the value by the command:
    db2 update db cfg for <dbname> using SORTHEAP <newvalue>
  3. Use db2look command and check what buffer is used by the TEMPSPACE1.
    db2look -d <dbname> (then you need to go through the output generated by this command)
  4. Increase the number of pages of this bufferpool using ALTER BUFFERPOOL.

This is a general recommendation. You need to check the amount of RAM on your server, consumption of resources by other databases and so on and use values that reflect your environment.


Sources:

db2look - https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0002051.html

ALTER BUFFERPOOL - https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000885.html

"Processing was cancelled due to an interrupt" with SQL0952N

$
0
0

Hi all,

"Processing was cancelled due to an interrupt"

with SQL0952N

I have already googled and tried resolving the issue

one was asking me to update the QUERYTIMEOUTINTERVAL=0 in the db2cli.ini file.

which I have already done .however, there was no improvement

Moreover, when i tried to resolve the issue from application and bypass the issue by using the CommandTimeout=0; then, it is not throwing the exception. However, we are not getting the desired output as well.

Please help me out.

Thanks,

Deepshika

Toad for DB2 Freeware edition - 32 bits version

$
0
0

Hello,

Is there any 32 bits version available for Toad for DB2 Freeware edition 6.3?

Best regards.

RE: Toad for DB2 Freeware edition - 32 bits version

Viewing all 389 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>