---
title: "How can I create a SQL Server system table"  
description: "How can I create a SQL Server system table"  
author: "Anonymous User"  
published: 2015-02-18  
updated: 2015-02-24  
canonical: https://www.mindstick.com/forum/12964/how-can-i-create-a-sql-server-system-table  
category: "asp.net"  
tags: ["code first", "entity framework", "tsql"]  
reading_time: 2 minutes  

---

# How can I create a SQL Server system table

I am developing a site that uses [Entity Framework](https://www.mindstick.com/articles/1566/crud-operations-using-entity-framework-code-first-approach) code first with migrations. After each major release, I take a copy of the [production](https://yourviews.mindstick.com/story/1489/the-countries-that-dominate-world-fossil-fuel-production) data and set it up in my [development environment](https://www.mindstick.com/interview/34043/setting-up-a-development-environment-in-knockout). I've found that in order to use a production data copy with migrations, it is necessary to copy the __MigrationHistory table from the old development [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) image to the production database copy.\
This [works fine](https://answers.mindstick.com/qa/115732/my-software-works-fine-on-windows-10-but-crashes-on-windows-11-why), except for one annoying detail: the _MigrationHistory table comes across as a user table instead of a system table. This is not a serious [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) as long as I remember to filter it out of my database diffs. But I would prefer to have the new __MigrationHistory table be a system table, just as it is in a database that was created by EF migrations.\
Is there a way I can create or copy a SQL [Server table](https://www.mindstick.com/forum/396/how-to-selecte-random-records-from-sql-server-table) so that it appears to be a system table?

## Replies

### Reply by Anonymous User

```
SELECT name = convert(char(30),o.name), rows, dpages,o.id, typeFROM sysindexes i JOIN sysobjects o ON o.id = i.idWHERE o.id < 100 and (indid = 0 or indid =1)
```

### Reply by Anonymous User

Use the following command change your table to system object. So it will then appear in System Objects.\
EXEC sys.sp_MS_marksystemobject _MigrationHistory


---

Original Source: https://www.mindstick.com/forum/12964/how-can-i-create-a-sql-server-system-table

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
