Hi Prabhu,
I believe that your connection URL is not valid. Please consider following 
Microsoft guide:

http://msdn.microsoft.com/en-us/library/ms378428(v=sql.90).aspx

The correct form seems to be:

jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]

I believe that you used normal slash between server name and instance name 
instead of the backslash, right? You can specify the instance name in the 
property as instanceName=instance1 if you do not want to fight with proper 
escaping of the backslash.

Are you also able to ping MT-TRNGSQL from the box where you're running sqoop?

Jarcec

On Wed, Jul 18, 2012 at 01:41:54PM +0530, prabhu k wrote:
> Thanks for the reply.
> 
> I have run the below command as per your suggestion.
> 
> bin/sqoop list-databases --connect
> "jdbc:sqlserver://MT-TRNGSQL/SQLEXPRESS:1433;username=abc;password=xyz"
> 
> I am getting following error.
> 
> sqoop-1.4.1-incubating__hadoop-0.20# bin/sqoop list-databases --connect
> "jdbc:sqlserver://MT-TRNGSQL/SQLEXPRESS:1433;username=abc;password=xyz"
> Warning: /usr/lib/hbase does not exist! HBase imports will fail.
> Please set $HBASE_HOME to the root of your HBase installation.
> Warning: $HADOOP_HOME is deprecated.
> 12/07/18 13:33:00 INFO manager.SqlManager: Using default fetchSize of 1000
> 12/07/18 13:33:15 ERROR manager.CatalogQueryManager: Failed to list
> databases
> com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to
> the host MT-TRNGSQL/SQLEXPRESS, port 1433 has failed. Error: "null. Verify
> the connection properties. Make sure that an instance of SQL Server is
> running on the host and accepting TCP/IP connections at the port. Make sure
> that TCP connections to the port are not blocked by a firewall.".
> 
> and verified the port 1433 is open.
> 
> Please suggest and help me.
> 
> Thanks,
> Prabhu.
> On Wed, Jul 18, 2012 at 12:19 AM, Chalcy <[email protected]> wrote:
> 
> > Hi,
> >
> > This is one of the very frustrating errors I got about 10 months ago when
> > I set up swoop first.
> >
> > Try just list databases, if this works, then everything will work.  I am
> > assuming that you could connect to the instance thru' your sqlserver
> > manager.  I would make sure of that first.
> >
> > sqoop list-databases --connect
> > "jdbc:sqlserver://instance:port;username=userid;password=mypassword"
> >
> >  Also port 1433, make sure it is open.  You will know that, by using the
> > following command,
> > nmap -p 1433 -sT localhost
> >
> > Hope this helps,
> > Chalcy
> >
> >
> > On Tue, Jul 17, 2012 at 12:26 PM, prabhu k <[email protected]> wrote:
> >
> >> Hi Users,
> >>
> >> When i am trying to import sqlserver database table to hive, getting
> >> following error.
> >>
> >> command:
> >> ==============
> >>
> >> $bin/sqoop import --driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
> >> --connect 'jdbc:sqlserver://localhost:1433;database=abc;username=sa'
> >> --hive-overwrite --direct --table slide4_test  --hive-import
> >> --create-hive-table --hive-table slide4_test --fields-terminated-by '\t'
> >> --lines-terminated-by '\n' --append
> >>
> >>
> >> Error:
> >> ======
> >>
> >> sqoop-1.4.1-incubating__hadoop-0.20# bin/sqoop import --driver
> >> 'com.microsoft.sqlserver.jdbc.SQLServerDriver' --connect
> >> 'jdbc:sqlserver://localhost:1433;database=abc;username=sa' --hive-overwrite
> >> --direct --table slide4_test  --hive-import --create-hive-table
> >> --hive-table slide4_test --fields-terminated-by '\t' --lines-terminated-by
> >> '\n' --append
> >>
> >> Warning: /usr/lib/hbase does not exist! HBase imports will fail.
> >>
> >> Please set $HBASE_HOME to the root of your HBase installation.
> >>
> >> Warning: $HADOOP_HOME is deprecated.
> >>
> >>
> >>
> >> 12/07/17 16:56:45 INFO manager.SqlManager: Using default fetchSize of 1000
> >>
> >> 12/07/17 16:56:45 INFO tool.CodeGenTool: Beginning code generation
> >>
> >> 12/07/17 16:56:59 ERROR manager.SqlManager: Error executing statement:
> >> com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to
> >> the host localhost, port 1433 has failed. Error: "Connection refused.
> >> Verify the connection properties. Make sure that an instance of SQL Server
> >> is running on the host and accepting TCP/IP connections at the port. Make
> >> sure that TCP connections to the port are not blocked by a firewall.".
> >>
> >> com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to
> >> the host localhost, port 1433 has failed. Error: "Connection refused.
> >> Verify the connection properties. Make sure that an instance of SQL Server
> >> is running on the host and accepting TCP/IP connections at the port. Make
> >> sure that TCP connections to the port are not blocked by a firewall.".
> >>
> >> Here, i have one question
> >>
> >> 1. How can i test sqlserver is up and running on sqoop import command
> >> executing machine.
> >>
> >> Please suggest and help me.
> >>
> >> Thanks,
> >> Prabhu.
> >>
> >>
> >>
> >
> >

Attachment: signature.asc
Description: Digital signature

Reply via email to