0

My database name is Test and that database contain 1 Table. Table name is Test_Table

Here is my Test_Table:

id  data_id
0   Choose
1   Yes
2   No

What is the way of creating backup of database without data because i want only the structure of database Table.

I want that when i restore my database it only show me all Table without Data Like:

id  data_id

I am using SQL Server 2008.

4
  • Do not use tags that do not apply to your question Commented Jul 17, 2014 at 15:43
  • possible duplicate of Export database schema into SQL file Commented Jul 17, 2014 at 15:46
  • 1
    This question doesn't make sense!! Creating backup without data? You might need to create a script Commented Jul 17, 2014 at 15:49
  • Your question is a bit strange. If you want only the schema then create scripts to generate the schema. If you truly want a back then delete all the rows out of all your tables and create your backup. Commented Jul 17, 2014 at 16:08

2 Answers 2

1

In your Sql Server Management Studio:

  1. right click on the database in question.
  2. Choose Tasks
  3. Choose Generate Scripts...

Then just follow the steps in the wizard to choose which tables/sprocs/views/etc to generate scripts for.

Sign up to request clarification or add additional context in comments.

1 Comment

If you want to create scripts for the database creation itself, just right click on the database and choose "Script Database As..." and follow the prompts (I usually do "Drop and Create", and "To New Query Window") - then just save that file.
0

you're asking for a database backup without data (that is not possible) but maybe we're speaking about source controlling your database structures.

In our dev teams, we installed a third party software which source controls the database structures and also lookup/domain/static data. This is maybe the way you want to follow. If you're a Visual Studio user, you can use the database project template in order to store your schema under VSO or git source control manager.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.