April 25, 2008 at 1:27 am
Hello,
I am new to databases and I have a question.
I have MSSQL SERVER file, but I only want the table structure out of it. I dont need the data.
Is there any tool available to extract only the table structure of the file??
Please help.
Thanks.
April 25, 2008 at 3:00 am
I am thinking that you are talking about a .mdf file or .bak file. If you have a .mdf file do sp_attach_single_file_db and bring the database online. And then script the table structures out of the database. If you have .bak file then you would bring up the database online by restoring the database using restore command.
Either ways, you have to bring up the database with above commands and script the tables (or any other objects). AFAIK, there is no such tool to script db objects alone from given .mdf or .bak file.
I am sensing that you have space constraints to bring up the database, and that is why you are looking for tools to script directly. I am afraid to say that it is not possible.
Viking
April 25, 2008 at 5:43 am
hi,
please understand MS SQL are capable software for DBA related activities.
1) if you want table structure from query anlayser:
syntax :
sp_helpdb 'table_name'
2) if you want table structure from enterprise manager:
-> right click on table name
-> click on generate script
-> select other obects or indexes or other constraints.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply