My company have server with loads of test databases. last saturday its
hard disk crashed all the partitions were lost . i tried to recover
data from that disk and found my database folder. I took backup on
another harddisk and tried to attache my databases but sql server says
it not avalid database file. i tried to repaire those files with
"recovery for sql server" but no use please help.
Tough thing...
If the database file is corrupt, and you cannot restore from a good backup,
reinstalling the software cannot help. also, re-attaching the database files
will not (cannot) solve the corruption.
Try =>
sp_attach_single_file_db
Attaches a database having only one data file to the current server.
if in suspect state => to reset the suspect status:
http://msdn.microsoft.com/library/de...tabse_494j.asp
once you can reaccess the db, try DBCC CHECKDB:
http://msdn.microsoft.com/library/de..._dbcc_00gy.asp
http://www.experts-exchange.com/Data..._21648997.html
Thanks,
Sree
"khandelwal.deep@.gmail.com" wrote:
> My company have server with loads of test databases. last saturday its
> hard disk crashed all the partitions were lost . i tried to recover
> data from that disk and found my database folder. I took backup on
> another harddisk and tried to attache my databases but sql server says
> it not avalid database file. i tried to repaire those files with
> "recovery for sql server" but no use please help.
>
Showing posts with label disk. Show all posts
Showing posts with label disk. Show all posts
Monday, February 20, 2012
My MDF Files currupted
My company have server with loads of test databases. last saturday its
hard disk crashed all the partitions were lost . i tried to recover
data from that disk and found my database folder. I took backup on
another harddisk and tried to attache my databases but sql server says
it not avalid database file. i tried to repaire those files with
"recovery for sql server" but no use please help.Tough thing...
If the database file is corrupt, and you cannot restore from a good backup,
reinstalling the software cannot help. also, re-attaching the database files
will not (cannot) solve the corruption.
Try =>
sp_attach_single_file_db
Attaches a database having only one data file to the current server.
if in suspect state => to reset the suspect status:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servdatabse_494j.asp
once you can reaccess the db, try DBCC CHECKDB:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_00gy.asp
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21648997.html
Thanks,
Sree
"khandelwal.deep@.gmail.com" wrote:
> My company have server with loads of test databases. last saturday its
> hard disk crashed all the partitions were lost . i tried to recover
> data from that disk and found my database folder. I took backup on
> another harddisk and tried to attache my databases but sql server says
> it not avalid database file. i tried to repaire those files with
> "recovery for sql server" but no use please help.
>
hard disk crashed all the partitions were lost . i tried to recover
data from that disk and found my database folder. I took backup on
another harddisk and tried to attache my databases but sql server says
it not avalid database file. i tried to repaire those files with
"recovery for sql server" but no use please help.Tough thing...
If the database file is corrupt, and you cannot restore from a good backup,
reinstalling the software cannot help. also, re-attaching the database files
will not (cannot) solve the corruption.
Try =>
sp_attach_single_file_db
Attaches a database having only one data file to the current server.
if in suspect state => to reset the suspect status:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_servdatabse_494j.asp
once you can reaccess the db, try DBCC CHECKDB:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_00gy.asp
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21648997.html
Thanks,
Sree
"khandelwal.deep@.gmail.com" wrote:
> My company have server with loads of test databases. last saturday its
> hard disk crashed all the partitions were lost . i tried to recover
> data from that disk and found my database folder. I took backup on
> another harddisk and tried to attache my databases but sql server says
> it not avalid database file. i tried to repaire those files with
> "recovery for sql server" but no use please help.
>
My MDF Files currupted
My company have server with loads of test databases. last saturday its
hard disk crashed all the partitions were lost . i tried to recover
data from that disk and found my database folder. I took backup on
another harddisk and tried to attache my databases but sql server says
it not avalid database file. i tried to repaire those files with
"recovery for sql server" but no use please help.Tough thing...
If the database file is corrupt, and you cannot restore from a good backup,
reinstalling the software cannot help. also, re-attaching the database files
will not (cannot) solve the corruption.
Try =>
sp_attach_single_file_db
Attaches a database having only one data file to the current server.
if in suspect state => to reset the suspect status:
tabse_494j.asp" target="_blank">http://msdn.microsoft.com/library/d...
tabse_494j.asp
once you can reaccess the db, try DBCC CHECKDB:
0gy.asp" target="_blank">http://msdn.microsoft.com/library/d...
0gy.asp
[url]http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21648997.html[/ur
l]
Thanks,
Sree
"khandelwal.deep@.gmail.com" wrote:
> My company have server with loads of test databases. last saturday its
> hard disk crashed all the partitions were lost . i tried to recover
> data from that disk and found my database folder. I took backup on
> another harddisk and tried to attache my databases but sql server says
> it not avalid database file. i tried to repaire those files with
> "recovery for sql server" but no use please help.
>
hard disk crashed all the partitions were lost . i tried to recover
data from that disk and found my database folder. I took backup on
another harddisk and tried to attache my databases but sql server says
it not avalid database file. i tried to repaire those files with
"recovery for sql server" but no use please help.Tough thing...
If the database file is corrupt, and you cannot restore from a good backup,
reinstalling the software cannot help. also, re-attaching the database files
will not (cannot) solve the corruption.
Try =>
sp_attach_single_file_db
Attaches a database having only one data file to the current server.
if in suspect state => to reset the suspect status:
tabse_494j.asp" target="_blank">http://msdn.microsoft.com/library/d...
tabse_494j.asp
once you can reaccess the db, try DBCC CHECKDB:
0gy.asp" target="_blank">http://msdn.microsoft.com/library/d...
0gy.asp
[url]http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21648997.html[/ur
l]
Thanks,
Sree
"khandelwal.deep@.gmail.com" wrote:
> My company have server with loads of test databases. last saturday its
> hard disk crashed all the partitions were lost . i tried to recover
> data from that disk and found my database folder. I took backup on
> another harddisk and tried to attache my databases but sql server says
> it not avalid database file. i tried to repaire those files with
> "recovery for sql server" but no use please help.
>
My log file has grow the disk full
My logfile has grow the disk full - the logfil is 25 gb and I have 4 gb free.
I can't shrink the log fil !
Can I set the log file to null ??
I have backup my datafil successfully!
Help!Detach the database, and the delete the log-file manually. Re-Attach the Database, a new log file would be created.|||Thank you :-)|||Originally posted by TALAT
Detach the database, and the delete the log-file manually. Re-Attach the Database, a new log file would be created.
I get a : Error 1813: Could not open new database 'xxxx'. Create database is aborted. Device activation error. The fysical file name 'xx'
may be incorrect.
??|||Detach the DB, rename the existing Log File and then attach the database and it will prompt for a new log file, say ok and you should be all set.
Otherwise:
Backup Tran DBName with No_log
then do
use dbname
dbcc shrinkfile(logfilename,truncateonly)|||Originally posted by sqlserver2k
Detach the DB, rename the existing Log File and then attach the database and it will prompt for a new log file, say ok and you should be all set.
Otherwise:
Backup Tran DBName with No_log
then do
use dbname
dbcc shrinkfile(logfilename,truncateonly)
How can I write the path ?? "e:\logfile\logfilename" don't work ?
The SQLserver can't find the file in sysfiles!
<dbcc shrinkfile(logfilename,truncateonly)> ?|||What exactly are u doin? Restoring the DB? Check if the file name has an extension and u r missing the .tran or .bak extention in the Quotes.|||By this time you might have detached the database using SP_DETACH_DB.
Now delete the existing >LDF file from the path and use SP_ATTACH_SINGLE_FILE_DB to reattch the database which will create new log file as specified.
Books online would be the best help in this regard.|||Originally posted by Satya
By this time you might have detached the database using SP_DETACH_DB.
Now delete the existing >LDF file from the path and use SP_ATTACH_SINGLE_FILE_DB to reattch the database which will create new log file as specified.
Books online would be the best help in this regard.
Tanks for your reply :-)
EXEC sp_detach_db @.dbname = 'xxx'
EXEC sp_attach_single_file_db @.dbname = 'xxx',
@.physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\xxx.mdf'|||Yes thats correct and what was the result.:)
I can't shrink the log fil !
Can I set the log file to null ??
I have backup my datafil successfully!
Help!Detach the database, and the delete the log-file manually. Re-Attach the Database, a new log file would be created.|||Thank you :-)|||Originally posted by TALAT
Detach the database, and the delete the log-file manually. Re-Attach the Database, a new log file would be created.
I get a : Error 1813: Could not open new database 'xxxx'. Create database is aborted. Device activation error. The fysical file name 'xx'
may be incorrect.
??|||Detach the DB, rename the existing Log File and then attach the database and it will prompt for a new log file, say ok and you should be all set.
Otherwise:
Backup Tran DBName with No_log
then do
use dbname
dbcc shrinkfile(logfilename,truncateonly)|||Originally posted by sqlserver2k
Detach the DB, rename the existing Log File and then attach the database and it will prompt for a new log file, say ok and you should be all set.
Otherwise:
Backup Tran DBName with No_log
then do
use dbname
dbcc shrinkfile(logfilename,truncateonly)
How can I write the path ?? "e:\logfile\logfilename" don't work ?
The SQLserver can't find the file in sysfiles!
<dbcc shrinkfile(logfilename,truncateonly)> ?|||What exactly are u doin? Restoring the DB? Check if the file name has an extension and u r missing the .tran or .bak extention in the Quotes.|||By this time you might have detached the database using SP_DETACH_DB.
Now delete the existing >LDF file from the path and use SP_ATTACH_SINGLE_FILE_DB to reattch the database which will create new log file as specified.
Books online would be the best help in this regard.|||Originally posted by Satya
By this time you might have detached the database using SP_DETACH_DB.
Now delete the existing >LDF file from the path and use SP_ATTACH_SINGLE_FILE_DB to reattch the database which will create new log file as specified.
Books online would be the best help in this regard.
Tanks for your reply :-)
EXEC sp_detach_db @.dbname = 'xxx'
EXEC sp_attach_single_file_db @.dbname = 'xxx',
@.physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\xxx.mdf'|||Yes thats correct and what was the result.:)
Subscribe to:
Posts (Atom)