question

David 2 1 avatar image
David 2 1 asked

How Do I Check What The Default Database Is For The SA User?

Further to my continuing troubles in this question: http://ask.sqlteam.com/questions/856/how-to-execute-jobs-from-the-sql-server-enterprise-manager how do I check what the default database is for the SA user?

I am still having problems getting these jobs to execute. :(

Thanks in advance.

sql-server-2000jobsa
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

TG avatar image
TG answered

Do the jobs only perform actions within the sql server instance that hosts the job? In other words if the job is trying connect to a linked server or the (local or remote) file system or launch a non-sql process then you may need to change the owner to a domain account that has the necessary privs.

EDIT: btw - the first result set of the following command will show the default db:

exec sp_helplogins sa            
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Peso avatar image
Peso answered
SELECT  name,            
    dbname            
FROM    sys.syslogins            
WHERE   name = 'sa'            
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.