Server Management - Systems Insight Manager
cancel
Showing results for 
Search instead for 
Did you mean: 

problem connecting to msde db for backup

 
MarkButler
Occasional Advisor

problem connecting to msde db for backup

I'm not sure if this should go in the scripts forum or not. I am trying to backup the msde database. I'm using the sample that is in the backup/restore manual (http://h20000.www2.hp.com/bc/docs/support/SupportManual/c00740865/c00740865.pdf)
I created the script, but when I run:

OSQL -S SIMServername -U !mdpz -i mybackup.sql -n

all I get is: Login failed for user '!mdpz'. Reason: Not associated with a trusted SQL Server Connection.

Now, I installed the MSDE and SIM using that ID so I know its the one. When I check ODBC, there is a SQL Server DSN named "Insight_v50_0" that uses !mdpz as its connection and it successfully connects..

So I don't know what I am doing wrong. Can anyone point me to where I could learn more about all of this?
2 REPLIES
MarkButler
Occasional Advisor

Re: problem connecting to msde db for backup

More info.. the problem seems to be something in the way I log in, I tried using the sqlmaint program and got the same problem but if I defaulted the login, it worked..

C:\Program Files\Microsoft SQL Server\MSSQL\Binn>sqlmaint -S SIMServer -U domain\!mdpz -D Insight_v50_0_9947637 -CkDB

Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760 Copyright (C) Microsoft Corporation, 1995 - 1998

[Microsoft SQL-DMO (ODBC SQLState: 28000)] Error 18452: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'domain\!mdpz'. Reason: Not associated with a trusted SQL Server connection.


C:\Program Files\Microsoft SQL Server\MSSQL\Binn>sqlmaint -D Insight_v50_0_9947637 -CkDB

Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760 Copyright (C) Microsoft Corporation, 1995 - 1998

Logged on to SQL Server 'SIMServer' as 'domain\!mdpz' (trusted)

Starting maintenance of database 'Insight_v50_0_9947637' on 11/28/2006 3:45:58 PM

[1] Database Insight_v50_0_9947637: Check Data and Index Linkage...


** Execution Time: 0 hrs, 0 mins, 31 secs **


End of maintenance for database 'Insight_v50_0_9947637' on 11/28/2006 3:46:29 PM


SQLMAINT.EXE Process Exit Code: 0 (Success)
MarkButler
Occasional Advisor

Re: problem connecting to msde db for backup

well, I still don't really know why it does it, but the problem is solved by using -E which uses the trusted authentication for login.