SQL Server Management Studio sits stuck, after scripting all objects in a database. Except it didn't script all objects in a database.
i scripted all the objects in an SQL Server 2008 database from SQL Server Management Studio (three times):
And it says it scripted all the objects, except it never actually completes - sitting there stuck:
It does manage to script three objects:
But not all the objects.
You'll notice:
- the UI says it sucessfully scripted all 189 objects
- the UI is stuck; the Close button is disabled
- the folder that contains the "successfully" scripted database objects doesn't contain all the successfully scripted database objects.
Which begs the question:
How do i script the objects of an SQL Server 2008 databasein SSMS?
Update: It can script any VIEW
, STORED PROCEDURE
, or FUNCTION
, without issue. But if i choose to script just the first table, it fails:
It also fails if i script tables:
A
-M
O
-Z
A
-G
This never-ending bug was the reason we bought SQL Compare four years ago; you couldn't trust Microsoft's tool to script a database correctly (silently omitting tables).
Update: Scripting options
Here's the set of scripting options in use
- ANSI Padding: True
- Append to File: False
- Continue scripting on Error: False
- Convert UDDTs to Base Types: False
- Generate Script for Dependent Objects: False
- Include Descriptive Headers: True
- Include If NOT EXISTS: False
- Include system constraint names: False
- Schema qualify object names.: True
- Script Bindings: False
- Script Collation: True
- Script Create: True
- Script Defaults: True
- Script Drop: False
- Script Extended Properties: True
- Script for Server Version: SQL Server 2008
- Script Logins: False
- Script Object-Level Permissions: False
- Script Statistics: Script statistics
- Script USE DATABASE: True
- Script Change Tracking: False
- Script Check Contraints: True
- Script Data: False
- Script Data Compression Options: False
- Script Foreign Keys: True
- Script Full-Text Indexes: True
- Script Indexes: True
- Script Primary Keys: True
- Script Triggers: True
- Script Unique Keys: True
- My related question from 4 years ago: SQL Server Management Studio not scripting all objects
0 Answers