How to determine whether particular port is open or not with IPAddress?

Dear All,

Sometime you face problem that whether a particular port is open or not for an IPaddress. The reason  may be firewall so first disable firewall.

So to determine this do particular steps.

Step 1:-

Click on start button of windows.

Step 2:-

Click on Run

Step 3:-

Type cmd  and press enter

Step 4:- you will get command prompt screen  type Telnet in command prompt screen

You will get   Telnet Prompt.

Step 5: type OPEN  IPAddress  port 

Step 6:- press enter  if new blank window is Opened  then port is open for IPAddress otherwise it not.

 Hope this will help you.




Hello Friends,

I hope you have lovely weekend.

Today I am going to continue our second part of mirroring which is part II. In this part we are going to implement mirroring step by step. just few steps and mirroring will work  for us.

Step 1:- Just right click on primary server’s database on which we have to setup mirroring.

  Once you right click you get following option just click on Mirroring option as shown in figure.

Just click on “Configure Security option”

 Step 2:- Once you click the mirroring option you will get following option screen.

If you want witness server then check witness server yes option otherwise continue with no option

I don’t require that so I selected “no” option.

 Step 3:-

 Once you click next then you will get following screen related primary server.

You just need to click next.


Step 4:- In the next step you will ask for mirror server so just connect with the mirror server.

**** The point which needs to remember that on mirror server database   the database should be restored with “No recovery option” with same name.

 wintness server

Step 5:- You will get Service account screen as shown below once you clear the step 4.

Now here if you have any special credential for services then give that credential otherwise leave it blank in my case I keep it blank.


Step 6:- Once you pass with screen 5 you get following screen. If everything successful then you will get success status as shown in below fig.


Step 7:- when you click finish then you will get mirroring option as shown in fig.

Just click on start mirroring option then mirroring start if everything is right.

 sqlserver mirroring

I am 80% sure that mirroring will work with this step  but 20% not just because sometimes  few errors comes like authentication, Server URL & Port etc so In coming chapters I will explain  the errors which will you face in implementing  mirroring.

 Till than enjoy mirroring.

 Thanks 🙂

Rajat Jaiswal

Step by Step SQL Server Mirroring a way of Disaster Recovery Part -1

After reading few articles and self analysis I think SQL server mirroring can be understand by my style. So I note down all the queries which are in my mind and try to find out answer for them. Other than that
I have implemented step by step creation of mirroring. Hope it will work for other programmers, DBA also for understanding.
What is SQL Server Mirroring?
 SQL Server Mirroring is latest feature supported in SQL Server 2005 for disaster management. It assures data availability if principal server fails.  In the mirroring database transaction log transfer from one server to another server automatically. And within few minutes other stand by server is ready if main server get down or some fault occurred.
What is initial requirement for SQL Server Mirroring?
For SQL server mirroring we should have SQL SERVER 2005 with Sp1 onward.
What are the advantages of SQL Server Mirroring?

• It provides high availability of database.
• Comparatively easy to implement.
• No Extra hardware required to implement.
What are the drawbacks of SQL Server Mirroring?
Its individual choice whether they take it as a drawback or extra feature or requirement. According to me below is main point which I don’t like.
• It slowdown your main database server.
• In some case we cannot use mirror database directly because it treated as read only database or we can say Snapshot.

What are the main terminologies used with SQL Server Mirroring?
Below are main terminologies which I think used in mirroring:-
Principal Server: – The principal server is the server which is mainly responsible to give response to end user. The end user is connected with this server first. The Primary database exists on this server.
Mirror Server: – The mirror server contains the copy of main database. The copy of main database is called mirror database and the server is called mirror server.  In other words we can its stand by server which is updated by principal server by providing transaction log. Ideally it is not connected with end user.
Witness server: – The Witness server is an optional server. Witness server different from Principal server & Mirror server. It provides mechanism for automatic failover. In other words we can say that when primary server fail then end user connected to witness server instead of mirror which help out end user for database failover situation.
End points: – By the name it clear that it contain address and port number for connection between principal
Quorum – Quorum is the minimum relationship among the entire connected server.

What are the different modes of mirroring?
Basically mirroring work with 2 modes which are synchronous & Asynchronous.
1) Synchronous Mode: – This is high safety mode. In this every transaction which is committed on principal server will also need to be committed on mirror server on same time.  It acknowledges end user only when transaction is committed on both servers. It can be achieve with  2 options 
a) High safety with automatic failure-
By then name it is clear that if something going wrong means failure happened then we have to manually take care of end user connectivity.
b)   High safety without automatic failure:-
With help of this feature we don’t have to do much effort at the time of failure automatically end user pointed to another server.

2) Asynchronous Mode: – This is high availability mode. In this principle server send transaction log but he don’t wait for acknowledge response. Means principle server committed transaction without waiting for response of mirror database. It does not provide automatic failover to the end user.
In Next part we will take a look for  step by step implementation.

 Thanks  &  Enjoy Mirroring 🙂 


How to determine Which Index will be helpful in SQL server Database table?

Hello Friends,
Today I have to do some performance tuning work for a store procedure on a database which has millions on records.
So I just tried basic first with like dbo uses, proper joins, avoiding of inline queries. But could not get a huge success.
Then I tried for index. But the thing which is in mind that which index should be appropriate for my table which has millions of records.
I am in dilemma which index should be appropriate I just wondering the utility which give some sort of guidance because as we know Indexing is very critical thing in both the way if we increase the index insert & delete, update will be slow.
And size of database is also increase so it should be very effective.
So in searching I find a useful thing which Dynamic View Management (DVM) Which is helpful in finding proper index.
I find “sys.dm_db_missing_index_details
Which provide you information of missing index. It give basically return following columns when you run it.
Index_handle, database_Id, object_Id, Equality Columns, Inequality Columns, included columns and statements.

Now we have to mainly concentrate on Equality columns, Inequality Columns, and included columns these 3 columns has their own indication
1)Equality columns:-
It mainly have the actual database table column name(s) on which we can create new index. Most of the time this column is where clause , join etc. as shown in fig
2)Inequality Columns:-
This are the columns which we have to avoid for index most of the time this column is null but if have value then we have to check it out and exclude from index.(As shown in fig)
3)Included columns:- This column can be included in creating new index if required (as shown in fig)

So from above fig if I need to figure out some conclusion than I can say I will create a index on tblSample table on the basis of equality columns which is productBatchId and more over I can include other columns like serializationId, client id also if required.

So in this way DVM command help in guiding Index.

I hope you will also take advantage of this.

Enjoy SQL
Enjoy Indexing.


How to determine Size & rows in database tables ?

Dear All,
Today I got task to determine the table size which table taking how much space on disk.
So I have write the following script to determine that I hope It will help you out somewhere.
Just checkout
DECLARE @tblTest TABLE ([Name] VARCHAR(100),
[rows ] INT,
reserved VARCHAR(100),
data VARCHAR(100),
index_Size VARCHAR(100),
Unused VARCHAR(100))
DECLARE cur_Test Cursor FOR SELECT [name] FROM sys.objects WHERE [type] = ‘U’
OPEN cur_Test
FETCH NEXT FROM cur_test INTO @tblName
EXECUTE sp_spaceUsed @tblName
FETCH NEXT FROM cur_test INTO @tblName
CLOSE cur_Test
SELECT * FROM @tblTest ORDER BY rows desc

Enjoy Programming
Rajat Jaiswal

Simple web Browser with Animation using WPF

Dear Friends,
How are you ?
Today we will create a simplest web browser in WPF with some basic animation handling.
To do this task we have a simple control which is webBrowser control.
We need to just drag & drop webBrowser control and design the screen as you need just check out below fig.

once you done with the design.
Then to open a web page in browser control you need navigate method provided by webbrowser control.
The navigate method has string, uri parameter so you can utilize that according to your need.
Just check out below code.

The browser control also maintain forward , back history which we can utilize according to our need. Please see below code for that.

We can very much customize the web browser like block particular URL , bookmark etc.
Now you are just wondering that what is animation here ? so I would like to say that WPF give us tremendous opportunity for eye catching look and animation.
It give approx. 32 different animation object which is helpful in different scenario. All are available with name space “System.Windows.Media.Animation
”. Here I am with One of the simplest object which is double Animation.
The double animation is just basic animation control which can be utilize for animation you can do it with either XAML or code.
Here I am giving example of code.
So check out below code.
Dim da As New DoubleAnimation()
da.From = 30
da.To = 300
da.Duration = New Duration(TimeSpan.FromSeconds(1))
Me.wbctrl.BeginAnimation(WebBrowser.HeightProperty, da)
da.AutoReverse = True
da.RepeatBehavior = RepeatBehavior.Forever

Here wbctrl is webBrowser control . The double animation has duration property for how much time it will take. It has auto reverse property to
In the above code we using height property animation . just see below line

In similar manner you can go for width , position , opacity etc.
For more detail information please download attached code at

Enjoy coding.
Rajat jaiswal