import database objects into TFS [Resolved]

Posted by Mrashmi586 under Sql Server on 12/27/2015 | Points: 10 | Views : 369 | Status : [Member] | Replies : 6
Hi

How to import database objects (Tables,Sp's,views,indexes) to source control like (TFS,Subversion,and etcc..)
Can any one help me on this ,Thanks in advance.

Thanks&Regards,
-Rashmi




Responses

Posted by: Rajnilari2015 on: 12/27/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
@Mrashmi586, in a very similar way as how we do for other objects.

We can create the DB objects from the Generate and Publish Script wizard (Right click on the DB (say TestDB) -> Tasks ->Generate Script..).

From the "Choose Objects" screen, choose the Type of database objects as per your need. In the very next screen which is "Set Scripting Options" , Click Advanced Button. The last of the General Section will be "Types of Data To Script" which will be set to Schema Only (default) . If we wish to get the Schema and data, choose the option "Schema and Data". The rest is simple steps in the wizard.

Once done, take the script file and load into TFS/Subversion.

The other alternative is to create a backup(.bak) of the db and then we can import but the .bak file size will be too huge.

Hope this helps. Let us know in case of any concern.

--
Thanks & Regards,
RNA Team

Mrashmi586, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mrashmi586 on: 12/28/2015 [Member] Starter | Points: 25

Up
0
Down
Hi Thanks for your reply.
I am unable to follow your steps and i am using SQL 2012,i didn't get options what you are explained.
If possible please can you attach screen shots,so that it will easy for me.

Regards,
-Rashmi


Mrashmi586, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 12/28/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
@Mrashmi586, I have already posted that as an article and is waiting for the approval. Meanwhile you can follow the step in the document attached herewith. And the steps works from SQL Server 2005+

Thanks
 Download source file

--
Thanks & Regards,
RNA Team

Mrashmi586, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raja on: 12/28/2015 [Member] Starter | Points: 25

Up
0
Down
I read this article on TechFunda http://techfunda.com/howto/28/generate-sql-script-of-whole-database that will help you to generate Scripts using Generate Scripts wizard of SQL Server Management studio.

Once the scripts is generated, upload it to TFS, Subversion etc.

Apart form this there is a paid version of third party software that is called SQLSafe or SQL Source safe (not remember exactly) that will help you to backup SQL Server objects into source safe.

Thanks

Regards,
Raja, USA

Mrashmi586, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mrashmi586 on: 12/28/2015 [Member] Starter | Points: 25

Up
0
Down
Thanks for the reply,
i generated the script and upload into SVN,i am planning to attend SQL BI(SSIS,SSRS,SSAS) Interiews,so let me know what type questions they will ask for the 5 Yrs experience, along with that provide if you have any real time scenarios related to Medical Insurance,please can any one help me.

Thanks in advance.
Regards,
-Rashmi


Mrashmi586, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 12/28/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
@Mrashmi586, glad that the answers provided here has helped you.


Thanks

--
Thanks & Regards,
RNA Team

Mrashmi586, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response