This project is read-only.

errors connecting to server

Aug 28, 2008 at 9:03 PM
I have SQL Express set to allow local and remote connections with both named pipes and TCP/IP in Surface Area Configuration.

Nevertheless ExpressMaint keeps being unable to connect to the server, and the batch file is presently being run manually with the local administrator account.

I've tried using computername\sqlexpress, computername, and sqlexpress for the server name, no success.

Any suggestions??

Thank you, Tom
Sep 11, 2008 at 9:51 PM
What error message are you getting? If the exact same batch file works manually it would seem to suggest a permissions issue for the account used to run the scheduled task
Sep 12, 2008 at 1:25 AM
Edited Sep 12, 2008 at 7:17 PM
I *was* starting the batch file manually, and it was a fairly standard error message about named pipes, TCP, etc., yet both of these items are enabled.

I don't have access to the PC now.

I will try again and post the exact error message with an example batch file statement.

It has something to do with the ID/account specified in the batch file.

The PC has only two local accounts: 1) local administrator; 2) local user.

I'm first trying to get it working with the local administrator before scheduling it etc.

Thank you, Tom
Sep 12, 2008 at 7:16 PM

My batch file statement is:

expressmaint -S (local) -D ALL_USER -T DB -R d:\reports -RU WEEKS -RV 1 -B d:\Database_Backups -BU DAYS -BV 1 -V -C

Expressmaint error: Failed to connect to server (SERVERNAME\SQLEXPRESS).
Expressmaint error: Failed to connect to server (local).

Expressmaint error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Remote connections ARE set to be allowed in Surface Area Configuration, using both TCP/IP and named pipes.

Batch file is being run locally and manually by local administrator account, which has SysAdmin rights on the instance.

Hope you can help...

Thank you, Tom

Sep 15, 2008 at 9:11 PM
I discovered today by reading some of the issue trackers that my original syntax was incorrect.
I had parentheses around SERVERNAME\SQLEXPRESS.
When I removed these, the batch files ran properly.
Thank you, Tom