BACPAC Error from SQL Using Deploy Database to Microsoft Azure SQL DB Task in SQL Server Mgmt Studi

%3CLINGO-SUB%20id%3D%22lingo-sub-478432%22%20slang%3D%22en-US%22%3EBACPAC%20Error%20from%20SQL%20Using%20Deploy%20Database%20to%20Microsoft%20Azure%20SQL%20DB%20Task%20in%20SQL%20Server%20Mgmt%20Studi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-478432%22%20slang%3D%22en-US%22%3E%3CP%3EI%20can%20see%20that%20it%20is%20referencing%20one%20of%20my%20tables%2C%20tblEmployees%2C%20but%20I%20do%20not%20know%20how%20to%20fix%20the%20issue.%20Can%20someone%20help%3F%20Thanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETITLE%3A%20Microsoft%20SQL%20Server%20Management%20Studio%3CBR%20%2F%3E------------------------------%3C%2FP%3E%3CP%3ECould%20not%20import%20package.%3CBR%20%2F%3EWarning%20SQL72012%3A%20The%20object%20%5BGreatDayDatal_Data%5D%20exists%20in%20the%20target%2C%20but%20it%20will%20not%20be%20dropped%20even%20though%20you%20selected%20the%20'Generate%20drop%20statements%20for%20objects%20that%20are%20in%20the%20target%20database%20but%20that%20are%20not%20in%20the%20source'%20check%20box.%3CBR%20%2F%3EWarning%20SQL72012%3A%20The%20object%20%5BGreatDayDatal_Log%5D%20exists%20in%20the%20target%2C%20but%20it%20will%20not%20be%20dropped%20even%20though%20you%20selected%20the%20'Generate%20drop%20statements%20for%20objects%20that%20are%20in%20the%20target%20database%20but%20that%20are%20not%20in%20the%20source'%20check%20box.%3CBR%20%2F%3EError%20SQL72014%3A%20.Net%20SqlClient%20Data%20Provider%3A%20Msg%20195%2C%20Level%2015%2C%20State%2010%2C%20Procedure%20Tbl_Employees_updatemetadata%2C%20Line%2014%20'get_new_rowversion'%20is%20not%20a%20recognized%20built-in%20function%20name.%3CBR%20%2F%3EError%20SQL72045%3A%20Script%20execution%20error.%20The%20executed%20script%3A%3CBR%20%2F%3ECREATE%20PROCEDURE%20%5Bdbo%5D.%5BTbl_Employees_updatemetadata%5D%3CBR%20%2F%3E%40P_1%20INT%2C%20%40sync_scope_local_id%20INT%2C%20%40sync_row_is_tombstone%20INT%2C%20%40sync_create_peer_key%20INT%2C%20%40sync_create_peer_timestamp%20BIGINT%2C%20%40sync_update_peer_key%20INT%2C%20%40sync_update_peer_timestamp%20BIGINT%2C%20%40sync_check_concurrency%20INT%2C%20%40sync_row_timestamp%20BIGINT%2C%20%40sync_row_count%20INT%20OUTPUT%3CBR%20%2F%3EAS%3CBR%20%2F%3EBEGIN%3CBR%20%2F%3ESET%20%40sync_row_count%20%3D%200%3B%3CBR%20%2F%3EDECLARE%20%40nextRowVersion%20AS%20BIGINT%3B%3CBR%20%2F%3ESELECT%20%40nextRowVersion%20%3D%20get_new_rowversion()%3B%3CBR%20%2F%3EDECLARE%20%40was_tombstone%20AS%20INT%3B%3CBR%20%2F%3ESELECT%20%40was_tombstone%20%3D%20%5Bsync_row_is_tombstone%5D%3CBR%20%2F%3EFROM%20%5Bdbo%5D.%5BTbl_Employees_tracking%5D%3CBR%20%2F%3EWHERE%20(%5BEmployee%20ID%5D%20%3D%20%40P_1)%3B%3CBR%20%2F%3EIF%20(%40was_tombstone%20IS%20NOT%20NULL%3CBR%20%2F%3EAND%20%40was_tombstone%20%3D%201%3CBR%20%2F%3EAND%20%40sync_row_is_tombstone%20%3D%200)%3CBR%20%2F%3EBEGIN%3CBR%20%2F%3EUPDATE%20%5Bdbo%5D.%5BTbl_Employees_tracking%5D%3CBR%20%2F%3ESET%20%5Bcreate_scope_local_id%5D%20%3D%20%40sync_scope_local_id%2C%3CBR%20%2F%3E%5Bscope_create_peer_key%5D%20%3D%20%40sync_create_peer_key%2C%3CBR%20%2F%3E%5Bscope_create_peer_timestamp%5D%20%3D%20%40sync_create_peer_%3CBR%20%2F%3E(Microsoft.SqlServer.Dac)%3C%2FP%3E%3CP%3E------------------------------%3CBR%20%2F%3EBUTTONS%3A%3C%2FP%3E%3CP%3EOK%3CBR%20%2F%3E------------------------------%3C%2FP%3E%3CP%3EPROGRAM%20LOCATION%3A%3C%2FP%3E%3CP%3Eat%20Microsoft.SqlServer.Dac.DeployOperation.ThrowIfErrorManagerHasErrors()%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.DeployOperation.%26lt%3B%26gt%3Bc__DisplayClass14.%26lt%3B%26gt%3Bc__DisplayClass16.%3CCREATEPLANEXECUTIONOPERATION%3Eb__13()%3CBR%20%2F%3Eat%20Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action%20action)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.DeployOperation.%26lt%3B%26gt%3Bc__DisplayClass14.%3CCREATEPLANEXECUTIONOPERATION%3Eb__12(Object%20operation%2C%20CancellationToken%20token)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext%20context)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext%20context)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext%20context)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext%20context)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation%20operation%2C%20DacLoggingContext%20loggingContext%2C%20CancellationToken%20cancellationToken)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource%20packageSource%2C%20Boolean%20isDacpac%2C%20String%20targetDatabaseName%2C%20DacDeployOptions%20options%2C%20CancellationToken%20cancellationToken%2C%20DacLoggingContext%20loggingContext%2C%20Action%603%20reportPlanOperation%2C%20Boolean%20executePlan)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage%20package%2C%20String%20targetDatabaseName%2C%20DacImportOptions%20importOptions%2C%20Nullable%601%20cancellationToken)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage%20package%2C%20String%20targetDatabaseName%2C%20DacAzureDatabaseSpecification%20creationDefaults%2C%20Nullable%601%20cancellationToken)%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Management.Dac.DacWizard.ImportDatabase.DoWork()%3CBR%20%2F%3Eat%20Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Ru%3C%2FCREATEPLANEXECUTIONOPERATION%3E%3C%2FCREATEPLANEXECUTIONOPERATION%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-478432%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Backup%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-481024%22%20slang%3D%22en-US%22%3ERe%3A%20BACPAC%20Error%20from%20SQL%20Using%20Deploy%20Database%20to%20Microsoft%20Azure%20SQL%20DB%20Task%20in%20SQL%20Server%20Mgmt%20S%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-481024%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F324625%22%20target%3D%22_blank%22%3E%40MG321%3C%2FA%3Emaybe%20the%20following%20can%20help%20you%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Ff056ac3d-7f12-4bbd-bffa-6fb79598187d%2Fsystemdatasqlclientsqlexception-getnewrowversion-while-importing-bacpac-file-in-to-local-sql%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Ff056ac3d-7f12-4bbd-bffa-6fb79598187d%2Fsystemdatasqlclientsqlexception-getnewrowversion-while-importing-bacpac-file-in-to-local-sql%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-481173%22%20slang%3D%22en-US%22%3ERe%3A%20BACPAC%20Error%20from%20SQL%20Using%20Deploy%20Database%20to%20Microsoft%20Azure%20SQL%20DB%20Task%20in%20SQL%20Server%20Mgmt%20S%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-481173%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F306124%22%20target%3D%22_blank%22%3E%40mbrinkmann%3C%2FA%3E%26nbsp%3BI%20will%20give%20that%20a%20try%20-%20I%20am%20surprised%20based%20on%20the%20date%20that%20it%20isn't%20fixed%20by%20now.%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I can see that it is referencing one of my tables, tblEmployees, but I do not know how to fix the issue. Can someone help? Thanks!

 

TITLE: Microsoft SQL Server Management Studio
------------------------------

Could not import package.
Warning SQL72012: The object [GreatDayDatal_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [GreatDayDatal_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: .Net SqlClient Data Provider: Msg 195, Level 15, State 10, Procedure Tbl_Employees_updatemetadata, Line 14 'get_new_rowversion' is not a recognized built-in function name.
Error SQL72045: Script execution error. The executed script:
CREATE PROCEDURE [dbo].[Tbl_Employees_updatemetadata]
@P_1 INT, @sync_scope_local_id INT, @sync_row_is_tombstone INT, @sync_create_peer_key INT, @sync_create_peer_timestamp BIGINT, @sync_update_peer_key INT, @sync_update_peer_timestamp BIGINT, @sync_check_concurrency INT, @sync_row_timestamp BIGINT, @sync_row_count INT OUTPUT
AS
BEGIN
SET @sync_row_count = 0;
DECLARE @nextRowVersion AS BIGINT;
SELECT @nextRowVersion = get_new_rowversion();
DECLARE @was_tombstone AS INT;
SELECT @was_tombstone = [sync_row_is_tombstone]
FROM [dbo].[Tbl_Employees_tracking]
WHERE ([Employee ID] = @P_1);
IF (@was_tombstone IS NOT NULL
AND @was_tombstone = 1
AND @sync_row_is_tombstone = 0)
BEGIN
UPDATE [dbo].[Tbl_Employees_tracking]
SET [create_scope_local_id] = @sync_scope_local_id,
[scope_create_peer_key] = @sync_create_peer_key,
[scope_create_peer_timestamp] = @sync_create_peer_
(Microsoft.SqlServer.Dac)

------------------------------
BUTTONS:

OK
------------------------------

PROGRAM LOCATION:

at Microsoft.SqlServer.Dac.DeployOperation.ThrowIfErrorManagerHasErrors()
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass14.<>c__DisplayClass16.<CreatePlanExecutionOperation>b__13()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass14.<CreatePlanExecutionOperation>b__12(Object operation, CancellationToken token)
at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan)
at Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage package, String targetDatabaseName, DacImportOptions importOptions, Nullable`1 cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.ImportBacpac(BacPackage package, String targetDatabaseName, DacAzureDatabaseSpecification creationDefaults, Nullable`1 cancellationToken)
at Microsoft.SqlServer.Management.Dac.DacWizard.ImportDatabase.DoWork()
at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Ru

 

2 Replies
Highlighted

@mbrinkmann I will give that a try - I am surprised based on the date that it isn't fixed by now. Thanks.