October 1, 2008 at 7:01 am
Hi
I am new to sql server 2005. I have few questions to the forum, Please give me the solutions.
1). My database is running fine all the days, but since last two days there is a problem, database is down ie: it is not able to retrive the data from the application ? What may be the problem? . Please list out all the possible steps one by one.
2).. In one my database i have 50,000 records in a table. But unfortunately one of my developer unknowningly deleted 10,000 records from it. I would it like to know how to get back those deleted tables into a new database?
These are the issues i am facing since all two days. Kindly help me out.
Thanks for the help in advance!
pawan
October 1, 2008 at 7:22 am
1) There are too many things to list. It starts with, is the server on? Is the database online? and extends out to blocking transactions or any number of other things. Do you have errors or anything else to go on? More information please.
2) If you have a backup of the database, you can restore to a different location and then move the data from one source to another.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 1, 2008 at 7:23 am
pavankumar.mvs (10/1/2008)
HiI am new to sql server 2005. I have few questions to the forum, Please give me the solutions.
1). My database is running fine all the days, but since last two days there is a problem, database is down ie: it is not able to retrive the data from the application ? What may be the problem? . Please list out all the possible steps one by one.
Well - first would be to check the status of the database and any error messages you have in the logs or being returned by the app. It's impossible to give any advice with so little information to try and focus on the problem.
2).. In one my database i have 50,000 records in a table. But unfortunately one of my developer unknowningly deleted 10,000 records from it. I would it like to know how to get back those deleted tables into a new database?
For this type of recovery, you'd usually restore up to the point the delete began to a different database. Create a new dB, CAREFULLY restore your last full backup to the new database - checking VERY CAREFULLY that you are restoring to the new database and NOT trying to overwrite your current one (it won't allow this if your database is online, but there's no such thing as paranoid here). Then restore your logfile backups until the point in time you've chosen before the mass delete. Then transfer the missing data from te restore into live. Again you'll have to be careful taking into account any potential issues such as not restoring records which should be deleted, duplicate records having been put in in the meantime or records added manually to get around the problem and a whole lot of other potential nastyness youj can really only judge for youself based upon your apps, DB and setup.
Not least that your db may well be unavailable while this is taking place. Indeed, taking it offline - taking a full backup before even starting this process would be in everyone's best interests if the business'll swing for it.
And then, only once you've tested it in a dev environment
October 1, 2008 at 9:04 am
pavankumar.mvs (10/1/2008)
HiI am new to sql server 2005. I have few questions to the forum, Please give me the solutions.
1). My database is running fine all the days, but since last two days there is a problem, database is down ie: it is not able to retrive the data from the application ? What may be the problem? . Please list out all the possible steps one by one.
Can the DAB connect to the server using the SQL management tools?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 1, 2008 at 9:27 am
All possible steps for a database being down?
I don't have time enough left in this lifetime to write all of those.
1. Does the server still exist (fire, tornado, flood destruction)?
2. Does the building it's in have power?
3. Does the room have power?
4. Is the server plugged in?
5. Does the plug it's connected to have power?
... ad infinitum
As with anything, there are an infinite number of ways for it to go wrong.
Realistically, I'd start with: Can I connect management studio to the database? If so, can I query it?
Then I'd go from there.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 1, 2008 at 9:28 am
I'm curious, I must admit, about the connection between the title and the actual post. What do missing records have to do with performance tuning? Same for non-responsive databases.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 1, 2008 at 9:56 am
GSquared (10/1/2008)
I'm curious, I must admit, about the connection between the title and the actual post. What do missing records have to do with performance tuning? Same for non-responsive databases.
Well, if it's currently sitting there like a brick, getting it up and running again is certainly a significant performance improvement ....
I'll get my coat
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply