May 13, 2008 at 7:02 am
Hi there, I'm not exactly sure where to post this question, so I'll post it here.
I have 2 Windows XP machines, not part of a network domain. One of the XP machines is running SQL Server 2005 Express edition, lets call this DB machine. The other machine is just running my application - App machine. As part of my application, I want to be able to do a backup of the database.
The DB machine is also running the application. If I log into my application on the DB machine using SQL Server Authentication, and run the backup it works fine. (It's using the T-SQL BACKUP command). If it log into my application on the App machine, and try to do the backup, I'm getting an error saying that "The user is not associated with a trusted SQL connection". The same user is being used in both scenarios, and this user can update the database fine on the App machine, so it's not really a connection problem, it seems a permission problem. The SQL user I have created is a member of the db_backupoperator role for the required database.
Is anyone aware as to why I would be getting this error?
May 13, 2008 at 7:06 am
Can you post your application's connection string? Changing sensitive information of course. I ask because the error you are getting is telling me that you are attempting to connect using Windows Authentication not SQL Server Authentication. Are you passing User Id = jack; Password = corbett in your connection string?
Are you using a SQLCommand to run the backup or are you using SMO?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
May 13, 2008 at 8:11 am
Thanks for the reply.
I've written a small application in .NET to perform the backup. The connection string is using a User and password, and definitely NOT using Windows Integrated Security. I'm using SQLCommand to execute the BACKUP T-SQL statement.
Jack Corbett (5/13/2008)
Can you post your application's connection string? Changing sensitive information of course. I ask because the error you are getting is telling me that you are attempting to connect using Windows Authentication not SQL Server Authentication. Are you passing User Id = jack; Password = corbett in your connection string?Are you using a SQLCommand to run the backup or are you using SMO?
May 13, 2008 at 8:43 am
Can you post your .NET code? Do you have SSMS Express installed and, if so, can you run the backup from the app machine using SSMS Express?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
May 13, 2008 at 8:50 am
I'll post up the code in a couple of hours, don't have access to it right now, thanks
May 13, 2008 at 3:53 pm
Cheers - I got this sorted, I just needed to share out the local folder on the DB machine where the backup was being created, I then copied it to the App machine
May 13, 2008 at 4:28 pm
That makes sense.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply