SMO and Sql Server 7.0 - sql-server

Does anyone have a definitive answer to whether Sql Server Management Objects is compatible with Sql Server 7.0?
The docs state:
Because SMO is compatible with SQL Server version 7.0, SQL Server 2000, SQL Server 2005, and SQL Server 2008, you easily manage a multi-version environment.
But trying to connect to a Sql 7 instance gets me:
"This SQL Server version (7.0) is not supported."
Has anyone been successful in getting these 2 to play nice?

you can use SMO to connect to SQL Server versions 7, 2000, and 2005, but SMO does not support databases set to compatibility levels 60, 65, and 70.
for SQL Server 7.0 the compatibility level is 70
Obviously this is conflicting information...I assume if your compatibility level of your DB is 70 you can not connect.
To check run: EXEC sp_dbcmptlevel 'databasename'
Looking through this link, it seems you might be able to change the compatibility level by running this:
EXEC sp_dbcmptlevel 'databasename', 80
Obviously make a back up before changing anything.

Looks like the docs are wrong (and have continued to be wrong for the last 3+ years!). I found this snippet with Reflector in Microsoft.SqlServer.Management.Common.ConnectionManager, Microsoft.SqlServer.ConnectionInfo
protected void CheckServerVersion(ServerVersion version) {
if ((version.Major <= 7 || (version.Major > 9)) {
throw new ConnectionFailureException(
StringConnectionInfo.ConnectToInvalidVersion(version.ToString())
);
}
}
So, it looks like only SQL 2000 and SQL 2005 are supported. Presumably, SQL 2008 (version 10) has updated SMO assemblies.
Bummer - guess it's back to SQL-DMO for this project.

Just to follow up on your commment SQL 2008 does have its own SMO package which supports SQL 2000, 2005 and 2008 which is actually definitively documented on their download page! And you're right you can't connect SQL 2005 SMO to SQL 2008.
There are some nice updates updates in Version 10 of the SMO in that if you access properties that do not existing on the version of SQL that you are connect to you get a sensible "This property is not available on this Version of SQL" exception or words to that effect.
Microsoft SQL Server 2008 Management Objects
The SQL Server Management Objects (SMO) is a .NET Framework object model that enables software developers to create client-side applications to manage and administer SQL Server objects and services. This object model will work with SQL Server 2000, SQL Server 2005 and SQL Server 2008.

Sorry for the late answer... there is partial support for SQL 2000 and SQL 7

Related

Does my sql code go unavailable when I upgrade my SQL Server from 2008 to 2014?

I have a server running SQL Server 2008 Enterprise version which has a lot of SQL Codes and I want to upgrade it into SQL Server 2014 Enterprise version. But I don't know what will happen after I upgrade the SQL Server. Will there any SQL Code go unavailable/error? Will it run correctly after upgrading?
SQL Server 2008/2014 is a tool. It has got nothing to do with data/procedures/views etc. Data for SQL Server is stored in the form of .mdf files. So, no, your data or procedurers wont be touched. But yes lot of features are going to be deprecated in SQL Server 2014 when compared to SQL Server 2008. Full list is here. You should go through the list and find a suitable replacement for every deprecated item before migrating.

Upgrade Pubs and Northwind Databases Failed in Visual Studio 2013

I'm using VS Ultimate 2013 and SQL Server 2014 Standard. I try to upgrade Pubs and Northwind databases but the operation fails with the following snapshot:
Besides that, I followed paths introduced in some corners of the net but I got no interesting results. What should I do?
Thanks
Update[Problem solved by #marc_s]:
The SQL Server 2012 Northwind database version bypassed the obstacles I had. Here's the link: http://businessimpactinc.com/install-northwind-database/
The error says
User instance flag is not supported on this version of SQL Server
You seem to be trying to use
User Instance=true
in your connection string, but that is supported exclusively in SQL Server Express - no other edition (and therefore, it's not supported on SQL Server Standard).
You will need to attach the .mdf files (or run the creational SQL scripts for those two databases) on your server instance¨and then connect to those database on the server

Does FluentMigrator work with SQL Server 2014

Does Fluent Migrator not support SQL Server 2014?
I am getting below exception -
“The major version of the database server could not be determined or is not supported by FluentMigrator.”
Update: As of 2014-12-31 Fluent Migrator does support SQL Server 2014.
No, As of today (15.Dec.2014) Fluent Migrator doesn't support SQL Server 2014 version.
You can verify it in below wiki page.
https://github.com/schambers/fluentmigrator/wiki/Supported-Databases
Both yes and no. There is no explicit support yet but for 90% of features, it is the same code for Sql Server 2005, 2008, 2012 and 2014. If you specify the provider (see Command Line options here) as Sql Server 2012 then your migrations should work.
migrate --configPath "WithConnectionString.config" -conn "Test.Connection" --provider sqlserver2012 --assembly ".\Migrations\bin\Debug\Migrations.dll"
New features in Sql Server 2014 will not be supported but at this stage every new release of Sql Server contains few new features that affect FluentMigrator. For example, the only new features that Sql Server 2012 introduced and that affected FluentMigrator were sequences and clustered indexes. Here is the Pull Request for Sql Server 2012.
If there is a feature from Sql Server 2014 that you want support for then create an issue on Github!
EDIT: I installed Sql Server 2014 and tested that it works with the provider set to SqlServer2012. And it does!

Upgrade SQL Server database

I used to have SQL Server 2008, I have upgraded to SQL Server 2012. However, when I go to attach a database, in this case AdventureWorks 2012, it won't let me attach it and says that it can't attach a 706 version because it only supports 661 and earlier.
I assume the server is still 2008, even though the application says 2012. I have run the SELECT ##VERSION, and it confirms that it is a 2008 database, I just don't know how to upgrade this server to 2012. I want to be able to open/attach new databases.
Any help would be great.

SQL Server version 612 , 655?

I have SQL Server 2008 and VS2008 installed on my computer and I am trying to run a web application I've created on a computer which has SQL Server 2008 and VS2008 and VS2010 beta 2 with its SQL Server Express.
I am getting an error with the database version that is
"...aspnetdb.mdf" cannot be opened because it is version 655. This server supports version 612 and earlier...."
Configuring the database in Visual Studio ->Tools -> Options -> Design-Time Validation Database is not working since I don't have the SQL Server version comes with VS 2010.
EDITED : I also edited aspnetdb and inserted a few more tables so I need the same aspnetdb
Is there any solution to convert this db ?
Also, after fixing this, I am looking forward to upload it on my hosting which has SQL Server 2005 DB and configure it in PLESK.
The SQL Server databases have a version specific format. Each SQL Server runtime version (SQL 2008 SP1, SQL 2008 RTM, SQL 2005 SP2, SQL 2005 SP1, SQL 2005 RTM etc) knows how to upgrade to its own verison. Unfortunately, once upgraded the database cannot be downgraded. So if your MDF was upgraded to version 655, it cannot be downgraded to any prior version. If you know you're going to deploy on SQL Server 2005, you must develop on SQL Server 2005 too. Not only that, but the actual build number of your development has to match the build number of the deployment (or at least be lower than that): the SP level and CU level must match.
You can a attach the 2008 version MDF you created to a SQL Server 2008, script out the database content, then import the script into a SQL Server 2005 database of the proper version.
I had this problem and when I changed my_computer_name\SQLEXPRESS with . to connect to server and it works and I could attach MDF file
may be you have both services run. (Mssql2008 and mssqlexpress) Maybe you have runing the mssqlespress running, that's the error that you have. Try to stop the mssqlserver express service and run mssql2008 services, and attach again your databases. I try this and works for me

Resources