How to Review queries written in SSIS Packages within Visual Studio? - sql-server

How do we improve the coding standards of SSIS packages?
Is there any code review tool within Visual Studio that helps to improves the standards of queries and tasks used in the SSIS package?
For Example, we have an execute SQL Task(naming convention not followed) and have written SQL complex query with poor coding standards.
In this scenario, is there any tool within Visual Studio that helps to give a review report and help to improve coding standards for SQL queries and naming conventions for Tasks?
We have tools like SQL Enlight, but it's available only within SSMS, We have SSIS code check-in VS, but it won't review codes within the tasks.
please let me know if there is a combined tool within VS to review
Thank you

You can check the Visual Studio for a code check extension such as SSIS Code Check
Also, it is good to create unit tests for the SSIS packages: How do I unit test and integration test my SSIS packages?

Related

How to migrate an existing table that has a column defined as XML schema to a new database with same definition

I have an existing database that has a table which has a column defined as XML schema. How do I migrate/re-create this in a different database. I need to know the sequence of steps.
I would create an SSIS package to take care of this for me. To learn more about SSIS, visit:
Video Tutorial illustrating how to copy one database to another.
This is a fairly common practice in the industry. There is alot of documentation on getting started using keywords like Visual Studio and SSIS. You'll need Visual Studio and the SQL Server Data Tools installed. Visual Studio offers a free community edition.

I need good tool for database unit testing

I've tried to test SQL Server database stored procedures (write tests like unit) using Visual Studio 2010 testing tool but it is very inconvenient.
Is there any another more convenient tool for testing database stored procedures?
Check out TSQLUnit for an open source, SQL Server unit testing app. And there are several more SQL Server-specific testing apps listed on this page.
We are using NUnit, and wrote our own library in C#. Works really well for us, and here are some articles where we have described the approach: Close these Loopholes - Reproduce Database Errors

SQL Server Version control using TFS 2010 which syncs directly with the Development Server

We are planning to put out SQL Objects (Tables, StoredProcedures, UDF's and Views) under our existing TFS 2010 versio control.
Is is possible that any check-in's made to the objects under TFS version control gets automatically sync'd to our Development server. The technical team here are not so interested in having to make changes at 2 different places (Development Server + Check-in at TFS server). Its an overhead process change for them.
Late answer, but I hope it can be useful:
Recently, I've tried to find the solution for a similar problem, and I've bumped into a sql source control add-in for SSMS that works with the TFS, and I found some answers by reading this article:
SQL source control reduce database development time
I think it can be useful for you too (in case you couldn't solve your problem)
Hope I helped.
The best solution by far to do this is to use Red-Gate Source-Control. You will not find a better and easier product to do this, and all the other benefits you get from using it is huge. For example, it integrates 100% into SQL Management Studio.
You should use Visual Studio Database Projects. You'll get the best of both worlds! Source control and automated builds and deployment.
I found the solution to my unique scenario. I used the Sql server management studio project by using the TFS plugin for SSMS. Team can now easily make changes in the Development environment using SSMS and make check-ins at the same place. Nice and easy way to do things without additional overheads. However, this only solves the purpose of version control. I am still researching on how can we do schema compare and automated deployments using SSMS projects.

Tools to generate SQL DDL and Content from an existing database

Does anyone know of a reasonably priced tool that will create DDL statements to create a SQL Server database and appropriate Insert statements to recreate the data? I use the Red Gate tools to do database compares (including content compares) and this comes close (I could always compare with an empty schema) but I was wondering if there was a tool that others found useful that did this in one step.
Late answer... hopefully someone will find it useful…
There is a tool from Red Gate called SQL Multi Script that can do scripting for what you need. Not sure if it existed when the question was asked though :)
Another good piece is SQL build tool from ApexSQL which can also do all kind of insert and other scripts…
Disclaimer: I’m not affiliated with any of the companies mentioned above.
Have you had a look at SQL Publishing Wizard? It will create all the DDL statements you require for all database elements (tables, views, SPs, users etc).
If you're using SQL 2008, it comes built into the management studio. More info on 2008.
SQL Publishing Wizard
Saw Austin Solonen post this tool in a somewhat related thread. Express editions appearantly don't hove Import and Export.
The database publishing wizard that is included in Visual Studio 2008 performs this function.
It is also available via CodePlex as an add-on for prior versions of Visual Studio.

Stored Procedure Versioning

How do you manage revisions of stored procedures?
We have a BI solution on SQL Server 2005 with hundreds of stored procedures.
What would be a good way to get these into Subversion? What are your recommended tools to script stored procedures to files?
There are doubtless a bunch of off-the-shelf products you could buy (I think a few RedGate tools might come in handy here), as well as Visual Studio Team Suite - Database Edition.
In light of purchasing something, why not consider using SQL Management Objects (SMO)?
I've written a couple of utilities which generate T-SQL scripts (using the Scripter class) which produces the same scripts you get from generating scripts through the SQL Server Management Studio (it uses the same functionality).
You could integrate such a utility into a build script/build process which would allow you to generate scripts and then version & check them into a source repository. Plus, you can batch the scripts into a single file (if desired) which beats maintaining hundreds of individual files.
I wrote a blog entry about this approach a while back.
Check out more on the SMO class Scripter
Here's a few more entries which might be useful:
http://www.sqlteam.com/article/scripting-database-objects-using-smo-updated
http://sqlblog.com/blogs/ben_miller/archive/2007/10/03/table-scripting-with-smo-part-1.aspx
See here and here for a start.
Please check out here What is the best way to version control my SQL server stored procedures?. Might help you identify couple of solutions to this issue.
I have previously used a Visual Studio Database Project to manage create table scripts, stored procedure scripts etc. I'm fairly sure you could then use subversion to manage these files in the same way as any Visual Studio project.
I used the built in functionality for scripting the procs, but i'm sure Redgate would have some tasty tools for that.

Resources