• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 57
  • Last Modified:

MS SQL separate Sql Files for distribution purpose

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
Omer-Pitou
Asked:
Omer-Pitou
  • 3
  • 2
1 Solution
 
SimonCommented:
Do you mean the Generate Scripts option, which you can access by right-clicking on the database node.
0
 
Omer-PitouAuthor Commented:
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
SimonCommented:
>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
 
Omer-PitouAuthor Commented:
This is already a good news. Let me test it
0
 
Omer-PitouAuthor Commented:
Thanks Simon. This is exactly what I am looking for. I can have the 3 different sql files.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now