Solved

I am getting an error trying to backup my SQL database

Posted on 2008-10-07
18
846 Views
Last Modified: 2011-10-19
I am getting an error when I try to use the SQL Server Management Studio.  There are two files beginning with the letters sm that I need to backup so that I can restore to a new server.  I highlight the file and click on backup.  The backup desination and file name show as \sm.bak.  If I try try to execute the backup it errors and talks about the backup destination setting.  I am attaching a copy of the error.  I am on a Windows XP station and a computer administrator with no security set.
Property BackupDirectory is not available for Settings 'Microsoft.SqlServer.Management.Smo.Settings'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Express.Smo)

Open in new window

0
Comment
Question by:captjcret
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 5
  • +1
18 Comments
 
LVL 41

Expert Comment

by:graye
ID: 22664721
So, what exactly are you trying to do?    
If you need to backup a database, then you'd use the SQL's BACKUP command.   If you're trying to backup some file, then you'd use the OS's NTBACKUP command
0
 

Author Comment

by:captjcret
ID: 22665769
Where would I find a list of syntax's of SQL backup commands that I can run.  I have a strong DOS background but no very little about SQL except that it is a database manager/server.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 22665801
Look it up in SQL Server Books Online.
0
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 
LVL 41

Expert Comment

by:graye
ID: 22668928
Most folks just use the SQL Management Studio... you'd just navigate to the database, do a right click, and select backup
0
 

Author Comment

by:captjcret
ID: 22669778
I do navigate to the database and select backup.  When I try to execute it is when I get the error message I attached.
Property BackupDirectory is not available for Settings 'Microsoft.SqlServer.Management.Smo.Settings'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Express.Smo)

Open in new window

0
 
LVL 41

Expert Comment

by:graye
ID: 22669920
Spooky.... OK, well it certainly looks like your version of SQL Server is a little messed up.   I'd recommend a complete uninstall followed by an install
0
 

Author Comment

by:captjcret
ID: 22670148
What happens to the database if I do a complete uninstall?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22670724
Do a Help --> About and make sure you have the current service packs for the Management Studio.

Then are you seeing something like below when you are trying to backup?
Q-23795470-View.jpg
0
 
LVL 41

Expert Comment

by:graye
ID: 22671099
The database files themselves are not removed during an uninstall.    However, if you want to be one the safe side, you can shutdown the SQL Server service and copy the database files to somewhere safe
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22672111
>> you can shutdown the SQL Server service and
>> copy the database files to somewhere safe

That is provided it is an actual separate DB from the system DB.

I'd suggest that he hold off on that until we can get a better description of what is going on.

0
 

Author Comment

by:captjcret
ID: 22672388
Jimpen,  I am seeing a tree simular to the one in your example.  When I expand the folder databases I can see two database files that I have been told I need to backup.  They begin with the letters "sm"
When I right click on either one I can go to tasks and then under tasks, backup.  With the backup screen up,  I execute and that is when I get the error message.  The destination for the backup says \sm.bak.
I have tried to remove the destination file and location and when I click on add for a new location I get the attached error.
Property BackupDirectory is not available for Settings 'Microsoft.SqlServer.Management.Smo.Settings'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Express.Smo)

Open in new window

0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22672754
Ok, that clarifies it a bunch.

You need to fully qualify the destination path such as "C:\MyPath\SM.bak". You can't use a UNC or a non-local drive to save to.

Something like the images below. Note that you want to save them to 2 different files. It is much easier that way.
Backup-DB-Screen.jpg
Backup-Destination-Screen.jpg
0
 
LVL 41

Expert Comment

by:graye
ID: 22678207
It still sounds to me like a corrupted install...   but give it a whirl and let us know
0
 

Author Comment

by:captjcret
ID: 22712278
Hi Jimpen,  I am unable to change the destination backup directory.  It is grayed out.  I realized that when I am logging into the SQL server managment program by default I am logging in with Windows Authentication and I have notice that there is an option for logging in with SQL server authentication.  I am thinking that it might make a difference with the backup tools.  I am not the one who origionally installed this software so I don't know what the SQL server authentication would be.  Is there a default admin password that comes with SQL?
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 250 total points
ID: 22713906
>> I am unable to change the destination backup directory.  It is grayed out.

That sounds like your permissions aren't sufficient to do backups.

>> I realized that when I am logging into the SQL server management ....

There is Windows Authentication or Mixed mode (which is SQL Authentication or Windows Authentication).

>> I am thinking that it might make a difference with the backup tools.

The SA is the default SQL login that has full permissions to do anything. The other way is to have your login (MyDomain\UserID) added to the Sysadmin role in the SQL Server security.

>> Is there a default admin password that comes with SQL?

There isn't a default password but SQL 2005 requires that a password be set for SA even if the mixed mode is turned off.

-----------------------------------
Below is the way to run the backups from a Query Window. You still may not be able to do it from the security viewpoint for your userid.
BACKUP DATABASE [AdventureWorks] 
        TO  DISK = 'D:\MyPath\AdventureWorks.bak' 
        WITH NAME = 'AdventureWorks-Full Database Backup', 
        STATS = 5
GO
RESTORE VERIFYONLY FROM  DISK = N'D:\MyPath\AdventureWorks.bak' WITH  
GO
----------------------------------------------------
restore filelistonly 
        from disk='D:\MyPath\AdventureWorks.bak' 
 
 
/************ Remove the slash and asterisks to uncomment this text
 
RESTORE DATABASE [AdventureWorks] FROM  
        DISK = 'D:\MyPath\AdventureWorks.bak' 
        WITH  
        MOVE 'Logical_FileName_Data' TO 'E:\MyPath\AdventureWorks.mdf',  
        MOVE 'Logical_FileName_log' TO 'E:\MyPath\AdventureWorks.ldf',  
        NOUNLOAD,  REPLACE,  STATS = 5
GO
*****************/

Open in new window

0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22816887
Can I ask why a B grade?

What's the right grade to give?

Grading at Experts Exchange is not like school. It's more like the "10-point Must" system in professional boxing; in other words, an answer is worth an A, unless it doesn't resolve your issue. If it requires you to do a little more research, or figure out one more piece of code, then it's worth a B. If you think it's not worth a B, the custom is to offer the Experts an opportunity to earn a better grade.

Giving a higher grade has no impact on your Available Points.
0
 

Author Comment

by:captjcret
ID: 22816992
I apologize for the "B" grade.  You guys were actually great!  I am afraid it turns out that the database is corrupt and there is no backup.  I shouldn't take that out on you guys.  I didn't realize it was such a sensitive thing and will remember it when scoring in the future.  Again, Thanks
0

Featured Post

Webinar: MariaDB® Server 10.2: The Complete Guide

Join Percona’s Chief Evangelist, Colin Charles as he presents MariaDB Server 10.2: The Complete Guide on Tuesday, June 27, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question