Sql Backup And FTP

Welcome Guest Search | Active Topics | Log In | Register
New Topic Post Reply
Connecting to SQL Exp. 2005: Error 40 could not open connection Options · View
skayser
#1 Posted : Wednesday, August 04, 2010 5:04:29 AM Quote
Rank: Newbie

Groups: Registered

Joined: 8/4/2010
Posts: 5
Greetings, I am trying to connect to a SQL Express 2005 Server, which - at least according to the Properties in Mgmt Studio - is configured to accept remote connections. When I try to connect to it with sqlbackupandftp it hangs for a few seconds and then errors with 'Failed to retrieve databases from SQL server ... server was not found or is not accessible ... provider: Named Pipes Provider, error 40: could not open a connection to SQL server'.

Any ideas on how to determine the culprit?
skayser
#2 Posted : Wednesday, August 04, 2010 5:48:23 AM Quote
Rank: Newbie

Groups: Registered

Joined: 8/4/2010
Posts: 5
Error persists. Some additional information:
- Configuration Manager lists "Shared Memory, "Named Pipes", and "TCP/IP" as enabled
- SQLBackupAndFTP and the SQL Express DB are running on the same host
- SQL Server Browser is running
skayser
#3 Posted : Wednesday, August 04, 2010 6:00:22 AM Quote
Rank: Newbie

Groups: Registered

Joined: 8/4/2010
Posts: 5
Preliminary solution: stumbled upon "TCP Dynamic Ports: 1044" in SQL Configuration Manager -> TCP/IP. Pointed SqlBackupAndFTP towards 'localhost,1044' and now the connection attempt is successful.

Still have to learn why the port specification is required. When using SQL Mgmt Studio there's no need to specify a port.
ruslan
#4 Posted : Wednesday, August 04, 2010 10:24:55 AM Quote
Rank: Administration

Groups: Administrators

Joined: 8/10/2009
Posts: 350
Thank you for finding the solution yourself. It seems with a custom port, the management studio would require to add it to the host name just the same as in SQLBackupAndFTP. Maybe there's something in configuration of the studio that makes it to try this port.
soydeedo
#5 Posted : Tuesday, November 09, 2010 2:39:30 AM Quote
Rank: Guest

Groups:

Joined: 8/10/2009
Posts: 610
skayser wrote:
Preliminary solution: stumbled upon "TCP Dynamic Ports: 1044" in SQL Configuration Manager -> TCP/IP. Pointed SqlBackupAndFTP towards 'localhost,1044' and now the connection attempt is successful.

Still have to learn why the port specification is required. When using SQL Mgmt Studio there's no need to specify a port.


Thank you for your help. I wanted to use this program to backup my Outlook Business Contact Manager DB and couldn't get it to work for the life of me. I found a script on the BCM MSDN blog that works to make my .bak's, but I still needed a restore tool so I found myself back here anyhow.

Thank goodness I stumbled upon your thread here because I still couldn't get it to connect of course. I ended up having to turn on TCP/IP and Named Pipes, and then I used 'localhost,5356' as my server name in One-Click.

Thanks a ton!
Quick Reply Show Quick Reply
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You can create polls in this forum.
You can vote in polls in this forum.