Error while restoring analysis service db file - ssas

When i am trying to attach Analysis service db file (MDX Step-by-Step.abf)
by running the below commnand.
C:\Microsoft Press\MDX SBS\Setup\Analysis Services\Mdx Step-by-Step.abf
MDX Step-by-Step
IgnoreSecurity
I am getting below error.
Executing the query ... The following system error occurred: The
system cannot find the path specified. . Backup and restore errors:
File 'C:\Microsoft Press\MDX SBS\Setup\Analysis Services\Mdx
Step-by-Step.abf' specified in Restore command is damaged or is not an
AS backup file. Execution complete

This response/answer is for the users who land here while seeking solution to same kind of problems.
First issue mentioned in main post is related to path of '.abf'. It should be path on the machine, where Analysis Server is installed. Specially not on user's local machine, from where most of users connect through SQL Server Management Studio (SSMS) client application.
Second issue mentioned in comments is related to type of project. '.abf' extension is for tabular analysis services project rather than multi-dimensional data warehouse project. MDX queries are for multidimensional projects, whereas DAX queries are for tabular projects.

Related

Exception when starting Snapshot Agent when setting up database replication

I am trying to set up replication between databases. I followed this tutorials:
https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-preparing-the-server-for-replication?view=sql-server-ver15
and after:
https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers?view=sql-server-ver15
I went through first without any problems. Almost completed the second, but I stuck on step View the status of snapshot generation
When I try to strat snapshot agent, I get error:
Exception Message: An unspecified error had occurred in the native SQL Server connection component.
I tried to search on the internet MSSQL_REPL55012 (that's error code I get), but didn't succeed.
I tried to look in SQL Profiler, Jobs history, Replication Monitor, even ran failing job step from PowerShell, but couldn't get any more info on that.
What might be the issue? Anybody else stumbled upon that?
I am using:
SSMS version 15.0.18206.0
SQL Server engine 15.0.2000.5
I finally got it resolved. The issue was missing OLE DB driver.
I just downloaded latest driver. Then I got msoledbsqlr.rll driver in directory C:\Windows\SysWOW64\1033. Then I copied to C:\Program Files\Microsoft SQL Server\150\COM directory, so it can be found by snapshot.exe, which is executable run by Snapshot Agent.
Alternatvely, one can define environmental variable to point to C:\Windows\SysWOW64\1033 direcotry, so it will be found there.
Another issue might be that 64-bit SQL tries to use 32-bit drivers (msoledbsql.dll, msoledbsqlr.rll), but it wasn't issue in my case.
I know this question was answered but for future reference ,updating SQL server 2019 to latest CU solved for me.

Get SQL queries which are executed from SSIS package on SQL Server

I have built a custom job log framework which logs all of the tasks which are execute in an SSIS package along with any error that surface. Once complete, an enhancement was requested to also store any SQL queries that the SSIS package executes on the SQL Server. This is not limited to only Execute SQL tasks, they are looking for ANY SQL queries that the pack runs. I am aware of the OnInformation logging that is part of the SSIS logging framework, but this only shows some of the query.
Thanks in advance!
These is a free software on codeplex which I believe might satisfy your request at: https://sqlmetadata.codeplex.com/
If you need to code it, you should consider that there are two main types for deployed SSIS packages: Legacy mode and Catalog mode.
Legacy Mode deploys pacakges to msdb where you can find using SELECT name, packagedata FROM msdb.dbo.sysssispackages
Catalog Mode uses SSISDB, you can use catalog.get_project to return project_stream which represents a zip file containing the packages in the project. You can refer to How to export packages deployed in "Integration Services Catalog" using any command line, C# or T-SQL?.
After having the packages' XML, you can easily identify which components you want to export.

SQL Server 2012 installation Reporting Services Catalog error

I'm installing SQL Server 2012 at the moment and when I was about to run the installation, this error pops up:
On clicking the first failed test, which is "Reporting Services Catalog Database File Existence", this is what i get:
On clicking the second failed test, which is "Reporting Services Catalog Temporary Database File Existence", this is what i get:
So basically, both of the message box says me that "Catalog Database File" & "Catalog Temporary database files exists". Because of this, i need to select Reporting Services file-only mode installation.
My questions are:
How do i select file-only mode installation?
Do i've to close the setup and do something and afterwards run the setup again?
Btw, I had SQL Server 2012 installed before. I uninstalled it completely due to some strange errors and decided to reinstall a fresh copy of SQL Server 2012 and now I'm stuck with these errors. Any help will be sincerely appreciated. :)
Since you already had one installation of SQL Server done before, there was a database already created. That did not get removed. So when you reinstall, its trying to create the database with the same name, hence, the error. You need to delete the old files to continue the new installation.
From the direcotry
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA
Remove the following files
ReportServer.mdf
ReportServer_log.LDF
ReportServerTempDB.mdf
ReportServerTempDB_log.LDF
Try the Following link for further help.
Reporting Services Catalog Error.
For sql-server-2012 the path is:
C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQL2012\MSSQL\DATA
where MSSQL2012 is the instance name and the respective file names are:
ReportServer$MSSQL2012.mdf
ReportServer$MSSQL2012_log.mdf
ReportServer$MSSQL2012TempDB.mdf
ReportServer$MSSQL2012TempDB_log.mdf
Remove the following files from the C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA directory:
bulletReportServer.mdf
bulletReportServer_log.LDF
bulletReportServerTempDB.mdf
bulletReportServerTempDB_log.LDF.
This happens if you reinstall SQL Server and these files weren't deleted.

SSDT VS2012 migration to Azure Incorrect syntax error

I'm trying to automate the publication of a SQL Server 2008 R2 database over to SQL Azure. I'm using SQL Server Database Tools (SSDT) through Visual Studio 2012 and have been able to get the schema migrated. I've got a separate SSIS package which migrates the data over.
The problem I'm having is that SSDT creates the Azure database as a Web 1GB database, I'm trying to use the following code to convert it into a Business 10GB database:
ALTER DATABASE TestDataase MODIFY(EDITION='Business', MAXSIZE=10GB)
This code works if I execute it in Management Studio however when I put a script into VS and try to build the project I get 3 errors:
SQL80001: Incorrect syntax near '('. Expecting FILE, ID or LOG_ON
SQL80001: Incorrect syntax near 'EDITION'. Expecting '(' or SELECT
I've tried putting the script as a script to be included in build which adds the following error
SQL70001: This statement is not recognized in this context
And putting it as a post deployment script which allow the project to build fine but when I deploy it it fails with the message:
An error occurred while the batch was being executed
Anyone got any ideas where I'm going wrong?
Hope you can help
Thanks
Alex
After doing some more digging and testing I worked out what the problem was. I was connected to the database I wanted to change rather than to the master database. Obviously Azure doesn't allow the USE Database command so I added the script with it's own connection details at the start of the SSIS package which loads the data.
Thanks anyway.

SSAS deployment failed > "File system error: Error opening file"

For a few months we're developing an olap cube on SQL 2005. We deploy this cube on the local server which worked fine until a few weeks ago.
From that moment we got got an error while delpoying the cube.
"Error 1 File system error: Error opening file; \?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\SSAS_Funda.0.db\Dim Bron.0.dim.xml is not a disk file or file is not accessible. 0 0 "
The deployment proces should create these files, but that doesn't happen.
It looks like a permission problem. I check everything but couldn't find the problem. Either on Google I wasn't able to find the answer.
Any ideas?
Cheers,
Aart
I've fixed the problem.
I decided to patch and update SQL server.
I updated SQL server 2005 to SP2 using SQLServer2005SP2-KB921896-x86-ENU.exe and after that I installed a batch of patches which are available in 344806_intl_i386_zip.exe.
Then I followed the following steps which resulted into a succesfull cube generation:
- unprocess all dimensions;
- full process all dimensions;
- unprocess the cube(s);
- process the structure of the cube(s);
- process default the cube(s).
Finally it worked. I think a previous Windows Server 2003 patch or SQL server patch caused security issues on certain users. Like the "Servicce Account" I use all the time.
to fix this in the past, I have deleted the cube from the server and redeployed. This may not be an option in your situation. I would make a backup of the cube before trying this