Re: Network error IOException: Connection Refused: connect in MS SQL Server 2000
Posted by: Rajeswarudu Ch S S
Date: September 27, 2005 01:08AM

Dear Mike,
I too have the same problem that was discussed in the fourm about the "Network error IOException: Connection Refused: connect in MS SQL Server 2000" error while clicking the [...] connand button to select the source DB

I had downloaded the jTDS from the mentione URL, unzipped it and identified the directory as part of the PATH and rebooted the system. I am using the "sa" account to connect to MS SQL Server 2000.

I am appending the migration script generated and the end, the final error reported
inspite of not connecting to MS SQL Server, I proceeded to give the Database Name and other information.

Please let me know what step am I missing out in order to achieve a seamless migration

regards
Rajeswarudu


-- ------------------------------------------------------------------
-- MySQL Migration Toolkit - Migration script
-- ------------------------------------------------------------------

-- ------------------------------------------------------------------
-- Initialize the migration environment

Migration:initMigration()

-- set options
doWriteCreateScript= false
doWriteInsertScript= false

-- ------------------------------------------------------------------
-- checkpoint 0
-- Set source and target connection

do
-- Set source connection
print("Set source connection.")

grtV.setGlobal("/migration/sourceConnection", {
name= "sourceConn",
_id= grt.newGuid(),
driver= "{9437F83E-FF9E-4831-9132-B4502303C229}",
parameterValues= {
database= "nbbbranch70",
host= "172.25.1.2",
jdbcConnStr= "jdbc:jtds:sqlserver://172.25.1.2:1433/DbName;user=sa;password=*********",
password= "*********",
port= "1433",
username= "sa"
},
modules= {
MigrationModule= "MigrationMssql",
ReverseEngineeringModule= "ReverseEngineeringMssql",
TransformationModule= ""
}
});

-- set struct and types
grtS.set(grtV.getGlobal("/migration/sourceConnection"), "db.mgmt.Connection")
grtV.setContentType(grtV.getGlobal("/migration/sourceConnection/parameterValues"), "string")
grtV.setContentType(grtV.getGlobal("/migration/sourceConnection/modules"), "string")

sourceConn= grtV.getGlobal("/migration/sourceConnection")
sourceRdbmsName= grtV.toLua(sourceConn.driver.owner.name)

-- Set target connection
print("Set target connection.")

grtV.setGlobal("/migration/targetConnection", {
name= "targetConn",
_id= grt.newGuid(),
driver= "{8E33CDBA-2B8D-4221-96C4-506D398BC377}",
parameterValues= {
host= "172.25.1.40",
jdbcConnStr= "",
password= "****",
port= "3306",
username= "root"
},
modules= {
MigrationModule= "MigrationMysql",
ReverseEngineeringModule= "ReverseEngineeringMysqlJdbc",
TransformationModule= "TransformationMysqlJdbc"
}
});

-- set struct and types
grtS.set(grtV.getGlobal("/migration/targetConnection"), "db.mgmt.Connection")
grtV.setContentType(grtV.getGlobal("/migration/targetConnection/parameterValues"), "string")
grtV.setContentType(grtV.getGlobal("/migration/targetConnection/modules"), "string")

targetConn= grtV.getGlobal("/migration/targetConnection")
targetRdbmsName= grtV.toLua(targetConn.driver.owner.name)


-- Test connections
print("Test source connection to " .. sourceRdbmsName .. " ...")

res= grtM.callFunction(grtV.toLua(sourceConn.modules.ReverseEngineeringModule), "getVersion", sourceConn)
grt.exitOnError("The connection to the source " .. sourceRdbmsName .. " database could not be established.")


print("Test target connection to " .. targetRdbmsName .. " ...")

res= grtM.callFunction(grtV.toLua(targetConn.modules.ReverseEngineeringModule), "getVersion", targetConn)
grt.exitOnError("The connection to the target " .. targetRdbmsName .. " database could not be established.")

-- store target version for the migration process
grtV.setGlobal("/migration/targetVersion", res)
end

-- ------------------------------------------------------------------



Error Reported By the MySQL Migration Toolkit
**********************************************]

Connecting to source database and retrieve schemata names.
Initializing JDBC driver ...
Driver class MS SQL JDBC Driver
Opening connection ...
Connection jdbc:jtds:sqlserver://172.25.1.2:1433/DbName;user=sa;password=sqlserver
The list of schema names could not be retrieved (error: 0).
Network error IOException: Connection refused: connect
Details:
net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:355)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringMssql.getSchemata(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)

Options: ReplyQuote


Subject
Written By
Posted
Re: Network error IOException: Connection Refused: connect in MS SQL Server 2000
September 27, 2005 01:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.