Creation of SQL Source Control Structure

How to create a file and folder structure comprising of Data Scripts, stored procedures and and Tables etc from an Existing Database in SQL Server? Something similar to the Import Database functionality in Visual Studio to create a SQL Database project.
Tagged:

Answers

  • The best way to create a folder structure with all the schema of your database is to use SQL Compare. Use the database as source and script folder as target. However, the folder structure will only contains the schema of the database.

    If you use SQL Source Control you can link your database to a working folder and commit into it. If you want to include some static data, you can have a look at the static data feature in SQL Source Control https://documentation.red-gate.com/display/SOC4/Static+data

    If you want an entire copy of your database data, it's best to use a binary formats and a product like SQL Backup or SQL Clone. SQL Source Control has not being designed to handle large static data tables.
    Andrea Angella
    Lead Software Engineer | Red Gate
    Website: www.productivecsharp.com
    Twitter: @angella_andrea
Sign In or Register to comment.