Friday, April 17, 2015

How to fix IE 11 scrolling on my Windows 8.1 laptop?

There are plenty of people looking for an answer to this problem.

I had this problem recently and I fixed it with Windows Updates.

Wednesday, April 15, 2015

Is Samsung TV compatible with Windows 8.1 Miracast wireless display feature?

Oliver:Water Color

Yes it does but there is a problem. Samsung Smart TV cannot pair with Windows Phone 8.1 (Nokia Icon) is a message I get but it still works but there appears to be problem.

I did post saying that Samsung Smart TV is not compatible with Miracast wireless display feature.

After trying couple of more times I find that screen mirroring from a Windows Phone 8.1 does work but the image is inverted (Up/Down).


Friday, April 10, 2015

How do you create a Windows User?

Let us say you have a computer and you own it. When you installed the operating system you became the owner of the computer and hence its administrator. If others want to use the computer (the local account) than you as the administrator should create a new user and provide a password. You can also set the life time of that password. When so created each user has his own folder; has his own profile and shares a common folder (Public) with the other users which makes it possible to share files.

 As the creator/installer of SQL Server has two options for authentication to log into the SQL Server (a Windows Service), either Windows Authentication or SQL Server authentication. Any Windows user (any of the users of the computer) can be set to log-in to the SQL Server if the computer administrator sets up the user to log-in.

This post shows the first part of creating a new user to a computer (desktop, laptop or a tablet).

Step 1:
Go to Control Panel | System and Security | Administrative Tools | Computer Management. You should be able to see the Local Users and Groups folder. Right click User and click on New User... as shown.


The New User window is displayed as shown.

Step 2:
Insert the name of the New User, herein UserX, the Full name as well as the Description can be provided if needed. Herein only a Description is provided.

You need to provide a password and confirm it. Even in Windows 8.1 password strength is not a problem. There are options to set how long a password can be active and whether it needs to expire. You as the administrator can also disable the account if it needs (employee leaves, tenders resignation). Herein the default choice has been changed and User Cannot change password and Password never expires has been chosen.
Step 3:
Click Create and it is done as shown in the Computer Management console. Now UserX can access the computer with the password you have created. You can now access his properties by right clicking UserX to bring up the properties.

Some interesting posts can be found here:


How do you create a User Login with Windows Authentication using Power Shell?

This post describes step-by-step of creating a login for SQL Server 2008 using the SQL Server Management Studio. The same procedure applies to other versions as well.

The following shows how you may do this using Power Shell.

Step 1:
In order to do create a login using Power Shell either use an existing Windows User or create a new user for Windows. You can create a new user to Windows desktop or Laptop as shown here.

Step 2:
Launch Power Shell for SQL Server by executing SQLPS. If you want to know how to do this reivew this link here:

Step 3:
After you complete the above step you should be on this line in your Power Shell console (The computer is running Windows 8.1 Profesisonal and the version of Power Shell is 4.0).

Microsoft SQL Server PowerShell
Version 11.0.2100.60
Microsoft Corp. All rights reserved.


Now declare an instance of SQL Server using the following:

PS SQLSERVER:\> $server = new-Object Microsoft.SqlServer.Management.Smo.Server('Hodentek8\RegencyPark')

Now declare a user UserX using New-Object.. syntax.

PS SQLSERVER:\> $SqlUser = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Login ('Hodentek8\RegencyPark','Hodentek8\UserX')

Here Hodentek8(host) is the name of the computer; RegencyPark is the name of the instance and UserX is the name of the user.

Choose Windows Authentication using the following command and create the login using the following:

PS SQLSERVER:\>SqlUser.LoginType='WindowsUser'

At this point you should have the computer user called UserX for your computer otherwise you will get this error.
PS : A positional parameter cannot be found that accepts argument '$null'.
At line:1 char:3
+ PS <<<<  SQLSERVER:\> $SqlUser.LoginType='WindowsUser'
    + CategoryInfo          : InvalidArgument: (:) [Get-Process], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetProcessCommand

Now create this login by this:

PS SQLSERVER:\>$SqlUser.create()

This completes the steps to create a New User Login which you can verify in SQL Server Management Studio as shown here:

Some interesting posts can be found here:


Sunday, March 22, 2015

How do you explain this correlated subquery?

The syntax of subqueries is as shown here.

Outer query(some operator) (Inner query)

While non-correlated subqueries are quite easy to understand correlated sub queries
are not quite obvious.

In the case of non-correlated subqueries, the inner query is evalauted first. The value or values returned from inner queries are used in the outer queries based on some operation.

In the case of correlated subquery the outer query is run and for each value returned by the outer query the inner query is evaluated and when the match is found the outer query stops. Usually the inner query just returns either some value or no value and the logical operation is usually Boolean (exists, not exists, any, all, etc.).

The correlated subquery you are asking about is the following posed to the Northwind database:

Use Northwind

Select o.EmployeeID, ShipName, o.OrderID ​
from Orders o​
Where  exists​
(Select i.ShipCity​
from Orders i​
Where i.ShipCity=o.ShipCity and i.EmployeeID in (5,7))


This returns the following result set (here are sme 6 rows out of 674 rows):

You are probably intrigued why you are getting employee ID's other than 5 and 7 in
the result.

The reason for this is the inner query result when processed with the logic (exists) returns true or false. If it is true the Orders table returns the columns requested. Inner query result set are not part of the rows returned.

Try the same query replacing 'exists' with 'not exists'. You will find that the subquery returns 156 rows.

The total of all rows returned by the query,

Select o.EmployeeID, o.ShipName, o.OrderID ​
from Orders o​

is 830 which is (156+674).

Saturday, March 21, 2015

How do you design a Query using Query Editor in SQL Server Management Studio?

From scratch:
Open a Query pane in SSMS (from a database, for example) and right click to display the drop-down menu as shown.


Choose the Design Query in Editor... option and the Query Designer window gets displayed with a Add Tables window. You can add as many or as few tables as you want and design your query. Holding control key down, select multiple tables and click ADD to add all the selected tables. If you suspect that the data has changed recently, you can click Refresh to use latest data.


Display a query you created in the designer

You can create a query in the query pane. Highlight the query, right click the highlighted portion and select Design Query in Editor... as shown.

The query you designed gets displayed in the Query Editor as shown.

 Selecting the query and displaying it in designer will not work for more complicated queries.

Wednesday, March 18, 2015

I do not see the available databases toolbar item in SSMS, Why?

Missing Toolbar item? NO

The SQL Server Management Studio(SSMS) is highly context sensitive.

For example, unless a Query Window is open (by creating a new query or by clicking first in the query window) the menu item Query will not be displayed.


When you open a query window (by using New Query  from database or SQL Server
instance node) then you will see the Query menu item.


In a similar manner depending on how whether View | Toolbars | Sql Editor
is chosen or not you will not see the 'Available databases' item as shown in the
next image.