xp_regread error

  • EXEC master..xp_regread N'HKEY_LOCAL_MACHINE',N'Software\Microsoft\OLAP Server\CurrentVersion',N'csdVersion'

    The above sql script provided by "Script of the day" on 10/18/2006 generates this error on my box:

    RegOpenKeyEx() returned error 2, 'The system cannot find the file specified.'

    Msg 22001, Level 1, State 1

    (0 row(s) affected)

    Please advise solution.

    Thanks.

     

  • Check what you get when you run:

    EXEC master..xp_regread N'HKEY_LOCAL_MACHINE',N'Software\Microsoft\OLAP Server\CurrentVersion'

    If the value for KeyExist is 1, the error means the key "CurrentVersion" does not have the subkey "csdVersion" defined.

    You can run the following to check it exists or not before reading it

    EXEC master..xp_regread N'HKEY_LOCAL_MACHINE',N'Software\Microsoft\OLAP Server\CurrentVersion\csdVersion'

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply