[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-06-07
4
Medium Priority
?
293 Views
Last Modified: 2008-02-26
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!
0
Comment
Question by:rascal
  • 2
2 Comments
 
LVL 43

Accepted Solution

by:
Eugene Z earned 300 total points
ID: 16857192
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
 
LVL 43

Expert Comment

by:Eugene Z
ID: 17485768
The solution was provided
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question