Posts Tagged ‘SQL Express’

h1

Vista: Running a command as an Administrator

July 31, 2008

Sometimes the learning curve is just too big! Anyhow…

I’ve being trying to install SQL Server 2005 Express on my new Vista Ultimate 64-bit laptop. Well, I got the main files installed, but also wanted to install the Management Studio too. First I was thwarted by an Asian version on the Microsoft SQL Express download page (no English version available). Anyhow after a lot of searching I found an English language version (link below).

Then when I tried to install it, I kept getting error code 29506 messages at the END of the installation (why couldn’t they give me the error message at the BEGINNING of an installation?). More Googling, swearing, frustration, etc. I found the answer on some of the forums—obviously others have had this problem too! The error is all related to Vista permissions (so, why doesn’t the error message tell me that?), and the solution is to install the application from a command prompt (hello??? DOS??? on Vista???) that’s been set up to run as an Administrator. What the…?

Again, this is easy once you know how, but when you’re new to Vista—as I am—and have no-one to help, it just takes a lot of perseverance and frustration… Here’s what you do:

  1. Click the Start icon.
  2. Type CMD into the Search box.
  3. Right-click on cmd.exe then select Run as Administrator. THIS IS IMPORTANT!
  4. On the Command window, use the cd command to change the directory to where the file you want to install is located. (NOTE: It must be on a local drive—I tried entering a UNC path to the server where it was located, but got a message that ‘CMD does not support UNC paths as current directories’; I also tried the mapped drive letter, but it didn’t like that either!)
  5. Type the location and name of the executable or MSI file (e.g. C:\Users\<username>\Documents\<filename.extension>), then press Enter.
  6. The installation will happen as normal, except this time it will work!

Location of English language version of SQL Server 2005 Express Management Studio file: http://tinyurl.com/mkvgw (Microsoft Downloads site)

[Link last checked July 2008]

h1

Backing up an SQL Express database to a file

February 22, 2008

Backing up an SQL Express database to a file is a simple process… once you know what to do.

  1. Open SQL Server Management Studio Express and connect to the SQL server.
  2. Expand Databases.
  3. Right-click on the database you want to back up, then select Tasks > Back up.
  4. On the Back Up Database window, make sure the Database field contains the name of the database you want to back up.
  5. Select the Backup Type. By default, it is Full – leave it set to that.
  6. Click Remove to remove the default/last backup file name.
  7. Click Add to open the Select Backup Destination window.
  8. Click […] next to the File Name field.
  9. On the Locate Database Files window, select the folder where you want to backup file to go. By default, it is ..\Microsoft SQL Server\MSSQL.1\MSSQL\Backup.
  10. In the File Name field, type the name for this backup, with a .bak extension. For example, xyz_20080221.bak for a backup of the XYZ database created on 21 February 2008.
  11. Click OK to close the Locate Database Files window.
  12. Click OK to close the Select Backup Destination window.
  13. Click OK to start the backup. The progress icon displays in the lower left corner, and a ‘completed successfully’ message displays when its done.

See also: