Number 401002, Severity 2Restoring Sybase 12.5.2 backup - sybase

I was able to recover one ASE 12.5.2 backup file from a malware attack serve [.bk]. I created similar Device sizes and database and try to load to a new server I am getting below error. I tried with few backup files and still the same. These backup files are Not Compressed.
Tried with different servers and results is same. Can anyone help me here to over come this and restore this backup. Or does anyone know a way to repair a Sybase 12.5.2 backup file?
-------
Server Message: Number 3216, Severity 10
Server 'GF2TEST', Line 1:
Backup Server session id is: 7. Use this value when executing the 'sp_volchanged' system stored procedure after fulfilling any volume change request from the Backup Server.
Server Message: Number 401002, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 4.10.2.1: Label validation error: first label not VOL1.
Server Message: Number 603102, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 6.31.2.4: Volume rejected.
Server Message: Number 101402, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 1.14.2.2: Unrecoverable I/O or volume error. This DUMP or LOAD session must exit.
Server Message: Number 603202, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 6.32.2.3: C:\Documents and Settings\Admin\Desktop\GF2 Backup\GF225012015.bk: volume not valid or not requested (server: , session id: 7.)
Server Message: Number 101402, Severity 2
Server 'GF2TEST_BS', Procedure 'bs_read_header', Line 0:
Backup Server: 1.14.2.4: Unrecoverable I/O or volume error. This DUMP or LOAD session must exit.
Server Message: Number 8009, Severity 16
Server 'GF2TEST', Line 1:
Error encountered by Backup Server. Please refer to Backup Server messages for details.

Related

T-SQL Backup/Restore to/from URL does not work on SQL Server 2017 Web Edition on Ubuntu Linux 16.04 LTS

I tried, without success, to run a T-SQL script to Backup to URL and another one to Restore to URL on SQL Server 2017 Web Edition, which is running on Ubuntu 16.04 LTS. The credential was successfully created.
Here's an example of the T-SQL for Backup that I'm trying to run:
DECLARE #name varchar(100)
DECLARE #fileURL varchar(100)
SET #name = 'test-db'
SET #fileURL = 'https://mystorageaccountname.blob.core.windows.net/databases/test-db.BAK'
BACKUP DATABASE #name
TO URL = #fileURL
WITH CREDENTIAL = 'mycredential'
,COMPRESSION
,STATS = 5;
Here's the error that I'm getting on MSSQL Management Studio:
Msg 3292, Level 16, State 6, Line 5
A failure occurred while attempting to execute Backup or Restore with a URL device specified. Consult the operating system error log for details.
Msg 3013, Level 16, State 1, Line 5
BACKUP DATABASE is terminating abnormally.
Here's the error that I'm getting on /var/log/syslog:
#015VDI: "C:\binn\BackupToUrl.exe" "b" "p" "680074007400700073003A002F002F0073007700650065007400640061007400610062006100730065006200610063006B007500700073002E0062006C006F0062002E0063006F00720065002E00770069006E0064006F00770073002E006E00650074002F006400610074006100620061007300650073002F0068006300640061006D006F00620069006C0065002E00420041004B00" "73007700650065007400640061007400610062006100730065006200610063006B00750070007300" "01000000D08C9DDF0115D1118C7A00C04FC297EB010000008AB2169DF1DE3A45B5514DCCD09182C3000000001200000061007A007500720065006B006500790000001066000000010000200000008ECF1319A21E667E0E32E83135C57DFCAF4E3DFF2AABDA00E3E2D814B5C88D2E000000000E8000000002000020000000E9E64579DF38EA0E66886B8D454C4F4256A682A124E70D86EC0DA087112ECA0450000000F92ED8FD343DADDE9518C412CA5EAB188316B24A6A0B407CCEA9AE142A9DBC282085ABF133BFDF017A3AFA9CEB4C5039433D15FA47A64A1339F2D030ED3383C58F81A2C3634FA945B6B819F113AB22DF40000000E9CDF76A290F18299BBE99C273FCA31E4622334C645EBFE8C5AA9C4F68C1A323A2F0EED33B8F6E8D5922B5B78DE1F6DB456864A290689C98A3631EA3F62505D3" "NOFORMAT" "4D005300530051004C00530045005200560045005200" "" "DB" "68006300640061006D006F00620069006C006500" "NOTRACE"
#015BackupToUrl: couldn't load process Error Code: 80070002
#0152018-03-14 12:35:25.30 Backup Error: 3041, Severity: 16, State: 1.
#0152018-03-14 12:35:25.30 Backup BACKUP failed to complete the command BACKUP DATABASE hcdamobile. Check the backup application log for detailed messages.
Have you guys had this problem before? Do I need to install any additional package to be able to run Backup to URL on Linux?

Database 'wss_content_1' cannot be opened. It is in the middle of a restore

This is the scenario:
I am testing redundancy and fail over in my dev machine by creating two SQL Servers.
I have created two SQL Servers. One with an extra instance:
-SQL1 : primary server
-SQL2 : mirror server
-SQL2\wtn : witness instance
First I made a full backup of the database and transaction log in my primary server, then I restored the database and transaction log file.
I used option "Restore with no recovery".
In the database node "restoring" is being shown. I believe this is normal when you would like to keep pulling data.
Then in the primary server, I tried to create mirroring on the database. After the wizard completed, I clicked on start Mirroring, but now I am getting the following error:
An error occurred while starting mirroring.
------------------------------
ADDITIONAL INFORMATION:
Alter failed for Database 'WSS_Content_1'. (Microsoft.SqlServer.Smo)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Database 'wss_content_1' cannot be opened. It is in the middle of a restore. (Microsoft SQL Server, Error: 927)
I see there is another post here on stack overflow, but that does not have much information. I have been waiting more than 10 minutes.
Update
I am using SQL Enterprise 2016 by the way. Perhaps there is a difference in 2016 version.
I was watching this youtube video and my steps were exactly as this guy's.
Update 2:
I followed this as well but did not help.
How to: Prepare a Mirror Database for Mirroring (Transact-SQL)

I am trying to backup a database and am getting MSG 3013

I have tried to backup in Microsoft SSMS with the GUI backup task, and it fails after a few seconds, so then I tried running this command:
BACKUP DATABASE databasename TO DISK = 'd:\databasename_full.Bak' WITH FORMAT, MEDIANAME = 'd_datbasenamebackup', NAME = 'Full Backup of databasename';
And get a very generic error of the following
Msg 3013, Level 16, State 1, Line 1 BACKUP DATABASE is terminating abnormally.
I am wondering if anyone has come across this error before. Everything I have read is saying there is a media fault, which I know isn't the case.
There is a Microsoft support page for this Error Message 3013.
It is apparently caused when a filemark in your backup device could not be read. Resolution steps below:
To allow SQL Server to perform new backups to the backup device, you
must manually delete or erase the device by using the following
command:
BACKUP DATABASE mydatabase TO DISK='C:\MyDatabase.bak' with FORMAT

Database Recovery Pending - SQL Server 2014

My server is shutting down because the electrical. And when I opened my database in SSMS, database is recovery pending.
I checked my ERROR LOG, the message are :
4 transactions rolled forward in database 'POSDW' (14:0). This is an
informational message only. No user action is required.
restoreHkDatabase: DbId 14, Msg 41313, Level 16, State 1, The C
compiler encountered a failure. The exit code was 2.
[ERROR] Database ID: [14] 'POSDW'. Failed to load XTP checkpoint.
Error code: 0x82000009.
(d:\sql12_main_t\sql\ntdbms\hekaton\sqlhost\sqlmin\hkhostdb.cpp : 3126
- 'RecoverHkDatabase') Error: 41313, Severity: 16, State: 1.
I already tried to take offline but when I bring online I get error.
Can you guys help me.
Thanks
It looks like corruption. You can try one of the following options:
Restore from existing backup
Try enter the database into emergency mode and run DBCC CHECKDB. according to the results you can see if you can restore the pages from existing backup (in some cases) or run DBCC CHECKDB .
If you have functional replica of the data take the data from there.
Hope this helps.
You were able to move the database files while they were in "Recovery Pending" mode because that status means SQL couldn't open the database files for some reason. It also means it couldn't lock the files as well.
Setting a database to "offline" is similar because it unlocks the underlying files (that's why you can move database files while it's offline).
I'm pretty sure that if you'd try setting all these databases to "online" you'd get the error message you talk about or something similar.
ALTER DATABASE MyDB SET ONLINE
You can use the above statement to try and activate databases that are "offline" or are in "Recovery Pending" mode. If there's some kind of problem, SQL Server will let you know at that moment.
You can also read this thread: How to fix Recovery Pending State in SQL Server Database?

Error while restoring db from Enterprise to BI edition of SQL Server

Every day we restore backups from production on 3 different servers. Same process has been used for months and it always works. Recently we decided to start restoring backups from production server on the 4th server meant for BI. We are however unable to do it as database restores well at first and once the restore finishes database goes into "Suspect" mode and the following message is displayed:
Msg 3908, Level 16, State 1, Line 3
Could not run BEGIN TRANSACTION in database 'DatabaseName' because the database is in emergency mode or is damaged and must be restarted.
Msg 3314, Level 16, State 3, Line 3
During undoing of a logged operation in database 'DatabaseName', an error occurred at log record ID (205933:123232:2). Typically, the specific failure is logged previously as an error in the Windows Event Log service. Restore the database or file from a backup, or repair the database.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
Msg 934, Level 21, State 1, Line 3
SQL Server cannot load database 'DatabaseName' because Change Data Capture is enabled. The currently installed edition of SQL Server does not support Change Data Capture. Either disable Change Data Capture in the database by using a supported edition of SQL Server, or upgrade the instance to one that supports Change Data Capture.
Msg 933, Level 21, State 1, Line 3
Database 'DatabaseName' cannot be started because some of the database functionality is not available in the current edition of SQL Server.
Msg 3314, Level 21, State 5, Line 3
During undoing of a logged operation in database 'DatabaseName', an error occurred at log record ID (205933:123232:1). Typically, the specific failure is logged previously as an error in the Windows Event Log service. Restore the database or file from a backup, or repair the database.
From the error message it looks like we have the problem with one of the log entries, but if this is the case why are we able to restore same backups on different servers?
Our production server from where the backups are coming runs SQL Server 2014 Enterprise edition and has CDC enabled on 4 tables.
Our BI server on which I am trying to restore the backup runs SQL Server BI edition.
Is there any way to bypass this without disabling cdc? Unfortunately we are not allowed to disable this particular feature. I did my reading, but I was unable to find anything helpful.
The only way around that I see is to restore backup on another server, disable cdc and then back up new database and transfer backup to BI server. It more more complicated and hence more likely to break than direct backup transfer. If you see any better way please let me know. Any suggestions will be highly appreciated!

Resources