In this article, we will explain how to script database via SQL Server Management Studio (SSMS).
1. Open SSMS and connect to your SQL Server instance.
2. Right-click the target database and select Tasks > Generate Scripts...
3. Click Next.
4. Select Script entire database and all database objects and then Next.
5. Enter a File name and Path, then click Advanced.
6. Change the Types of data to script to Schema and data, and click OK.
7. Click Next.
8. Click Finish.
9. Open the script.sql file, which will have the database information scripted out.