Home > Query, SQL > SQL SERVER – BISQL #2 : How To Create Solution? Why and What is its Use!!

SQL SERVER – BISQL #2 : How To Create Solution? Why and What is its Use!!

Hi Friends,

  1. It’s very basics thing in SQL
  2. But nobody make use of it except smart DBA’s and Few BI Experts.
  3. We can make solution in SQL Server and reuse any version

Question in my mind is why I should create solution in SQL server? What is its use and purpose for small and large, long development?

  • Any web or DB Solution is easy to develop and maintain.
  • You can think this SQL solution as your home of all your required queries
  • You will not have to save your queries in other files like text
  • Development is gone really fast
  •  Analysis will be crystal clear if you have all required queries with you e.g.: for optimization, indexing queries.
  • You can start dumping all of your queries and can analyze them as well

So how to start with!!! How to develop it?

It’s as easy as you create new word document and save it!!

Follow the steps :

Step 1.Click on start

Step 2.Select SQL Server Management Studio


Step 3. Get login to your sweet Server


Step 4.Select New Project or for smarty’s Ctr+Shif+N


Step 5. Fill out Very first Details of your Solution as shown


Step 6.That’s it solution is ready for you and for ready to use,now Select Solution Explore


it will show you following details


Now how I am going to use this!!!

So let’s go back to our yesterdays post, in which you have just seen/read query n not done actual experiment/practical on them.

So I am going to select only last query which I liked most from my post i.e

:–Find Tables With Foreign Key Constraint in Database

SELECT f.name AS ForeignKey,

OBJECT_NAME(f.parent_object_id) AS TableName,


fc.parent_column_id) AS ColumnName,

OBJECT_NAME (f.referenced_object_id) AS ReferenceTableName,


fc.referenced_column_id) AS ReferenceColumnName

FROM sys.foreign_keys AS f

INNER JOIN sys.foreign_key_columns AS fc

ON f.OBJECT_ID = fc.constraint_object_id

So I execute this and I think I can use this in future or I can use this whenever someone ask me about question about primary key analysis in given DB.

So I am going to save this in my solution which I have created just now.

Step 7. Right Click on Query folder and then click on new query


Press F2 to rename the Query don’t change extension J and double click on the same


And paste my query into that plan


Don’t forget to click on save Ctr+S. Which going to save this query on your solution and now you can ready to use this for any database just need to change Database from dropdown instead on master data.

Now go on creating and dumping your own queries in similar way in your solution whatever you feel is good, very useful, always in use type of query!!

Developer with good set of queries will be always ahead in the any development phase is key point for this article.

So take one step ahead develop only one solution and maintain, use, share this solution thorough your life.

Hope this helps !!!


For more interesting information on SQL we can also look into similar topics such as

· BISQL # 3 :Time and Date Query code and Analysis Part -I

· BISQL # 4 :Identifying and Search of Relationship’s

· BISQL # 5 :Analyzing the Size of Database and Size of table

· BISQL # 6 :Identifying Running Query and Last Modified Query

· BISQL # 7 :ALL in One Database Hero Script !! Set–I

Hope you will like this post on Creating Solution & its use.

If you really like reading my blog and understood at least few thing then please don’t forget to subscribe my blog.

If you want daily link and analysis or interesting link go to following website which will give @ your inbox please subscribe our following link resource blog: Link Resource Website

              For More information related to BI World visit my Mentalist Blog

                             Link Resource Blog >> Daily Interesting links

                            SQL Server Mentalist >> SQL Learning Blog

                            Business Intelligence Mentalist >> BI World

                                          Connect With me on

            | FaceBook |Twitter | linkedIn| Google+ | WordPress | RSS |

                                       Copyright © 2011 – 2012 Vishal Pawar

  1. Prashant Pawar
    May 31, 2011 at 3:27 pm

    That was very helpful….

    thnx Vishal

  2. Shahed
    January 12, 2012 at 6:49 pm

    ya…surely very helpful….

  1. June 30, 2011 at 10:15 pm
  2. July 31, 2011 at 9:31 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: