By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Repair Corrupt Database?

P: 1
one of my SQL database corrupt. and i dont have any backup ......i got the bigest prob. i tryed to repair will all the 'DBCC' command but none of those works.. i tried 'dbcc checkdb', 'dbcc CHECKALLOC', 'DBCC CHECKTABLE' but none of this find any problem. is there any extra tools or other command to repair MSQL 7.0 Database. please helpppppp please....

In access i always Jet4 repair database command but what should i use in SQL?
May 24 '15 #1

✓ answered by calvincooley

Restore With Transact-SQL

-Click “New Query” in the Management Studio’s main toolbar. This opens a large text area on the right side of the screen.

-Click in the text area and type a Create Database statement using the following Transact-SQL code as a guide:
CREATE DATABASE MyDatabase ON (FILENAME = 'c:\data files\my_data.mdf'), (FILENAME = ' c:\data files\my_data.ldf') FOR ATTACH;

-Click the “Execute” button in the Transact-SQL toolbar, located just under the Management Studio’s main toolbar. The Execute button symbol is a right-pointing triangle. SQL Server Management Studio restores the database.

Helpful resources to explain another methods of restoration and gave more variants of sql data recovery...

https://social.technet.microsoft.com...ssdsgetstarted
http://www.filerepairforum.com/forum...on-on-sql-2014

Share this Question
Share on Google+
2 Replies


computerfox
100+
P: 278
How is it "corrupt"?
Are you getting an error message?
Is it data-related?
Can you open the database at all?
May 24 '15 #2

P: 1
Restore With Transact-SQL

-Click “New Query” in the Management Studio’s main toolbar. This opens a large text area on the right side of the screen.

-Click in the text area and type a Create Database statement using the following Transact-SQL code as a guide:
CREATE DATABASE MyDatabase ON (FILENAME = 'c:\data files\my_data.mdf'), (FILENAME = ' c:\data files\my_data.ldf') FOR ATTACH;

-Click the “Execute” button in the Transact-SQL toolbar, located just under the Management Studio’s main toolbar. The Execute button symbol is a right-pointing triangle. SQL Server Management Studio restores the database.

Helpful resources to explain another methods of restoration and gave more variants of sql data recovery...

https://social.technet.microsoft.com...ssdsgetstarted
http://www.filerepairforum.com/forum...on-on-sql-2014
May 26 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.