Solved

How do I convert a full MSSQL database into script without any data?

Posted on 2011-02-25
3
859 Views
Last Modified: 2012-05-11
I have a fully working database and I kind of need to make a script to re-create the tables and procedure, without containing any data in the tables.

Possible?
0
Comment
Question by:John86a
  • 2
3 Comments
 
LVL 32

Accepted Solution

by:
ewangoya earned 500 total points
Comment Utility
in SSMS

Right click on the database you want to script
Telect Tasks
Select Generate Scripts

You will get a wizard which will guide you through the scripts
Just select the objects you want to script then save the results
0
 

Author Comment

by:John86a
Comment Utility
Basically it worked and it didn't.
Worked with another database, but didn't with this one. Said this message:
Microsoft.SqlServer.Management.Smo.PropertyCannotBeRetrievedException: Property TextHeader is not available for StoredProcedure '[dbo].[ProductsnText]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. The text is encrypted. at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Open in new window

0
 

Author Closing Comment

by:John86a
Comment Utility
Kind of works, but on the one database I really needed, it didn't work.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now