b.paul
Thanks Arnie,
The database publishing wizard doesn't help. It seems to be a scaled down version script wizard in sql 2005 mgmt studio.
This is really frustrating. Table and object scripting in SQL 2005 appears to be broken...or for some reason MS has decided to remove functionality that was available in SQL 2000 Enterprise Mngr script wizard. I've also checked out the SQL Integration Services and it also doesn't do what i need. In fact the "transfer sql server object" task is really messed up because it doesn't take into dependencies and I keep getting errors. VERY UNUSABLE!
Does anybody know if there is a way to generate PRIMARY key, FOREIGN Key, DEFAULTS, CHECK constraints, TRIGGERS and INDEXES in a separate script from the "CREATE TABLE" script in SQL Management Studio I'm even willing to consider 3rd party tools. Below is a simple example showing how i need to generate PRIMARY KEYS:
Instead of this (generated in SQL 2005 Mgmt Studio):
Code Snippet
CREATE
TABLE [dbo].[tblAppointments](
Field 1 ....
Field 2 ....
Field 3 ....
CONSTRAINT [PK_tblCalendarAppointments] PRIMARY KEY CLUSTERED
(
[SiteID]
ASC,
[ItemID]
ASC
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
)
ON [PRIMARY]
I need this (from SQL 2000 Enterprise Mngr):
Code Snippet
ALTER TABLE [dbo].[tblAppointments] WITH NOCHECK ADD
CONSTRAINT [PK_tblCalendarAppointments] PRIMARY KEY CLUSTERED
(
[SiteID],
[ItemID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
GO
Instead of being included in the CREATE TABLE statement, I need it generated on it's own using the ALTER TABLE statement.
PLEASE HELP!