[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

MS SQL separate Sql Files for distribution purpose

Posted on 2015-02-08
6
Medium Priority
?
55 Views
Last Modified: 2015-02-09
Hi,
How can I have for distribution purpose (at my client place):
1. Separate SQL file with all my tables (Table Definition and Potential Data)
2. Separate SQL file with key tables (Table Definition and Potential Data)
3. Separate SQL file with my stored procedures/functions

The idea is to be able to run them at the client place, depending if it a new installation or an update.
I was able to do that with MySQL workbench with export options.
I wonder how this can be done in MS SQL.

Best regards.
0
Comment
Question by:Omer-Pitou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40597796
Do you mean the Generate Scripts option, which you can access by right-clicking on the database node.
0
 

Author Comment

by:Omer-Pitou
ID: 40597818
Does the generated script contain both table definition and potential data?
In one word, how can I deploy or distribute my database along with my application.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40597855
I would consider to have the "my tables" and "my procedure" all in the same dedicated schema, and the key tables with another schema.
that way, you can easily filter in the sql generation process what you want to include in each of the file(s) to be generated;
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Accepted Solution

by:
Simon earned 2000 total points
ID: 40597889
>Does the generated script contain both table definition and potential data?

By default it includes definitions only, but you can tick an option to include data as well. It's under the 'Advanced' button at the "Set Scripting Option" step of the prcoess. Change 'Types of data to script' from 'Schema only' to 'Schema and data'.
0
 

Author Comment

by:Omer-Pitou
ID: 40598397
This is already a good news. Let me test it
0
 

Author Comment

by:Omer-Pitou
ID: 40598936
Thanks Simon. This is exactly what I am looking for. I can have the 3 different sql files.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to get certified? Check out some courses that help you prepare for third-party exams.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

650 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