Always Get Better

Posts Tagged ‘Windows Vista’

VISTA: How to fix SQL Server Express Error – CREATE DATABASE permission denied in database ‘master’

Thursday, November 5th, 2009

If you’re using SQL Server Management Studio Express under Windows Vista and see either of these errors:

CREATE DATABASE permission denied in database 'master'

or

The database [Name] is not accessible. (Microsoft.SqlServer.Express.ObjectExplorer)

Here’s the fix:

  1. Close SQL Server Management Studio Express
  2. Open your start menu and locate that program.
  3. Right-click on the Management Studio and choose ‘Run as Administrator’
  4. Fixed!

I swear the simplest solutions can be the hardest to find – hopefully this saves someone (or my forgetful self!) some aggravation.

Getting Real Power in Vista

Tuesday, July 1st, 2008

Windows Vista hides the administrator user. In order to access it, open a command prompt and issue the command:

net user administrator /active:yes password

Password can be anything you want, and will set up the administrator user.

Although you can access much of your system’s setting under the default super user account, Vista implements a User Access Control System that effectively makes administrator the only real super user. In particular, the “Local Users and Groups” interface is normally hidden from you.

One more note – the command listed above can’t be run from a regular shell – you must open the shell as administrator.

Editing the HOSTS file in Windows Vista

Friday, April 18th, 2008

Windows Vista keeps the HOSTS file locked down so only users with elevated permission can edit it.  I found the fastest way to add lines to this file in my own system was:

  1. Open the directory containing the file (C:\Windows\System32\drivers\etc\hosts)
  2. Copy the file to my Documents directory by right-clicking Send To…
  3. Editing the file in UltraEdit (or notepad, or whatever)
  4. Moving the file back to the etc directory.

The act of moving it back causes Windows to prompt you for privilege elevation.  It’s possible to raise your text editor’s privileges, but going in through the command line – at least to me – seems like a much longer and more tedious way of doing the same thing.