Wednesday, March 7, 2012

Registry configuration problems ?

Hi,

Quite new to SSIS am currently trying to set up a registry configuration which will hold a connection string which will enable the main SQL configurations for a package to load. I wish to put the registry entry under the HKEY_LOCAL_MACHINE directory or more precisely in a key such as below:

HKEY_LOCAL_MACHINE\SOFTWARE\My Company\My Project\ETLConfigDbString

Have set this key up with a default value of the connection string and an associated registry configuration with the above as the value in the regsitry entry box. This configuration is listed as the first configurartion for the package to ensure it gets applied before the SQL configuration loads.

However on load or execute I get a warning of the type

A configuration entry specifies a registry key that is not available. Check the registry to ensure that the key is there.

Are there any known problems with regsitry configurations or am I just missing something obvious here ?

Thanks

Right may have answered my own question. Digging around on tghe Net a bit more I think it's that you can only have a registry entry which is under HKEY_CURRENT_USER (or one of its subkeys). It also must have a value called Value which must be a DWORD or string.

Can someone confirm this is correct ? Was hoping to use the HKEY_LOCAL_MACHINE key as that's what our company already uses for other software values but obviously if SSIS is restricted to HKEY_CURRENT_USER then that's not going to work.

Thanks

|||From the example given in Books Online, it does appear that keys have to be located under HKEY_CURRENT_USER. However, the text isn't as clear as it could be, so I'm not sure this is a definitive answer.

|||

Thanks John. I couldn't get the HKEY_LOCAL_MACHINE key to work so I've switched to using a system enviroment variable instead now. Didn't want to use HKEY_CURRENT_USER as the SQL configuration database is always going to be the same regardless of who the user running the package is so it didn't seem a good solution to use HKEY_CURRENT_USER.

To be honest (IMO) it's not really paticularly good from a deployment/production point of view either. I was intending to supply our DBA with a .reg key they could run to set up the registry entry put obviously I can't do that if I have to use HKEY_CURRENT_USER as I don't know what the SQL Agent user GUID is going to be in the registry.

So all in all a system enviroment variable seemed a better solution.

|||

I prefer environment variables myself, or a single XML configuration file.

No comments:

Post a Comment