Showing posts with label quotcreate. Show all posts
Showing posts with label quotcreate. Show all posts

Friday, March 30, 2012

Scripting "Create to File" for multiple objects

What would be the best way to create a routine that performs the "Script <object> as Create To File" for multiple objects in my database?

I would like a separate file for each object (table, view, or stored procedure).

Could someone point me in the right direction?

Thanks,

Paul
Seperate File - Use SMO programming using .NET and create it.

Wednesday, March 21, 2012

Script Table with secondary indexes

I used the option "Script Table" --> "Create to" in SQL Server Management Studio Express for a table with secondary index (like IX_IndexName), but in the .sql script file there is only the instruction for the primary key and not for the secondary (I expected something like CREATE INDEX). What can I do?

Hi,

its not within the context menu, you have to do it via the script wizard which can be found by right clicking on the database and choosing to script the database objects. In the next steps you can switch a boolean to create also the indexes within the table.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

It work fine, very thanks