I need to recreate the table structure of a SQL server database, but I only have SELECT
-access through a textbox in some esoteric software running on a locked-down VM somewhere far away. Through this textbox I can query pretty much anything, but I don't have something like a connection string or command line.
What would be the easiest way to recreate the table structure on a local database?
My guess would be to use system catalog views like sys.all_objects and sys.all_columns, but I don't see an easy way to convert this data to CREATE TABLE
-statements. Is there a straightforward way to accomplish this, or am I condemned to writing an error-prone 'conversion script' myself?