Is there anyway that I can generate the create table(s) script off the tables on sql azure. I accidently delete my scripts and now need to create them over if I cannot generate scripts for these tables. Thanks for your help.
Moved byedhickeyFriday, July 30, 2010 11:14 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
Right click table in Object explorer with your SQL Azure database open
Choose Script Table as from the drop-down menu.
You have three options,
Choose Create To |File or Clipboard or New Query window mysorian
Thank you for the quick replied. I'm not follow on how you would do that. I am assuming you are talking about generate this scripts off SQL SMS. I cannot connect to the SQL Azure database through Object exporer but only through new query
and then run script against the Azure database. I installed sql sms and sms r2 on my PC and still could not connect using object exporer. If you have a different version or other tool please let me know. Any tips and/or example will
be most appreciated.
Please install and use SQL Server 2008 R2, in which has a useful feature to generate and publish the script that helps to transfer the database schema between SQL Server and SQL Azure. for the details, please refer to the following links:
Thank you jayaram for getting to me. I i followed your instruction, and get "Error connecting to ' sql azure server name' a exception occurred while executing a transact-sql statement or batch. invalid object name 'sys.configurations'
The script generation for SQL Azure only works in
SQL Server Management Studio 2008 R2. And it works. However tou have to choose "Generate Scripts..." (right clickong on the Database, not the table) but not "Script table as" (by right clicking on the table). It will open a dialog to let
you choose database objects you want to script. On the next screen you must chose the "Script for Database engine type" -> "SQL Azure" !
Another (better in my opinion) option is to use
SQL Azure Migration Wizard. It will script full database for you. This is a "must-have" tool for any SQL Azure developer :)