SQL2005: How to find the "Registered Owner" and "Registered Organization"?

In SQL2000 the "Registered Owner" and "Registered Organization" were available as registry values, but the values don't exist in SQL2005. Is there a way to report these values in SQL2005 - either by registry read, or perhaps by reading a database table?

Note: SQLDMO fails to return any value in SQL2005.

Thanks!
LVL 1
rascalAsked:
Who is Participating?
 
Eugene ZCommented:
try:

for sql server 2005
--------------------------
 ---UNDOCUMENTED Ext Stored proc
--XP_REGREAD allows you to read Registry Key values

SET NOCOUNT ON
GO

DECLARE @org VARCHAR(50)
DECLARE @own VARCHAR(50)

EXECUTE xp_regread 'HKEY_LOCAL_MACHINE',
                'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\CurrentVersion',
                'RegisteredOrganization',@param = @org output

EXECUTE xp_regread 'HKEY_LOCAL_MACHINE',
                'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\CurrentVersion',
                'RegisteredOwner',@param = @own output


PRINT 'Whoever set up SQL Server for this class typed these in:'
PRINT ' '
SELECT 'Registered Organization is '+UPPER(@org)
SELECT 'Registered Owner is        '+UPPER(@own)

SET NOCOUNT OFF
GO
---------
for sql server 2000

 ---UNDOCUMENTED Ext Stored proc
--XP_REGREAD allows you to read Registry Key values

SET NOCOUNT ON
GO

DECLARE @org VARCHAR(50)
DECLARE @own VARCHAR(50)

EXECUTE xp_regread 'HKEY_LOCAL_MACHINE',
                'SOFTWARE\MICROSOFT\MSSQLSERVER\MSSQLSERVER\CurrentVersion',
                'RegisteredOrganization',@param = @org output

EXECUTE xp_regread 'HKEY_LOCAL_MACHINE',
                'SOFTWARE\MICROSOFT\MSSQLSERVER\MSSQLSERVER\CurrentVersion',
                'RegisteredOwner',@param = @own output

PRINT 'Whoever set up SQL Server for this class typed these in:'
PRINT ' '
SELECT 'Registered Organization is '+UPPER(@org)
SELECT 'Registered Owner is        '+UPPER(@own)

SET NOCOUNT OFF
GO




0
 
Eugene ZCommented:
The solution was provided
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.