Share via

GitHub Integeration with SQL Server.

Anonymous
2023-02-22T10:26:41+00:00

Hello,

I am trying to Find some steps on How we can Integerate the Github with SQL.

We have SQL Scripts in the DataBase, Once we make any changes it should also make changes in the Same Scripts Available in GitHub.

Please Suggest....

Microsoft 365 and Office | Install, redeem, activate | Other | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

11 answers

Sort by: Most helpful
  1. Anonymous
    2023-02-23T13:46:32+00:00

    Ok Thank You.

    If you see this Article

    Getting started with source control for SQL Server (mssqltips.com)

    SSMS has a plugin feature if we install it we can able to add the Source control Do you have any idea about it how we can do it ?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-02-23T12:38:29+00:00

    Ok.

    Do You Share anything related to Database as Code in regards to GitHub with SQL?

    Any Tools that Microsoft Suggest to Use ?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-02-22T13:24:34+00:00

    OK.

    Do we have option of adding a Plugin Feature in SQL Server ?

    Like Adding a GitHub Plugin in SQL Server and I can able to do the Commit and push in the SQL, without doing it from SQL Scripts Located.

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2023-02-22T11:42:14+00:00

    Hi Anna,

    As of now, I have created a Repo in GitHub and the scripts available in SQL Server are Available in That Repo.

    So Now I want to make changes in the Script available in SQL Server and it should reflect Automatically in the Script Present in GitHub.

    But we need to to Do git init, git add . etc eachtime right ?

    Or if you share me a detailed steps that helps.

    What if 10 users are making the changes in the SQL Scripts and how will it reflect in GitHub.

    0 comments No comments
  5. Anonymous
    2023-02-22T11:01:22+00:00

    Hi Prashandh

    I'm AnnaThomas and I'd be happy to help you with your question. In this Forum, we are Microsoft consumers just like yourself.

    To integrate Github with SQL Server and have changes made in SQL Scripts automatically update in Github, you can follow the steps below:

    Set up a repository on Github and clone it to your local machine where the SQL Server is installed.

    Install Git on the machine where SQL Server is installed. You can download Git from the official website.

    Open the SQL Server Management Studio and navigate to the SQL Scripts you want to integrate with Github.

    Initialize a local Git repository in the directory containing your SQL Scripts by running the command git init in the command prompt or Git Bash.

    Add the SQL Scripts to the Git repository by running the command git add . in the command prompt or Git Bash.

    Commit the changes by running the command git commit -m "initial commit".

    Link the local Git repository to the Github repository by running the command git remote add origin <Github repository URL>.

    Push the changes to the Github repository by running the command git push -u origin main.

    After performing the above steps, any changes made to the SQL Scripts on the SQL Server will be automatically reflected in the Github repository when you push those changes.

    By following these steps, you can integrate Github with SQL Server and have your SQL Scripts versioned and available on Github.

    I hope this helps ;-), let me know if this is contrary to what you need, I would still be helpful to answer more of your questions.

    Best Regards,

    AnnaThomas

    Give back to the community. Help the next person with this problem by indicating whether this answer solved your problem. Click Yes or No at the bottom.

    0 comments No comments