SQL Server 2012 copy database without data -


We have a SQL Server 2012 database that contains test data, which we used to develop a website. We will soon need to clear the database and import the actual data, but we have changed the database design many times during web design, so we can not use the blank copy created at the beginning!

Is there no data in the database, but with everything (including ideas, SP works, security objects, etc.), and there is no way to reset all indexes to design bead values? In other words, we want to keep the database properly, but delete all data, reset all table indexes to their original design seed values, and then import data.

Any help received by gratitude

  1. Correct your server Click on your server, and click Task & gt; Generate scripts .
  2. On the introduction stage, click Next.
  3. Select object, you can either select the entire database (including the function, and etc.) or specify objects that you want to generate
  4. Your file name and destination Then click on next
  5. Review and
  6. You will see a .sql file generated in your specified folder. You can open that file in other servers and execute the hit, then it will create an accurate database.


Comments