invoke_ascmd on sql server 2012 - sql-server

I am trying to create a local cube through an SSIS task. With earlier version of sql server I used ascmd. I could not find ascmd for sql server 2012, so I used invoke-ascmd. However when I use the -Server option to point to the local cube, it errors out with the message:
Warning WarningCode="-1055653884" Description="Errors in the met adata
manager. Either the database with the ID of '' does not exist
in the server with the ID of '\LocalCube', or the user does
not have permissions to access the object." Source="Microsoft SQL
Server 2012 Analysis Services"
Does anyone know how to resolve this?

This appears to be happening only when I migrate projects from sql server 2008. Simply migrating the analysis server project, and changing the connection string values in datasource,building,deploying and recreating the xmla script does not seem to be enough.
I need to actually go to the analysis server project delete the cube, data source etc. and recreate them and then recreate the xmla script.

Related

SQL Server - import bacpac file of Azure SQL database to SQL Server 2014 on Virtual Machine

We are moving our Azure SQL Database to SQL Server 2014 on an Azure Virtual Machine. I created a bacpac file of the Azure SQL Database.
Upon trying to import the bacpac into the SQL Server on the VM, I'm met with the following error:
Could not import package. Warning SQL0: A project which specifies
Microsoft Azure SQL Database v12 as the target platform may experience
compatibility issues with SQL Server 2014. Warning SQL72012: The
object [NegativeMedia_Prod_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
[NegativeMedia_Prod_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
7738, Level 16, State 2, Line 1 Cannot enable compression for object
'Captures'. Only SQL Server Enterprise Edition supports compression.
The way I see it, I have two options:
Upgrade SQL Server on the VM - a little scary to me based on the fact that we have existing data there. Is the upgrade process somewhat straightforward? Based on this: https://learn.microsoft.com/en-us/sql/database-engine/install-windows/upgrade-sql-server it sure looks like anything BUT straightforward.
Figure out a workaround to get this database imported into SQL Server 2014. As far as the compression part goes, I can turn that off in the Azure SQL database and recreate the bacpac file. The rest of the error message then is what I would need to "work around" but I don't fully understand its meaning.
Whichever of the two above options can be achieved in the least amount of time is what I need, in order to keep the boss happy. Please let me know if anyone has any suggestions on either.
Upgrade from SQL Server 2014 to SQL Server 2016 was a quick and painless process. It's certainly come a long way. I have upgraded and have now successfully imported the bacpac file.

Can't create a SSISDB catalog due to missing SSISDBBackup.bak file, even though SSIS is installed

I've downloaded SQL Server 2016 standard edition trial along with SSDT in order to test what one can do with a standard edition in SSIS, SSRS, and SSAS.
I also wanted to know whether standard version's SSISDB logging capabilities differs from the one in Enterprise. For this I wanted to create an SSISDB catalog under Integration Services Catalogs in SSMS.
When I try to do this, however, I get the error saying that
The catalog backup file 'C:\Program Files\Microsoft SQL Server\130\DTS\binn\SSISDBBackup.bak could not be accessed. Make sure the database file exists, and the SQL server service account is able to access it
From googling this issue it appears as this message shows up whenever someone doesn't have SSIS installed, but I have SSIS on the machine, I've even made a small Project and executed it from within SSIS without any issues just to verify.
I have set this up on localhost where I am the admin. Does anyone have any ideas why this won't work?
Regards,
Cenderze
To check if SSIS installed, open Sql Server Configuration Manager, in the SQL Server Services, is something like 'SQL Server Integration Services 13.0' running?
Experienced this error message on MS SQL Server 2017.
Resolved by launching MS SQL Server 2017 install media, added Integration Services feature.
After successful installation, when back into SSMS, right-click on Integration Services Catalog for Create Catalog... option.
You will be asked for an encryption password to create the new SSISDB.
Hope this helps!
I faced with this error when I used lower version of SSMS than SSIS. Check if you use proper version of SQL Management Studio.
You need to go back to the SQL Server installation and check the integration services checkbox.
The issue is because SQL Integration services is not installed properly with the existing SQL Server you are using.
you can check if SQL Integration services are installed or not by,
Opening --> SQL Server Configuration Manager--> SQL Server Services --> Check if "SQL Server Integeration Services is there"
if its there and if you still get the same issue try re-installing.
Else install the SQL Integration services to your existing SQL Server.
The detailed step to installation is given in this link : https://www.mssqltips.com/sqlservertip/6635/install-ssis/
hope this helps !!

How to migrate a database that uses master db stored procedures to Azure?

We have a sql2k8 database that uses sp_xml_preparedocument, a master db system extended stored procedure, that needs to go to Azure. The migration tools (SSMS2016 wizard) give a validation error: SQL71501 that [dbo].[sp_xml_preparedocument] is a missing reference, when validating the export.
I can't see any way to reference the sp so it can be migrated. Intellisense always shows an error too.
Could you first verify that your code works fine on Azure SQL when you manually execute the scripts? When I execute queries with sp_xml_preparedocument from MSDN on my Azure SQL Database it works fine.
If your code works, then it is a problem in SSMS migration assistant, so in that case you should report bug on SQL Server Connect site, with some minimized repro script, so SQL Server team can fix it.
Use SQL Server 2016 Enterprise with Service Pack 1 (x64) . The SP1 should support Azure DB . The 2012 version of Sql server might do iT.

restore a sqlserver 2005 database into sqlserver 2012

I have a db running on an instance of sqlserver 2003, Ive tried to import it into sqlserver 2012 but that wont work it's says it's to old.
so I've imported it into sqlserver 2005, I have then backed it up again and tried to import it into sqlserver 2012 but it comes up with the same error.
I can restore other db's from sqlserver 2005 so I can only presume its keeping its 2003 settings when I back it up.
Can anyone help
I suspect that your database might have some deprecated functionality that prevents your upgrade from working.
There's a list of deprecated functionality between SQL Server 2000 and SQL Server 2005 on technet.
I would strongly advise you to use the SQL Server 2005 Upgrade Advisor to identify such functionality, and address any potential issues. Then, and only then you should have a database compatible with SQL Server 2005, and can (hopefully) proceed from there.
if u want database structure only then take database script then run into sql server 2005, if u want database with data also mean
right click the Database go task
click Generate Script
There Two options entire database or with specific objects
entire database for DataBase structure only
with specific objects - select all objects then click Next you find the Advance button then click it.
scroll down and Find Type of Data Scripts click and change to Schema and data then you will save as file file or new query window
this is one of the method to restore the database.
Set your compatibility level to (90) Sql server 2005 in your database properties after restoring.

How do I move data between databases using different version of SQL Server Management Studio?

I have a database deployed on a testing machine and a production machine. There is some data (columns of a table) in the testing database that I would like to copy over to production.
When I try to restore a backup onto the production box I get the following error:
System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running version 10.00.4000. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)
Is there an alternate way to get the data into the table?
This answer ONLY if you need the data (from here: http://sqlserverlearner.com/tag/the-database-was-backed-up-on-a-server-running-version-10-50-1600-that-version-is-incompatible-with-this-server):
Script the object you want (table and data) under tasks, generate scripts, select the object, and make sure to include all the data (possibly the schema as well). Take this to a new query window and save the SQL file, then execute it on your other server.
You could
Generate INSERT statements for the data in question
Create a linked server from the test to the other server and run sql statements against that
Upgrade the target server to 2008 R2 (this is not something to take lightly)
You should keep your environments at the same version / rev. SQL Server restores are not backward compatible.
Use generate scripts with data, you can select the version of MSSQL. Then run the outputted SQL on the server you want it.
Ideally you'd upgrade your production server to match your test environment, otherwise your tests may not always be representative.
If they are different versions though, you can't restore a database to an older version of SQL server, you should either use the generate scripts command to create the new table and insert the data, or use a tool like SQL compare/Data Compare from RedGate which will do all of this for you.
This is the problem with the sqlserver version mismatch while restoring the database. It means It couldn't possible to restore the database server 2008 to 2005. It wouldn't support higher version to lowerr version.
The following options are available,
You can link the servers and move the table from one server to other server
Generate the sql script and execute in the target database
Use the below URL to generate the insert script and execute generated script into target server.
http://www.codeproject.com/Articles/5598/Generating-INSERT-statements-in-SQL-Server
you can use redgate toolbelt tool kit to sync data between different version of sql server or sql server to sql azure or sql azure to sql server database . it is very very easy to use .

Resources