Change State SQL Express to Server

Compatible :: Microsoft SQL Express 2005 and 2008
  1. Install MS SQL Express 2008 
  2. SQL Query Command
    • -- ## Change login mode to 2 = "Windows and SQL Server Authentication", 1 = "Windows Authentication Only"
      EXEC master.dbo.xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
      N'Software\Microsoft\MSSQLServer\MSSQLServer',
      N'LoginMode', REG_DWORD, 2
    • -- ## Enable sa and change password to "aaaa"
      ALTER LOGIN [sa] WITH PASSWORD='aaaa', CHECK_POLICY=OFF
      ALTER LOGIN [sa] ENABLE
    • -- ## Change Port to 1433
      EXEC master.dbo.xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
      N'Software\Microsoft\Microsoft SQL Server\MSSQLServer\SuperSocketNetLib\Tcp\IpAll',
      N'TcpDynamicPorts', REG_DWORD, 1433
    • -- ## Enable Network TCP/IP and Change Port
  3. Run Command Prompt
    • netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENT
    • net stop "SQL Server (SQLEXPRESS)"
    • net start "SQL Server (SQLEXPRESS)"

Comments

Popular posts from this blog

การตั้งเวลาระหว่าง Server และ Client

วิธีตั้งค่า NTP บน Primary Domain Controller

Installation and Run Node.JS on IIS