Scripting with extension as .sql in sql server 2005

  • Hi,

    I wanted to know is it possible to script the tables, views and UDF with extension as .sql using Generate script wizard in sql server 2005? When I tried this way, it generated tables a dbo.table1.table, dbo.table2.table...dbo.udf1.userdefinedfunction....

    I just want like dbo.table1.sql..Is it possible ?

    Thank you,

    Veena

  • When you get to the output option step you can choose script to file and then choose "File per object" button. This should get you what you are looking for.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • or choose script to new query window then close it and save as .sql script

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • The scripting functionality was much improved in SP2 (almost as good as it was in 2000 EM :hehe: ), so make sure you have SP2 installed on your SSMS installation.

  • Hi,

    Thanks for your responses.

    I do have sp2 on sql server 2005. But in sql server 2005, it has tables, views with .sql extension. Also, on my machine I unchecked, folder option: hide extension for know file type.

    Now have I have my scripts with table1.table.sql etc..

    Thank you,

    -V

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply