TortoiseSVN imports add-ins for SQL Server 2008

I installed TortoiseSVN on my computer and on my SQL server, I have several databases for which I have no solutions. Instead, all my stored procedures, views, etc. stored on the local domain server. Now I want to import all my stored procedures, views and functions into my SVN repository .

To import, I copy every SP, view, etc. to a local folder, and then import them into my SVN repository. Since this was a big process, I started looking for the TortoiseSVN plugin for SQL Server 2008. I found two reliable sources ( SVN Agent or RedGate ), but they are not free.

I tried to add the TortoiseSVN command for external SSMS tools as described here: SVN add-in for SSMS

For example, to import an SQL solution into the SVN repository, I should use:

Title: SVN Import Command: C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe Arguments: /Command:import /path:"$(SolutionDir)" Initial directory: $(SolutionDir) 

It works fine if I have an SSMS solution. But, as I said, I have no solution. I just like that:

 -Object Explorer (Domain server) --Databases (Folder) --- My Database (sub folder) ----Tables (sub sub folder) ----Views (sub sub folder) ----Programmability (sub sub folder) ----- Stored Procedures (sub sub sub folder) etc. 

Question: Is there a way that I can simply select my stored procedures and then SVN Import to import all these stored procedures into my SVN repository? For example, suppose I want to import all my stored procedures, then I click on the Saved procedures folder and in the Tools panel, I select Import SVN , which should copy all stored procedures in this folder to my SVN repository.

+4
source share
1 answer

I found this post that might help: SMO? The script of all SQL stored procedures with if exists, then create and not sp_executesql

The answer refers to a powershell script that does most of what you need, which you can configure as a β€œtool” in SSMS. However, since it is not possible to transfer the server and the database in the form of variables, you will have to hard code them or query them in your code.

+1
source

Source: https://habr.com/ru/post/1498255/


All Articles