Page 1 of 1

MSSQL Connection not successfull

Posted: Thu Feb 28, 2013 5:58 am
by Rulan
IA15, SQLSERVER 2008 R2

We want to use sql scripting from setup...
But we have great problems to get a connection to SQL-Server:
MSSQL.jpg
MSSQL.jpg (22.73 KiB) Viewed 8755 times

1) we scanned with MS SQL Instances an found differnt Instances, inclusive our own PC.
2) We can connect to local db of local Workstation with the scanned name -- successfull :D
3) We connect to local db of local workstation with "localhost" --- successfull :D
4) We connect to local DB of Workstation with TCPIP --- Not successfull :(
5) We connect to a not local Db on a different PC with scanned name or TCPIP -- not successfull :(

We only can get a connection to local db.
firewalls are down.
Protocols for mssqlserver: Named pipes and TCP/IP activated.
SQL Server Browser and Agent are running.

what is going wrong? what else can we test?
Connection to the foreign dbs with managment studio are successfull.

regards

Re: MSSQL Connection not successfull

Posted: Thu Feb 28, 2013 12:05 pm
by FrancescoT
Dear Rulan,

honestly, I have used the same MSSQL plugin with several personal projects without any problem.

By your screenshot, it not easy to read the parameters used with command, due the poor resolution image you posted.

I can suggest you to have a look (if you haven't already), to the IA project sample "MS SQL Server connection".
I have been always able to verify a ms sql server connection using it (even with a network server).

Regards

Re: MSSQL Connection not successfull

Posted: Mon Mar 11, 2013 7:49 am
by Rulan
Hello Francesco,
we experienced... and tested...

-We use a PCs, where the connection work -we use mssql with a "go" command and read out the variable..

1) In Servername we type "IP" of the sqlserver and we get "success" for the connection! :D
on netstat -an we could see that our machine listen to port 1433.. every thing is fine...

2) But now!!!
Same maschine same settings!!!
We changed to combination "ServerName,1433" = "sameIP,1433", we get "Database error" for the connection...
on netstat-an we could not (!) see that our machine is listening to any port...

Do we something wrong using the parameters HOSTNAME,PORT?????
we are not able to use port-parameters with the syntax from above.

regards

Re: MSSQL Connection not successfull

Posted: Mon Mar 11, 2013 12:08 pm
by FrancescoT
Dear Rulan,

Honestly, I never used the port parameter with along with the server name.

Just a question, why don't you use the assigned MSSQL server name as could be "<Computer Name>\SQLEXPRESS" instead of the IP address?
If I'm not wrong, using the above syntiax should resolve the used server port automatically

Regards

Re: MSSQL Connection not successfull

Posted: Tue Mar 12, 2013 3:01 am
by Rulan
Dear Francesco,
first, we need to work with ip adress, because we do not every time know the names. Then we also need to write ip to registry and in config-files.. But we dont't think that ip or Names are the problem...

with the ports we want to insure that MSSQL connect via port 1433...
also see viewtopic.php?f=2&t=5175 !!!

Our problem:
1) we have some clients that can connect with MSSQL to Server A. That works fine!
2) we also have Clients that cannot connect to the same server A. That is very bad!
By the way we tried to use ip and servernames, tried to connect to server which are scanned by sql-instances on the problem clients. No success!!!!

And we don't know why... The problem clients (xp and win7) are in the same IP-segment. ping works fine. firewall is down. we always became connect_database_error. The problem clients do find, using the MSSQL-instances, less MSsqlservers than the working clients... The connection parameters are identical.

The only difference we can see, is, that the problem clients have no local mssqlserver no sqlserver\express installed.
But that should not be a problem, we read in the forum. isn't it?

Any Idea, what to do. what are the minimum conditions for the problem-clients? You have a condition-list?

regards

Re: MSSQL Connection not successfull

Posted: Tue Mar 12, 2013 1:15 pm
by FrancescoT
Dear Rulan,

Really strange ... but honestly, I'm not an MS SQL Server expert .

The only difference we can see, is, that the problem clients have no local mssqlserver no sqlserver\express installed.
But that should not be a problem, we read in the forum. isn't it?

I believe as you that this should not be the cause.
... Any Antivirus which integrates a firewall on those machines?
Also, can you verify if it is required the SQL Server Native Client on those machines?
http://msdn.microsoft.com/en-us/sqlserver/ff658533

By the way, I have tried to connect to an MS SQL instance using an IP address ... I'm not able to connect even from MS SQL server Managment studio :cry:

Regards

Re: MSSQL Connection not successfull

Posted: Mon Mar 18, 2013 7:27 am
by Rulan
Hello Francesco,

For Info:
you have to install sqlncli.msi (native client).
you only have to install the minimum (without native client). that's enough!!!

Then everything is allright...
regards

Re: MSSQL Connection not successfull

Posted: Mon Mar 18, 2013 9:04 am
by FrancescoT
Dear Rulan,

many thanks for sharing this useful info :D .

Regards