Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Management Studio: Backup and restore database without data

Tags:

sql-server

Is there a way to backup and restore a database without the data. I just want the tables, scheme, stored procedures, etc. without the data.

  1. How to backup the database?
  2. How to restore it in SSMS?
like image 714
Peter Sun Avatar asked Jan 22 '26 14:01

Peter Sun


1 Answers

If I'm not mistaken you can do this:

  1. Right click the database
  2. Select Script Database As
  3. Select Create to
  4. Select file

This gives you a script that you can run on a different server to set up the db.

Update:

You probably need to follow the steps here

like image 96
Dennis Jaheruddin Avatar answered Jan 25 '26 19:01

Dennis Jaheruddin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!