MSSQL connection issue

[expired user #9312]'s profile image [expired user #9312] posted 9 years ago in General Permalink
I have an MSSQL database that I'm trying to connect to. When connecting I need to pass both the username and the domain as well as the password.

My question is what format I should put this in when I'm populating the username field as part of setting up the connection.

I've tried domain\user, user\domain, domain/user, user/domain and user@domain but none of them work.

I know the login works, as I can connect via freetds using the username of domain\user.

Any suggestions?
[expired user #9329]'s profile image [expired user #9329] posted 9 years ago Permalink
Hi,
Take a look at following discussion thread. May you find appropriate solution:

MySQL ConnectionString Help
[expired user #9312]'s profile image [expired user #9312] posted 9 years ago Permalink

Hi,
Take a look at following discussion thread. May you find appropriate solution:

MySQL ConnectionString Help



Not sure why that would help, it's for MySQL and I'm looking for a solution for MSSQL....
[expired user #9350]'s profile image [expired user #9350] posted 9 years ago Permalink
Not sure if this will help for what your trying to accomplish, but I had a problem connecting Heidisql on my laptop to sql server on a company's network in domain(HQ) and I wanted to use "Windows Authenication".

I had to add a network password for the server specifying the user name as(HQ\user).

hth
ansgar's profile image ansgar posted 8 years ago Permalink
I have a local MSSQL server installed, and use it daily with this combination:
Network type: Microsoft SQL Server (named pipe)
Hostname/IP: ANSGAR-PC\SQLEXPRESS

Another MSSQL instance is running on a remote server, and I connect to its IP via TCP/IP:
Network type: Microsoft SQL Server (TCP/IP)
Hostname/IP: x.x.x.x
[expired user #9312]'s profile image [expired user #9312] posted 8 years ago Permalink
I think there is a little confusion here. The issue is that I'm attempting to connect to the server using TCP/IP (not a named pipe) and I need to pass a username which includes the domain part.
[expired user #9367]'s profile image [expired user #9367] posted 8 years ago Permalink
select * from table- Error Code: 2013
Lost connection to MySQL server during query
my table contain 3 columns and 282 rows . if I run the workbench I am getting above error.but same query I am bale to run in putty.
[expired user #9350]'s profile image [expired user #9350] posted 8 years ago Permalink
Jeya you might be having a timeout problem, take a look at: https://dev.mysql.com/doc/refman/5.0/en/gone-away.html
[expired user #10484]'s profile image [expired user #10484] posted 7 years ago Permalink

Same problem here. I can connect to our SQL Servers via free-tds but not using HeidiSQL (tcp/ip) which always reports back "Error 18456".

@Tiberios: Have you found any solution yet?

Maybe a HeidiSQL addon using free-tds for these connections could help.

[expired user #9312]'s profile image [expired user #9312] posted 7 years ago Permalink

Chris78 - I gave up. between that and moving to using a linux machine for more stuff, I've moved to another tool instead.

[expired user #10484]'s profile image [expired user #10484] posted 7 years ago Permalink

Tiberios, thanks for your reply.

Currently I'm using HeidiSQL in Wine on a Linux machine, but I'm always interested in alternative solutions. Can you name the "other tool"? Just curious...

Regards Chris

[expired user #10484]'s profile image [expired user #10484] posted 7 years ago Permalink

I've found a solution for me now to connect HeidiSQL with MS SQL Servers via TCP/IP and with a domain user (let's say "my-domain\my-user"). Assuming your PC is in the same domain as the database server follow these steps:

First, grant the domain user (the one you want to use for the SQL Server connection!) permissions for the HeidiSQL application folder, so HeidiSQL can be executed by the domain user.

Now locate heidisql.exe, hold shift key and right click the application. The shift key will extend the context menu, so you will see "Run as different user" in the menu. Use this menu entry to execute HeidiSQL as "my-domain\my-user".

In Heidi's connection dialog choose connection type "Microsoft SQL Server TCP/IP", enter the hostname (or "<hostname>\SQLEXPRESS") and now enable the option "Windows authentication".

Done!

You should now be able to connect.

Hope this helps.

Chris

Please login to leave a reply, or register at first.