call today Call Today 320.281.0605

MS SQL and MySQL Database Backups on Rackspace Cloud

October 7, 2010    Author: Jessica

Recently, I was asked to setup an automatic database backup process for some cloud sites.  Not having much experience with database backup, let alone setting up an automatic process.  I plowed ahead on the project.

I was directed to this link for the MS SQL Databases: http://cloudsites.rackspacecloud.com/index.php/How_can_I_create_a_cron_job_to_backup_my_MSSQL_database%3F

Following the above link was more than helpful.  Although, I still ran into an error after running through the directions.  “curl: (6) Couldn’t resolve host ‘backupdb.asp’ ”  My first mistake was, I was using the linux path instead of the windows unc path in the backup.asp file.  My second mistake was I didn’t enter a full url for the command to run in the cron job setup.  After fixing those simple mishaps, I now have an automatic backup running for my sites.

For MySQL Databases, I was directed to this site: http://cloudsites.rackspacecloud.com/index.php/How_do_I_create_a_cron_job_to_backup_my_MySQL_database%3F

I can’t say that I’m at all familiar with shell scripting or that I even know what the code is really doing.  For the MySQL Database process I did wonder off the directed path and had found another backup tool, phpMyBackupPro (http://www.phpmybackuppro.net/).  This tool can be easily installed on your site and will create an automatic backup for you.  Using this tool for multiple sites isn’t what it was designed for, unless you want to install this tool on each site.  No thank you.

After that little adventure, I got back on my directed path.  The error I found this time was “No such file or directory”.  After reviewing the shell script multiple times, I couldn’t find anything wrong.  I did some searching and found this:

#!/bin/bash
Backupdir= *******.com/backups
backupfile=`date +backup-%d-%m-%y_%H.sql`
tarfile=mysqlbackup.tar
cd $backupdir
mysqldump –opt -A -h ******** –password=****** -u ******* > $backupfile
gunzip “$tarfile”.gz
tar rf $tarfile $backupfile &> /dev/null
gzip $tarfile
rm $backupfile

*replace the “*” with actual information

I plugged in the information for the script then continued setting up the cron job per the original directions in the above link.  The first time this script runs, you will get a “File Not Found”.  Run the script a second time and the error is gone.  I’m now getting automatic backups of my MySQL Databases.

Share

SQL Server 2008 – Saving Changes is not permitted.

November 19, 2009    Author: Joel

When trying to save a table when inserting a new column other than at the end I ran into this error:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.

sql2k8save

Solution:
In Management Studio, Tools –> Options then go to the Designer Page and uncheck “Prevent saving changes that require table re-creation”.

Solution found at: http://pragmaticworks.com/community/blogs/brianknight/archive/2008/06/04/sql-server-2008-designer-behavior-change-saving-changes-not-permitted.aspx

Share

Sql Server 2008 Install – Restart Computer Failed

September 25, 2009    Author: Joel

When installing SQL Server 2008 today I ran into an error right away.  In testing the Setup Support Rules the “Restart computer” operation check failed.

sql2k8installerror

After a bit of Binging I found this thread: http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/ca182f5d-114a-4516-99d4-0854ad176fbf/

It talks about deleting any registry settings with a value of “PendingFileRenameOperations" in the key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager"

Open your Windows programs type “regedit.exe” in the search then click enter. Now drill down to the Session Manager key.  Look for any value with “Pending FileRenameOperations” and delete it.

Go back to the SQL Server 2008 setup and rerun it.  Everything should pass now and you can proceed.

regedit

Share

Error Restoring SQL Server DB backup

April 23, 2009    Author: Joel

Scenerio: I had a web application that I developed on my local machine.  When I finished it I made a backup of the database to deploy to the staging server.

I uploaded it to the server then went to restore the db on the server, that is when I received this error:

Restore failed for Server ‘staging’. (Microsoft.SqlServer.Smo)

Additional information:
System.Data.SqlClient.SqlError: Directory lookup for the file “path.db.mdf” failed with the operating system error 2(The system cannot find the specified.). (Microsoft.SqlServer.Smo)

 RestoreError

Solution: The location of where my database on my local machine was different than that on the server.  I had to update the database location on the server. 

This was done by when restoring clicking on the options tab.  Then updating the paths of the Original File Name to where the database data is stored on the server.  I found this path out by looking to see where the current ones were stored.

RestoreErrorSolution

Share
Agent Cody Banks 2 Destination London full lenght movie download Afghan Knights download movie Inside the Smiths download movie Beverly Hills Chihuahua download movie Permanent Vacation download movie Indiana Jones and the Kingdom of the Crystal Skull download movie Afghan Knights download movie Inside the Smiths download movie Beverly Hills Chihuahua download movie Permanent Vacation download movie Indiana Jones and the Kingdom of the Crystal Skull download movie