Why can't I see where 'sa' is?

  • I have this procedure that I get an error:

    Login failed for user 'sa'.

    Here's the statement:

    SELECT TOP 1 'VSMIADB01', '', db.name, 'Production', 'Production', 'Production', db.crdate, bs.type, bs.backup_finish_date, bs.backup_size, bs.user_name FROM [VSMIADB01].[master].[dbo].[sysdatabases] db LEFT OUTER JOIN [VSMIADB01].[msdb].[dbo].[backupset] bs ON bs.database_name = db.name, [msdb].[dbo].[backupmediafamily] f WHERE COALESCE( bs.type, 'D' ) = 'D' and bs.database_name = ('ePO4_VSEPOLICY1') ORDER BYdb.name ASC, backup_finish_date DESC

    I guess I'm a retard cause I don't see where 'sa' is being passed?

  • I suspect VSMIADB01 is a linked server that you've either set to use the login's current security context (and you're logged in as sa (tut tut)), or has a hard coded security context and the sa password is incorrect for that linked server (or the sa account is disabled).

  • Incidently, you should be extremely careful in setting sa as the remote login credentials for a linked server as it's almost impossible to restrict users from having sysadmin rights on the linked server irregardless of their permissions on the local server.

  • Howardw-

    Thanks sooo much that was it !!!

    Good karma to you!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply