SQL Server Compact 4.0 SSRS 2014 - reporting-services

I'm trying to use a SQL Server Compact database as a data source for SSRS which was installed with SQL Server 2014.
I followed the answer provided here.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e827cb19-82ec-49c6-a274-addb5b382ee3/can-ssrs-2008-use-sql-server-compact-35-as-datasource?forum=sqlreportingservices
I am able to see SQL Server Compact as an option for Data Sources.
SQL Server Compact 4.0 is installed. However, when trying to use the data source to create a data set, I get this error:
The linked to post above is in reference to SSRS 2008. Is this possible with more current versions of SSRS?

Related

How to attach database in SQL Server 2008 which was created in SQL Server 2012

I have two database files named as .mdf and .ldf which are created in SQL Server 2012 and now on my pc I installed Visual Studio 2010 and SQL Server 2008 Express.
When I try to attach these database files to SQL Server 2008 it gives me error.
The database 'C:\PROGRAM FILES\MICROSOFT SQL
SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\CMS_DB.MDF' cannot
be opened because it is version 706. This server supports version 655
and earlier. A downgrade path is not supported.
Could not open new database 'C:\PROGRAM FILES\MICROSOFT SQL
SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\CMS_DB.MDF'. CREATE
DATABASE is aborted.
An attempt to attach an auto-named database for file C:\Program
Files\Microsoft SQL
Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\CMD_DB.mdf failed. A
database with the same name exists, or specified file cannot be opened,
or it is located on UNC share.
When open database in ssms 2008 then error :
Attach database failed for Server 'MATRIX-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo)
Additional information:
An exception occured while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The database 'C:\USERS\RAJ\DESKTOP\COLLEGE MANAGEMENT SYSTEM(.NET 4.5)\ COLLEGE MANAGEMENT SYSTEM\BIN\DEBUG\CMD_DB.MDF' cannot be opened because it is version 706.
This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'C:\USERS\RAJ\DESKTOP\COLLEGE MANAGEMENT SYSTEM(.NET 4.5)\COLLEGE MANAGEMENT SYSTEM\BIN\DEBUG\CMD_DB.MDF'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 948)
No, you can only move forward.
This means, you can restore the database from 2005 or 2008 to 2012 version but can not do it in reverse order. The next most popular question I receive is if we can’t restore a SQL Server 2012 database to earlier version what is the next best option?
I have personally faced this issue once before and I had manually created T-SQL script using Script and Data Generator Wizard in SQL Server 2012 and rebuild my database in
SQL Server 2008R2. If you have many different databases which you want to address, you can use SSIS to
automate the script generation.
As noted if you want to access a 2012 db from 2008 you will have to migrate the database back to 2008. This will only be possible if you have not used 2012-specific features in the db. If you have and still want to perform the migration you should first try and identify these where they occur and fix those first.
As noted above one option is to generate T-SQL scripts and use these to regenerate the db in 2008. However for a large db this could be time consuming and hard work to get to actually work.
A better option than using the SSMS scripting wizard is to use a similar tool available on Codeplex called SQL Database Migration Wizard - http://sqlazuremw.codeplex.com/releases/view/32334. You want the latest version v4.x to work with SQL Server 2012.
The tool is originally intended to be used for migrating databases between SQL Server and Azure. However the tool works just as well between SQL Server 2012 and SQL Server 2008. The trick is to set SQL Server rather than Azure as the target in the advanced options.
The reason this is a better option than the SSMS scripting wizard is that it uses BCP for the data transfer rather than TSQL and so is much more efficient. I migrated a 7GB database in about 2 hours with this with most of the time spent drinking tea while the machine worked away. Importantly, it all just worked with no requirement for me to start editing files to fix problems like too many commands, timeouts etc.

Error when restoring database to a new server

I receive the following error when I try to restore a database to SQL Server 2008 from SQL Server 2008 Express R2:
The database was backed up on a server running version 10.50.2500.
That version is incompatible with this server, which is running 10.00.4064.
Either restore the database on a server that supports the backup, or use a backup
that is compatible with this server.
Is there anything that I can do to fix this or am I stuck using SQL Server Express?
You cannot go "back" in SQL Server versions - if your database is on 2008 R2 (v10.50) - you cannot back it up and restore it onto a 2008 (v10.00) version.
There's no trick, no workaround, no hack - it just cannot be done - period.
So you either need to upgrade your target system to 2008 R2 as well (Express will do, as long as the size is below 10 GB), or you need to script out structure and data to .sql files to run those on your "old" 2008 system (possibly using third-party tools like Red-Gate SQL Compare / SQL Data Compare to create those scripts and possibly run them against the target server directly).

LinqToSql - Necessary to generate .dbml for each SQL Server version?

I'm developing an application that needs to operate against SQL server 2003, 2005, and 2008. I'd like to transition from using T-SQL stored procedures to using Linq, as we currently don't have a database programmer, and thus making any fixes or adding any features is a slow, difficult process. In contrast, working with LinqToSql in other projects has been a breeze.
Will a .dbml file generated against SQLServer 2008 work if used against previous versions of SQL Server, assuming the table structures are the same?
As we already have to support three slightly different database schemas, having to generate a DataContext for each SQL version, along with our additional data layer functionality, would be a showstopper.
SQL Server 2005, 2008: No problems.
SQL Server 2000, 2003: Issues with server side paging (.Skip(), .Take()), but other than that, no.
I am developing on a SQL Server 2005 and hosting the live system on a SQL Server 2008 without any hiccups.
You will experience problems with anything earlier than SQL Server 2005 and LINQ to SQL's implementation of .Skip() if you were ever to use it, as LINQ to SQL translates it to ROW_NUMBER in T-SQL - and this is only a part of SQL Server 2005 and onward.
See this related question: Which versions of SQL Server does LINQ to SQL support?

Using Visual Studio 2008 DBPro to convert database from Sql 2005 to Sql Server 2008

I have a DBPro database project that was created for Sql 2005. I am trying to build this on a different environment, with Sql 2008, and I am getting the following error:
MSBUILD : Build error TSD158: An unsupported target database version was encountered.
I couldn't find much on this error, and I am unclear what is the conflict. I have tried to change the buildversion element in the database project from 9.0.21022.8 to 10.0.0.0 but that didn't make any difference. I am out of ideas. Any thoughts?
To target SQL Server 2008, don't you need some GDR update? See http://blogs.msdn.com/gertd/archive/2008/11/25/visual-studio-team-system-2008-database-edition-gdr-rtm.aspx
Also, it might be easier to take your database, restore it on SQL Server 2008 (and let the database upgrade the database itself). Then just start a new project where you suck down the schema. But I still think you'll need the GDR in order to do that.

How to move SQL Server 2008 to the cloud?

I have a large (~40gb) SQL Server 2008 database that I would like to move to the cloud.
The database uses a lot of SQL Server 2008 specific (and non-specific) features (SQLCLR, xml, indexes, partitions, etc). Thus, my preference would be to use the exact database, but in the cloud.
What are my options? The new SQL Azure only allows small databases, and a subset of TSQL. I want to whole thing. I would still like to connect to it using Management Studio.
If you want "the whole thing" and want to be able to connect to your SQL-Azure store with SSMS, you'll have to wait until SQL Server 2008 R2 (a.k.a. SQL Server 2010) is out - sometime in 2010.
The SQL Server 2008 R2 November CTP has just had such an announcement - the SSMS for that version will be supporting SQL Azure.