Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Backup command not working - not a trusted SQL con

Author  Topic 

joker77
Starting Member

4 Posts

Posted - 2008-05-13 : 09:02:40
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?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-13 : 10:24:47
How come user can update if you have only given db_backupoperator role? Post your backup T-SQL command.
Go to Top of Page

joker77
Starting Member

4 Posts

Posted - 2008-05-13 : 10:33:08
User is a member of db_backupoperator, db_datareader, db_datawriter and public roles on database.

The T_SQL backup command is fairly straightforward, I'm using .NET and the SQLCommand ADO.NET object to run it. Works fine on DB machine, but not on App machine. I'm using SQL authentication rather than Windows integrated.
Go to Top of Page

joker77
Starting Member

4 Posts

Posted - 2008-05-13 : 17:54:11
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
Go to Top of Page
   

- Advertisement -