I cannot restore backup file .bak to another server (SQL Server 2017 ) - sql-server

I try to backup and test restore the database on the different servers but I got the error below
I already using DBCC CHECKDB and there is no error found.
Please help guide me on how to fix this issue.
MS SQL Server Version: MS SQL Server 2017 Cumulative Patch 27
Recover Type: Full
Database Mode: Simple
Restore of database 'New_DB' failed.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.SmoExtended)
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support. (.Net SqlClient Data Provider)
Server Name: WIN-OSJVISIE08A
Error Number: 3624
Severity: 17
State: 1
Line Number: 1

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. Click here to check official update by Microsoft
This issue is fixed in the following cumulative updates for SQL Server:
Cumulative Update 1 for SQL Server 2019
Cumulative Update 18 for SQL Server 2017
As a solution, you can upgrade your current MS SQL Server(where you are getting the backup from) & than you can switch to the another server.
Thanks :)

Related

I/O is frozen on database DBName. No user action is required

We are on Windows Server 2019 on Azure VM, with SQL Server 2019 Enterprise CU4 installed. SQL Server differential backup jobs are failing intermittently.
I have looked into the SQL Server error log and I can see the following error for all databases:
I/O is frozen on database DBName. No user action is required. However,
if I/O is not resumed promptly, you could cancel the backup.
followed by the following error logs:
I/O was resumed on database DBName. No user action is required.
After this error occurs, the differential backup job starts failing with the following error:
Executing the query "BACKUP DATABASE [DBName] TO DISK =
N'X:\MSSQL..." failed with the following error: "Cannot perform a
differential backup for database "DBName", because a current database
backup does not exist. Perform a full database backup by reissuing
BACKUP DATABASE, omitting the WITH DIFFERENTIAL option. BACKUP
DATABASE is terminating abnormally.". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly,
parameters not set correctly, or connection not established correctly.
At this point we cannot take any further differential backups until we have taken a full backup of the database.
I have checked and there is no other SQL Agent job running at that, and I cannot understand why this error is occurring.
I have done some research online and it appears that it was a known issues in SQL Server version 2016, 2017 and 2019 but it has been fixed in CUs for all those versions. The following article talks about this issue and confirms that issue has been fixed in SQL Server 2019 in CU2.
https://support.microsoft.com/en-us/help/4523102/fix-sql-server-database-remains-in-frozen-i-o-state-indefinitely-when
We have SQL Server 2019 with CU4 applied. So all the fixes should be in there from CU2. However, we are still experiencing the I/O frozen issue.
Any pointers or suggestions are much appreciated. Thanks in advance.
Managed to find this article which suggests to make a registry entry to change the behaviour of Azure VM backups and it results in VM Backups not breaking the Differential Backups chain.
The registry entry you have to make is:
[HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\BCDRAGENT]
"USEVSSCOPYBACKUP"="TRUE"
Source: https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-troubleshoot#troubleshoot-vm-snapshot-issues
Article Section: Troubleshoot VM snapshot issues

Problem trying to run SSIS package with Oracle Connection Attunity

I'm having the following issue:
I have an SSIS package that connects to an oracle DB using Attunity Connection Manager.
It does connect in my local pc (to a remote oracle db server) and extracts and all, seems to work.
The problem comes when I load it to SQL server to be run as a Job.
I have ran other jobs so the setup is proper, set to run with 32 bit runtime, loading as a file system type.
but when I try to execute the job it gives the following error:
Executed as user: username. Microsoft (R) SQL Server Execute Package
Utility Version 12.0.2548.0 for 32-bit Copyright (C) Microsoft
Corporation. All rights reserved. Started: 9:39:28 PM Error:
2019-09-27 21:39:28.90 Code: 0xC0010018 Source: Package
Description: Error loading value "
Now, as it runs locally, I believe that it might be related with something in the SQL server where I deploy the package so I'll give some information about the setup and some notes:
When running using the Native OLE DB source from SSIS it works (but I want to use the attunity as I read is faster)
Server version is: Microsoft SQL Server 2014 - 12.0.2548.0 (X64) on Windows NT 6.3 - Microsoft SQL Server Developer (64-bit)
I tried to install the Attunity components from here: https://www.microsoft.com/en-us/download/details.aspx?id=55179 but both in my local computer as in the server I get an error saying that it does's find SQL Server installed, however installation seems to finish succesfully after this screenshot below:
(I do get some error registering dlls:
---------------------------
Microsoft Connector for Oracle by Attunity
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\ENU\AttunitySSISOraAdapters.dll"
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\ENU\AttunitySSISOraConnections.dll"
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\bin32\ENU\AttunitySSISOraAdapters.dll"
---------------------------
An error occurred during registration of:
"C:\Program Files\Attunity\Microsoft Connector for Oracle\50\bin32\ENU\AttunitySSISOraConnections.dll"
---------------------------
and after it
I'm running Visual Studio 2017 Professional 15.9.16 with the following among others:
SQL Server Data Tools 15.1.61906.03120 Microsoft SQL Server Data
Tools
SQL Server Integration Services Microsoft SQL Server Integration
Services Designer Version 14.0.3002.113
Oracle Developer Tools for Visual Studio 12.2.0.1.0 Oracle Developer
Tools for Visual Studio Copyright (c) 2005, 2017
Please let me know if I'm missing information to help pinpoint the problem.
I think I might be missing a component but I don't really know what.
UPDATE: I changed the TargetServerVersion in the package properties from SQL Server 2017 to 2014 (the version I have installed) and I'm getting this error now:
Error: 2019-09-30 17:53:13.20 Code: 0x000002C0 Source: Package Connection manager "Oracle Connector 1" Description: OCI error encountered. ORA-12154: TNS:could not resolve the connect identifier specified End Error
Error: 2019-09-30 17:53:13.20 Code: 0x0000020F Source: Data Flow Task 1 1 Oracle Source [343] Description: The AcquireConnection method call to the connection manager Oracle Connector 1 failed with error code 0x80004005. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error
Error: 2019-09-30 17:53:13.20 Code: 0xC0047017 Source: Data Flow Task 1 1 SSIS.Pipeline Description: Oracle Source failed validation and returned error code 0x80004005. End Error
Error: 2019-09-30 17:53:13.20 Code: 0xC004700C Source: Data Flow Task 1 1 SSIS.Pipeline Description: One or more component failed validation. End Error
Error: 2019-09-30 17:53:13.20 Code: 0xC0024107 Source: Data Flow Task 1 1 Description: There were errors during task validation. End Error
DTExec: The package execution returned DTSER_FAILURE (1). Started: 5:52:41 PM Finished: 5:53:13 PM Elapsed: 32.125 seconds. The package execution failed. The step failed.
UPDATE 2
I have uninstalled all I had and installed only the V3 version of the Attunity Connection Manager, still getting the error from above. At this point I don't know what could be happening.
It works when I run it from my Visual Studio (2017, with all connection managers pointing to the servers) but then when I schedule it on the SQL Server Agent it give the error shown, Also, it does work well when I use OLE DB Manager, the issue comes when trying to use the Oracle Source (from Attunity)
I'm also using the Connection manager set with format: host:port/ServiceName
I'm thinking I might have something badly set on the server? on terms of the Oracle setting? I have the following:
TNS_ADMIN: C:\Oracle\product\product\11.2.0\client_64bit\network\admin
I don't have more set, shall I have something more?
You missed the explanation about getting the correct version for your version of SQL Server, perhaps. Also the part about
Microsoft Connector Version 4.0 for Oracle The Microsoft Connector for Oracle is a set of managed components for transferring data from or to an Oracle database. The component is designed to be used with the Enterprise and Developer editions of SQL Server 2016 Integration Services and will only operate in those environments. To install the component, run the platform-specific installer for x86 or x64 computers respectively. Read the installation topic in the Help file for installation prerequisites and additional information.
Also:
Microsoft Connector Version 5.0 for Oracle The Microsoft Connector for Teradata is a set of managed components for transferring data from or to Oracle database. The component is designed to be used with the Enterprise and Developer editions of SQL Server 2017 Integration Services and will only operate in those environments. To install the component, run the platform-specific installer for x86 or x64 computers respectively. Read the installation topic in the Help file for installation prerequisites and additional information.
Instead, try the Attunity V3 drivers that can be found here:
The error was being caused on the package trying to run in 32 bit mode. I changed the package settings to 64bit and the SQL Agent settings to run in 64 bits and it started running, it works perfect now :)

Getting error message about master.sys.sysclsobjs while converting SQL Server database to Azure

I have SQL Server 2008 R2 (v10.50.2500) and a database with compatibility level SQL Server 2000. I am trying to "export data-tier application" to export this database to MS Azure. And I am getting an error:
Error 0: An error occurred while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlCredential:
Batch Command during reverse engineer failed with Error Code: -2146232060 Line Number: 16 Error Message: Invalid object name 'master.sys.sysclsobjs'.
What should I do to fix it?
Thanks for Larnu's comments:
Azure does not support SQL Server 2000. The oldest version that Azure supports is compatibility level 100; SQL server 2000 is level 80. You will need to ensure updated to an appropriate compatibility before you can migrate it.
Extra note: SQL Server 2008 has about 4 weeks left of support, so I would not be surprised is support for level 100 is removed from Azure not too long afterwards. After you have got to level 100 (maximum on SQL Server 2008 R2), I would look to getting to a higher level again; you should be aiming for a minimum of 110 in my opinion but higher if you can. I don't suggest planning to use level 100 in Azure permanently, as support likely will disappear.
According these comments Larnu provided for us, he(she) pointed out the reason and help you solved the error. You imported a database to SQL server 2012 (on Azure virtual machine) and then successfully exported it to Azure.
Thanks Larnu again.

error Failed to decrypt protected XML node "DTS:Password" and SQL Server Data Tools Standard Edition

I have a SSIS package for getting data from a webservice and insert to the SQL Server(using OLEDB connection with sql user and mu protection level is a EncryptSensitiveWithUserKey).
but I would like to add the agent job on SQL Ad-hoc server by using a filesystem package source.
So, the job agent will execute on SQL Ad-Hoc Server but inside a package will getting data from a webservice and import to another server.
I found error when I execute agent job on SQL SERVER like this:
#
Code: 0xC0016016 Source: trade0010_gg Description: Failed to decrypt protected XML node "DTS:Password"
with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized
to access this information. This error occurs when there is a cryptographic error.
Verify that the correct key is available. End Error Error: 2018-07-10 02:12:22.33
Code: 0xC000F427 Source: Web Service Task Description: To run a SSIS package outside
of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.
End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 2:12:20 AM
Finished: 2:12:22 AM Elapsed: 1.625 seconds. The package execution failed. The step failed.
#
I'm not sure that is a EncryptSensitiveWithUserKey issue or a Data tool Edition issue? because I test another package it's just only insert csv to SQL SERVER Destination by using a agent job(filesystem package source) on SQL Server Ad-hoc and it works.
My Ad-hoc SQL SERVER is SQL SERVER 2017 and Data tool 2017 also.
My Destination SQL SERVER is SQL SERVER 2016 and DATA tool 2012.
Could someone please help me with this problem.
Thank you so much
I'm not sure which error is the issue either, but here is how to deal with them:
EncryptSensitiveWithUserKey: A way to avoid a lot of headaches with sensitive data is to change the encryption level to Don't save sensitive. Then, in SQL Agent, configure the passwords for your connections.
Edition of Integration Services: Make sure that you have standard or enterprise edition installed on the adhoc server (the one that is executing the package via SQL Agent).

Adventureworks restore failed

I've just installed MS SQL Server Express 2014 and SQL Server Management Studio 2014 under Windows 10. I'm following the official Microsoft tutorial on database fundamentals, which uses the Adventureworks DW2008 database. I have tried to restore this dB using the Restore GUI, but it fails every time, as shown here:
AdventureWorks restore failure
I have verified the backup media, but it still fails. I have also restored a different dB, and that worked fine, so I know I am following the correct procedure. I have the file (AdventureworksDW2008Big.bak) in the following location:
C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Backup
Yes, I have thoroughly researched this, but still apologies if there is already an answer on here - I couldn't find it.
The DW in the filename is for Data Warehouse and only works on that edition of SQL Server. As you only installed SQL Express you cannot use it.
Why not try Adventure Works 2014 Full Database Backup.zip instead. If you really need 2008/R2 try the none-DW from here:
AdventureWorks2008R2_Database.zip
AdventureWorks2008_Database.zip
I do not know if it will solve your problem or not,
but I had same problem. I mean I am using SQL SERVER 2017 and I wanted to restore AdventureWorks2012.
I received restore failed error, and I decided to restore AdventureWorks2017. my queries on AdventureWorks2012 in an older system in university led to the same results as my queries in AdventureWorks2017 in my system. if you are using a version of SQL SERVER and trying to restore an older or another version of AdventureWorks, you can try the same way.
I mean restoring a version of AdventureWorks which is the same as the version of your SQL SERVER.
Best to run SSMS as an administrator to avoid access denied errors (do this by right click on SSMS and choose More -> administrator)
copy adventureworksxx.bak into the sql server DATA directory where by
default all databases are usually located. ( Note: if it is in other directory
the restore may not find it OR may cause errors later)
Restore the database

Resources