Tuesday, April 28, 2015

Hands-on Learning Event in Honolulu: Introduction to Structured Query Language

This was offered once I 2012 and once in the beginning of the year and was a total success. It is offered once again to those who could not make it.

Please register at the PCATT.ORG site.


New in 2015: You will also get an introduction to Windows PowerShell. SQL Server 2012 Express will be used.
For details you can also write to:
Hodentek@live.com with course name in the Subject line.

Saturday, April 25, 2015

How do you detach a database from a SQL Server Instance?

There are a couple of ways you can do this. Let us say you are not into coding. Then the easiest way is to use the SQL Server Management Studio as described in this post.

Detaching a database
Let us say we want to detach database Feb6 from the Server Hodentek8\Regency Park
Observe that a query has fun on the database

detach01

Right click and click Detach.. in the Tasks pop-up menu.
Detach Database window appears as shown

detach02

Click OK. After some processing the detach window appears again indicating an error as shown.
detach03

In order to detach, the database should not be in use. Once the database is a target of a query it is in use.

Now close the query window. Click on Detach... menu item as before.
The Detach Database window appears as before.
Now click OK.
You do not get any message the detach window will close, but you can see that the database  Feb6 has disappeared from the Object Explorer.
You will find the detached files Feb6.mdf and Feb6_log.ldf in the following location on your computer:
C:\Program Files\Microsoft SQL Server\MSSQL11.REGENCYPARK\MSSQL\DATA

If you want to re-attach it with Windows PowerShell read here:
http://hodentekmsss.blogspot.com/2015/04/attaching-detached-database-in-sql.html

Monday, April 20, 2015

http://hodentekhelp.blogspot.com/2015/04/is-samsung-tv-compatible-with-windows.html - Correction

There is an advanced setting in the phone that lets you choose the way you want to view the image. Unfortunately the default was flipped view. When you choose correctly the image gets displayed correctly. I should have guessed.

These are the Advanced settings as in the picture:

ScreenMirroring7

I still need to work on the audio rendition.

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.
http://answers.microsoft.com/en-us/windows/forum/windows8_1-hardware/what-smart-
tvs-are-compatible-with-windows-81/f0187562-5a4e-4cf4-9820-51502d92466d

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.

NewUser1

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.

NewUser2
 
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.














NewUser3
 
 
Some interesting posts can be found here:
http://hodentekPlus.blogspot.com


 

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.
http://hodentekhelp.blogspot.com/2008/09/how-do-i-create-new-login-for-sql.html

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.
http://hodentekhelp.blogspot.com/2015/04/how-do-you-create-windows-user.html

Step 2:
Launch Power Shell for SQL Server by executing SQLPS. If you want to know how to do this reivew this link here:
http://hodentekmsss.blogspot.com/2014/08/how-do-you-use-sql-server-powershell.html

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.

PS SQLSERVER:\>

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:
http://hodentekPlus.blogspot.com