?
Solved

MS SQL separate Sql Files for distribution purpose

Posted on 2015-02-08
6
Medium Priority
?
54 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

765 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