RIAS
asked on
Integrate GIT with SQL Server Stored Procedures and Views.
Hello Experts,
Is there anyway I can integrate git ( local repository ) with Stored Procedures and Views.
Thanks
Is there anyway I can integrate git ( local repository ) with Stored Procedures and Views.
Thanks
ASKER
Thanks Chinmay,
But, how you get the version history?
But, how you get the version history?
Basically you have to maintain them yourself. For example, Dev1 made a change to the SP, S/he must check it in. Next time Dev2 made a change then the changes must be checked in, similar to any file that you put in GIT, version history will be maintained by GIT just like any other file.
ASKER
The requirement Chinmay , is to get all SP's and views in the GIT.
ASKER
Ahh , perfect!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
But, for that I need to get all SP from SSMS to a folder isn't it?
ASKER
Thanks Chinmay, our comments were having a bit of lag in posting.
ASKER
Just out of curiosity, is there a way to connect SSMS to git local repository) ?
But, for that I need to get all SP from SSMS to a folder isn't it?Yes. SSMS can do that for you easily. You may use SSDT from within Visual Studio as well.
ASKER
You may use SSDT from within Visual Studio as well. :
Exactly, that's exactly I was trying to do now.
Exactly, that's exactly I was trying to do now.
ASKER
No but you have SSDT which is inside VS. You don't really needs SSMS... Please have a look in Visual Studio after installing SSDT (I will be surprised if it is not installed already):
View -> SQL Server Object Explorer -> SQL Server -> TargetDB -> Tables -> Right Click -> Script As..
Similarly you can use
Programmability -> Stored Procedures for SP
Views -> for View
View -> SQL Server Object Explorer -> SQL Server -> TargetDB -> Tables -> Right Click -> Script As..
Similarly you can use
Programmability -> Stored Procedures for SP
Views -> for View
ASKER
Ok, just checking that. Thanks a ton.
ASKER
Chinmay, The picture is of SSDT:
ASKER
Refer to my earlier comment:
View -> SQL Server Object Explorer -> SQL Server -> TargetDB -> Tables -> Right Click -> Script As..
ASKER
TargetDB -> Tables -> Right Click -> Script As.
No not that option, I need to add the SQL server tools in VS 2019. Thanks a ton. Will not disturb you.
No not that option, I need to add the SQL server tools in VS 2019. Thanks a ton. Will not disturb you.
ASKER
All sorted Chinmay, thanks!
SSDT is already installed. Good to hear that everything is sorted.
ASKER
it was not installed, had to modify the setup and check that option in other tools. Thanks
ASKER
Interesting. I thought if you have SQL Server Object Explorer you should have everything. Thanks for this one. I shall keep it in mind.
We just make a folder named SQL Script or DB Scripts and whenever we change an SP or a View we copy over definition. This cannot get any simpler than that.