Ok here is my first post as a database guy. The new job is going very well. I have already been able to add value to the team. That is always nice. I am currently in the middle of a clean-up project and here are some things that I ran into. If anyone knows any better ways to do these please feel free to let me know.
I am using SQL Server 2005.
While trying to restore a database from a backup file I got an error that was similar to this:
Restore failed for Server ‘your server name’ (Microsoft.SqlServer.Smo) RESTORE cannot process database because it is in use by this session.
Apparently, if the database one logs into is the primary database for this login, then it cannot restore the database. So I had to login as SA to do a restore.
Also, if I am working from my account then I have to disconnect (as in shutdown the SSMS) from it to restore the database again because it locks SA from being able to update it otherwise. Ahh, the idiosyncrasies of Microsoft stuff. I guess that I have to get used to it though. It is helping to put food on the table.
If there are simpler ways of doing this please let me know. Otherwise, I am getting buckled in for an adventure.
From my experience, a simpler way is to use special 3rd party tools for sql backup and restore.
This way can really speed up all the process and give some extra useful features.
From such solutions I can recommend LiteSpeed.
Its quite easy to intsall and works stable.
In compare with native way the reducttion of backup archive was really considerable as well. For example, 150 GB database was compressed to a 22 gb backup archive.
By: Jerry on February 6, 2008
at 4:20 pm
Jerry
Thanks. I will be certain to check it out. I am just beginning the process of becoming a full time DBA and any insights from the community are appreciated greatly.
Brian
By: tszao on February 7, 2008
at 1:40 am
thaaaaaaaaaaaaaaaaaanx
By: somaya on August 29, 2009
at 8:39 am