Install guide Management Studio add-inCommand line utilitiesDeveloper tipsScripting API samples
User Guide - SSMS add-in
Script a SQL Compact databaseScript a SQL Server databaseBrowse and Edit dataScript tables and indexesImport CSV dataRename a table
The addin only works with SQL Compact files on your desktop, not with SQL Compact files on a Mobile Device.To script the entire selected database file
with schema and data (or just schema), right click the database in Object Explorer:
The resulting script can be used to create a new database, either by running the script in SQL Server Management Studio against a new empty database (either SQL Compact or SQL Server, or by running the script using for example sqlcmd or sqlcecmd http://sqlcecmd.codeplex.comTo script a server database in SQL Compact format
, right click the database node in Object Explorer:
Select the server database to connect to, and select the file name for the script.
Notice that the SQL Server Export currently does not support identically named tables in different schemas.
The add-in adds 4 new menu items to the table menu in Object Explorer:To Show and Edit table data
, just click "Show Table Data", and you can edit the data in a basic DataGridView.
Use F3 to search in a column, right click Image columns to import, export or delete images, click a column title to sort on this column, and use the Reload button to refresh data in the grid.To script a table
, click "Script Table as", and as you can see, various scripts can be generated: CREATE, DROP, SELECT, INSERT, UPDATE, DELETE and INSERTs (data):
You can also script indexes in a similar way.To "import" data
(generate a script with INSERT statements), select Import Data from->CSV (only supported format):
Locate the .csv file, by pressing the ".." button. The .csv file must have field names in the first line, and all field names must match the selected table. You can also specify the field separator:
Press OK to import the file.Note
that IDENTITY columns are not required to be present in the CSV file, nor is any other field that allows NULL or has a default value.To rename a table
, click Rename:
Then enter the new table name and press OK (or Enter):