PRB: Job Status is Not Refreshed When You Connect Using Incorrect Case for the Login Name (831366)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

SYMPTOMS

In Microsoft SQL Server 2000, if you connect by using the incorrect case of a login account, you may notice that the status of jobs that are owned by the login account are displayed incorrectly.

You may notice this behavior for both SQL Server and Microsoft Windows NT login accounts.

WORKAROUND

To work around this problem, make sure that you connect to the computer that is running SQL server by using the login name with the same case as that of the original login name.

MORE INFORMATION

Steps to Reproduce the Problem

  1. On the server that is running SQL Server, create a new SQL Server login account that is named TESTLOGIN (with all letters in uppercase).
  2. Assign the role permission as public to the TESTLOGIN login account on the master and the msdb databases.
  3. Start SQL Server Enterprise Manager, and then register the computer that is running SQL Server by using the credentials of TESTLOGIN.
  4. Create a new job on the server that is running SQL Server, and then use the following Transact-SQL statement in the job step:
    while (1=1)
       select @@version
    Note Make sure that the owner of the job is selected as TESTLOGIN.
  5. In the Enterprise Manager, expand the node for the server that is running SQL Server where you have created the job.
  6. Under the server name, expand Management, and then expand SQL Server Agent.
  7. Under SQL Server Agent, click Jobs.
  8. In the right pane, right-click the job that was created in step 4, and then click Start Job.
  9. Right-click the job again, and then click Refresh Job.

    Under Status, you may notice that the status value of the job is changed from Not Running to Executing.
  10. Right-click the same job, and then click Stop Job to stop the execution of the job.
  11. In the Enterprise Manager, right-click the server that you registered in step 3, and then click Delete SQL Server Registration.
  12. Use the SQL Server login account testlogin (with all letters in lowercase) to register the server that you deleted in step 11.
  13. In the SQL Server Enterprise Manager, on the left pane, expand the node that corresponds to the computer that is running SQL Server.
  14. Under the node for the computer that is running SQL Server (that is, the computer that you have registered), expand Management, and then expand SQL Server Agent.
  15. Under SQL Server Agent, click Jobs.
  16. In the right pane, right-click the job that you created in step 4, and then click Start Job.
  17. Right-click the job again, and then click Refresh Job to update the status of the job.

    You may notice that the Status value of the job remains Not Running even though the job is started.
You may also verify the status of the job by using a Transact-SQL statement. To do this, follow these steps:
  1. After you start the job, connect to the server that is running SQL Server by using SQL Query Analyzer. Connect with the SQL Server login account TESTLOGIN (make sure that all the letters are uppercase).
  2. Run the following Transact-SQL statement in Query Analyzer:
    use msdb
    go
    sp_help_job
    You may notice that the value 1 is displayed under current_execution_status. This value signifies that the job is running.
  3. Connect to the server that is running SQL Server by using the SQL Server login account as testlogin (make sure that all the letters are lowercase).
  4. Run the following Transact-SQL statement in Query Analyzer:
    use msdb
    go
    sp_help_job
    You may notice that the value 4 is displayed under current_execution_status. This signifies that the job is not running.

Modification Type:MinorLast Reviewed:12/15/2003
Keywords:kbprb KB831366 kbAudDeveloper