Re-Installing vCenter with new DSN credentials

If you’re ever in a situation where you’ve moved the vCenter database, and have actually changed the login details for the database that the DSN points to, and you’re using SQL Server. Then upon re-installing vCenter, you will be greeted with:

“Database job [Past day stats rollupvcenter] was created by another user. Please use the same user to setup your DSN or remove the job. ODBC Error: [Microsoft][SQL Native Client][SQL Server]The specified @job_name (‘Past Day stats rollupvcenter’) does not exist.

Source: IDC 2010 SMO Analysis | repurposed

When vCenter is first installed, it schedules jobs with the help of the system DB - MSDB. What’s left to do, is just remove the jobs created by the previous dbo of your vCenter data. You achieve this by first listing what jobs are created on the SQL Server.

SELECT [job_id],
[originating_server_id],
[name],
[enabled],
[description],
[start_step_id],
[category_id],
[owner_sid],
[notify_level_eventlog],
[notify_level_email],
[notify_level_netsend],
[notify_level_page],
[notify_email_operator_id],
[notify_netsend_operator_id],
[notify_page_operator_id],
[delete_level],
[date_created],
[date_modified],
[version_number]
FROM [msdb].[dbo].[sysjobs]

As you can see, four scheduled operations exist. Thankfully you don’t have to worry about just clearing this table, as there’s a stored procedure that comes within MSDB → sp_delete_job

Run it for each of the jobs, and you’ll be ready to continue installing vCenter.