Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSGetServerProperties

  No additional text.


Syntax

create proc sys.sp_MSGetServerProperties
as
   set nocount on

   DECLARE @auto_start                  INT
   DECLARE @startup_account             NVARCHAR(100)

   -- Read the values from the registry
   IF ((PLATFORM() & 0x1) = 0x1) -- NT
   BEGIN
      EXECUTE sys.xp_instance_regread N'HKEY_LOCAL_MACHINE',
                                             N'SYSTEM\CurrentControlSet\Services\MSSQLServer',
                                             N'Start',
                                             @auto_start OUTPUT,
                                             N'no_output'
      EXECUTE sys.xp_instance_regread N'HKEY_LOCAL_MACHINE',
                                             N'SYSTEM\CurrentControlSet\Services\MSSQLServer',
                                             N'ObjectName',
                                             @startup_account OUTPUT,
                                             N'no_output'
   END ELSE
   BEGIN
      SELECT @auto_start = 3 -- Manual start
      SELECT @startup_account = NULL
   END

   -- Return the values to the client
   SELECT auto_start = CASE @auto_start
                       WHEN 2 THEN 1 -- 2 means auto-start
                       WHEN 3 THEN 0 -- 3 means don't auto-start
                       ELSE 0        -- Safety net
                       END,
          startup_account = @startup_account


 
Last revision 2008RTM
News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash