Gagal Simpan Schema di MS-SQLServer 2012

Yang pernah/sedang mengalami gagal simpan schema pada Microsoft SQLServer 2012, dengan pesan error seperti ini:

TITLE: Microsoft SQL Server Management Studio

Cannot insert the value NULL into column 'diagram_id', table 'MONAS_ALS.dbo.sysdiagrams'; column does not allow nulls. INSERT fails.

The statement has been terminated.

The 'sp_creatediagram' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead. (.Net SqlClient Data Provider)

Berikur solusi untuk mengobatinya:

DROP TABLE dbo.sysdiagrams;
CREATE TABLE [dbo].[sysdiagrams]
 [name] [sysname] NOT NULL,
 [principal_id] [int] NOT NULL,
 [diagram_id] [int] IDENTITY(1,1) PRIMARY KEY,
 [version] [int] NULL,
 [definition] [varbinary](max) NULL,
 CONSTRAINT [UK_principal_name] UNIQUE ([principal_id],[name])

EXEC sys.sp_addextendedproperty 
 @value=1 , 

Semoga bermanfaat 🙂

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

This site uses Akismet to reduce spam. Learn how your comment data is processed.