Personal Notes of Edwin Eu

Window Server 2012

In Microsoft SQL Server, SharePoint 2010 on 02/21/2013 at 9:50 PM

I always try to keep up with new technology and excited to learn and explorer.

Microsoft recently release Microsoft Window Server 2012, Microsoft SQL Server 2012 and Microsoft SharePoint Server 2013.

I am excited and  looking forward to explorer, learn and  master those new skills.

First, it’s my pleasure to share some Microsoft Window Server 2012 installation screens:

Window2012_pic1

 

 

 

 

 

 

 

 

Microsoft Window Server 2012 “WELCOME TO SERVER MANAGER” is totally new designs and looks.

Window2012_pic2

 

 

 

 

 

 

 

 

 

 

 

One things that I noticed on Microsoft Window Server 2012.   There is no START menu.

The START menu is  located in the Lower Left Window Server 2012.

Window2012_pic3

Restored the production corrupted database

In Microsoft SQL Server on 11/09/2012 at 8:13 AM

I am working on a client who running Microsoft SQL Server 2008 R2 Express that implented in Retail stores.

The database architecture setup was very unique due to the nature of business.

Each retail store has itown SQL Server 2008 R2 Express that connected to POS machine.

However, the database recovery model was setup to be SIMPLE.  (It’s not a best practice) in case a disaster.

In addition, the log file was named with extension MDF instead of LDF.

One day, the database was corrupted and down for 4 days.  The company DBAs was unable to recover the database.

I was assigned to recovery those SQL database.

Here are my steps to recover the corrupted database.

—- Step Create the exact database name

—- Step 1 Create the exact database name

CREATE DATABASE AxRetailPOS ON  PRIMARY

( NAME = N’AxRetailPOS’,

    FILENAME = N’D:\SQL_DATA\DATA\AxRetailPOS.mdf’,

    SIZE= 8MB, MAXSIZE = UNLIMITED, FILEGROWTH = 16MB)

LOG ON

( NAME = N’AxRetailPOS_log.mdf’,

 FILENAME = N’E:\SQL_LOG\AxRetailPOS_log.mdf’,

SIZE = 8MB, MAXSIZE = UNLIMITED, FILEGROWTH = 16MB)

GO

—- Step 2

Stop the SQL Server Services

Move the original MDL file from older server (or location) to new server (or location).

By replacing just create MDF file.  Then, delete the LDF file of the new server just created.

— Step 3

Started the SQL Server services.

— Step 4

Make sure system table of master database allow to update the value

USE MASTER

GO

 exec SP_CONFIGURE ‘allow updates’, 1

RECONFIGURE WITH  OVERRIDE

GO

—Step 5 – Change database mode to emergency mode

 ALTER DATABASE AxRetailPOS SET  EMERGENCY

GO

SELECT * FROM  SYSDATABASES

 WHERE NAME = ‘AxRetailPOS’

 GO

— Update only one row in sysdatabase

BEGIN

  UPDATE sysdatabases

  SET status = 32768

  WHERE name = ‘AxRetailPOS’

 COMMIT TRAN

END

select * from  sysdatabases

 go

— Find out the database id

select name, filename from sysdatabases

 where dbid = ’7′

 go

 ALTER DATABASE AxRetailPOS Rebuild Log

ON (NAME = N’AxRetailPOS_Log’,

   FILENAME = N’C:\Program Files\Microsoft SQL Server\MSSQL10_50.SBHDB01\MSSQL\DATA\AxRetailPOS.ldf’)

GO

ALTER DATABASE AxRetailPOS Set  online

go

 DBCC rebuild_log (‘AxRetailPOS’, ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.SBHDB01\MSSQL\DATA\AxRetailPOS_log.ldf’)

 GO

Microsoft SQL Server 2012

In Microsoft SQL Server on 07/25/2012 at 3:57 PM

Microsoft SQL Server 2012 finally release. There are three main version:

  • Microsoft SQL Server 2012 Enterprise Edition
  • Microsoft SQL Server 2012 Business Intelligence Edition
  • Microsoft SQL Server 2012 Standard Edition

For more information, please go to http://www.microsoft.com/sqlserver/en/us/editions.aspx

Microsoft SQL Server 2012 innstallation step by step