-
Mar 2nd, 2018, 06:34 PM
#1
Thread Starter
New Member
SQL Server scares me
I’m novice in IT sphere. But I have to work in SQL Server database. I add new data, change, delete and etc. I can only manage it, not more. Today morning I have opened it, but, I couldn't do it. Because the program showed me...Database consistency errors reported by DBCC CHECKB. I don't know what does it mean. I'm in awful situation, my colleagues in couple days must see some data from it.
-
Mar 5th, 2018, 09:56 AM
#2
Re: SQL Server scares me
You didn't give many details so start with something like this article.
It may be pure coincidence or it may be you managed to do something that messed up a record or index like changing a primary key value so the old value can no longer be found in the index. I would have thought SQL Server wouldn't allow something like that.
If you want more help here, you should provide ALL the details of the SPECIFIC error you are getting and what code you used to produce that.
-
Mar 5th, 2018, 04:12 PM
#3
New Member
Re: SQL Server scares me
Lower you may see 3 types of manual help, in case no one of it can't aid you, then there are some infortmative resources, they were found from Google and Yahoo
https://docs.microsoft.com/en-us/sql...iew-sql-server
https://www.mssqltips.com/sqlservert...covery-models/
https://www.sqlserverrepairtoolbox.com/
Restore full backup WITH RECOVERY
As mentioned above this option is the default, but you can specify as follows.
RESTORE DATABASE AdventureWorks FROM DISK = 'C:\AdventureWorks.BAK'
WITH RECOVERY
GO
Recover a database that is in the "restoring" state
The following command will take a database that is in the "restoring" state and make it available for end users.
RESTORE DATABASE AdventureWorks WITH RECOVERY
GO
Restore multiple backups using WITH RECOVERY for last backup
The first restore uses the NORECOVERY option so additional restores can be done. The second command restores the transaction log and then brings the database online for end user use.
RESTORE DATABASE AdventureWorks FROM DISK = 'C:\AdventureWorks.BAK'
WITH NORECOVERY
GO
RESTORE LOG AdventureWorks FROM DISK = 'C:\AdventureWorks.TRN'
WITH RECOVERY
GO
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|