A lot of people have experienced issues after moving databases (especially the configuration database)
The typical message when trying to run an stsadm command, or some Central Administration pages is…
“System.ArgumentNullException: Value cannot be null.Parameter name: str at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)”
One cause for this could be that the timer service has not reconnected to the Configuration Database.
The timer service has a local cache of all jobs stored in %systemdrive%\documents and settings\all users\application data\microsoft\sharepoint\config, in a folder with a GUID name. (on SharePoint 2010 it is $systemdrive%\users\all users\application data\microsoft\sharepoint\config. Note that this is a hidden folder
This folder will contain a file called cache.ini and many XML files.
First possible issue..
As noted in http://technet.microsoft.com/en-us/library/cc561004(office.12).aspx the SharePoint application groups may have ‘lost’ permissions (although the article has the wrong path). TheWSS_ADMIN_WPG and WSS_RESTRICTED_WPG require write permissions to this folder. Stop the SharePoint Timer service and Administration service, grant the permissions and re-start the services.
Second possible issue..
We have seen this once. The server registry lost the record of the configuration database ID. This is stored in HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Web Service Extensions\12.0\Secure\ConfigDB (or 14.0 for 2010). There should be a REG_SZ key called Id. The value of this key should match the name of the folder in the %systemdrive%\documents and settings\all users\application data\microsoft\sharepoint\config folder.
In the case we saw, the value of this key was 00000000-0000-0000-0000-00000000000000
As above, we changed stopped the services, changed the key, and restarted the services.
Important note – Editing the registry can be a dangerous task & is done at your own risk