title: Error RROR [08001] [IBM] SQL30081N when connecting to AS400 (iSeries) from NHibernate using C#
body: <p>I have absolutely no experience with AS400 DB2 so please forgive any glaring mistakes as I am learning as I go along. I have 2 boxes I can connect to running <strong>v5r3</strong> or <strong>v4r3.</strong>  and I am using <strong>NHibernate 3</strong>. However, when I try and connect I keep getting the following exception :-</p>
  
  <pre><code>ERROR [08001] [IBM] SQL30081N  A communication error has been detected. 
  Communication protocol being used: "TCP/IP".  Communication API being used: "SOCKETS".  
  Location where the error was detected: "192.168.1.11".  Communication function detecting the error: "connect".  Protocol specific error code(s): "10061", "*", "*".  SQLSTATE=08001
  </code></pre>
  
  <p>Below is my NHibernate configuration file:-</p>
  
  <pre><code>&lt;hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"&gt;
      &lt;session-factory&gt;
          &lt;property name="connection.provider"&gt;NHibernate.Connection.DriverConnectionProvider&lt;/property&gt;
          &lt;property name="dialect"&gt;NHibernate.Dialect.DB2400Dialect&lt;/property&gt;
          &lt;property name="connection.driver_class"&gt;NHibernate.Driver.DB2Driver&lt;/property&gt;
          &lt;property name="connection.connection_string"&gt;Server=192.168.1.11;Database=TESTDB;UID=XXX;PWD=XXX;          &lt;/property&gt;
          &lt;property name="proxyfactory.factory_class"&gt;NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle&lt;/property&gt;
          &lt;property name="command_timeout"&gt;15000&lt;/property&gt;
          &lt;property name="current_session_context_class"&gt;thread_static&lt;/property&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>I am not sure if this is because the versions of AS400 are too early? my nhibernate configuration is incorrect? or I have something set up incorrectly on the AS400 itself.</p>
  
  <p>Any advice would be most appreciated.</p>
  
  <p>Many thanks in advance</p>