Any reason to have SQL Server 2005 and 2008 installed on same machine? - sql-server-2005

I'm setting up a new development server and want to install the latest version of SQL Server 2008 Express.
Will our existing sql2005 databases work with 2008 without modification?
If so is there any reason to install both versions on the same server?

I haven't actually tried migrating a 2005 database to 2008, but generally SQL handles this cleanly and without difficulty. The simplest way to do it would be to make a backup of your database from SQL 2005 and then restore that backup with SQL 2008.
If you want to keep the SQL 2005 copy around and online until you know that the 2008 copy is working, you might need to move the data/log files for your database when restoring the backup onto 2008, since the old data files will be in use by 2005. You can do this using the with move option of restore database, for example:
RESTORE DATABASE mydb FROM disk = 'c:\backupfile.bak'
WITH MOVE 'maindatafile' to 'c:\newdatalocation.mdf',
MOVE 'mainlogfile' to 'c:\newloglocation.ldf'
As to having both installed at the same time, one reason you might decide to do this would be to simplify the job of testing code against both versions, if you were intending to have your software support talking to both versions.

You can detatch a 2005 database and attach it to a 2008 server. I would recommend against installing both on the same machine unless you must (e.g. you're writing code for a third party and they only use 2005).
What I'd highly recommend is using windows server 2008 hyper-v to create 2 virtual machines one with the 2005 environment, the other with 2008. Hyper-v virtual machines are incredibly faster than Virtual server 2007.

The databases should (should!) work unmodified. However, for development it is preferable that you have sql2005 to test your scripts unless you assume all your clients would upgrade to 2008 as well, since 2008 has features that do not exist in SQL Server 2005.

In dev and test environments, having multiple database servers installed is not a problem and can reduce the number of test servers required.
In production, I wouldn't recommend it due to the fact that multiple buffer pools fight and kill your performance.

To me the important thing is will you have prod instances that are 2005 databases? Will you have to support reporting services reports that are on a prod server that only has the 2005 version of reporting servives, etc?
If so, you should have both the 2005 and the 2008 versions on your development machines. I've seen a lot of code that had to be thrown out because developers worked on 2008 when prod was 2005. ALways develop against the version of the software you will have in prod. If you are converting to 2008 but not there in prod yet, you need both, one for maintenance changes and one for future stuff.
Personally I have SQL server 2000, 2005 and 2008 on my machine because we haven't converted everything yet and I have some things which can only be done on the older version. We have found the key to maintaining multiple versions is to install them i nthe correct order. It seems to go badly if you put 2008 on first and then the older versions.

Sometimes you need to be able to test on multiple versions, or you may need 2005 for one thing and 2008 for another.
Sometimes you maintain several different apps, some of which are on one and some on the other, and you haven't updated everything yet. Sometimes you're upgrading, and need to test on both versions during the upgrade. Sometimes you support several different customers, some on one version and some on another. Sometimes you want to upgrade your internal apps, but you're using a software package that is only certified on an older version.
There's lots of reasons.

Related

SQL Server - Sharing database over different boots on local machine

Suppose I have 2 bootable partitions on my local machine with Windows 7 running SQL Server 2008 R2 on one and Windows 8 with SQL Server 2012 on the other.
Is it possible to run/attach the same database (created under SQL Server 2008 R2) on both versions of Windows so if I boot up Windows 7 I can run my application against it. And if I run up Windows 8 I can run my application up against that? Would there be any issues if I tried it - i.e logins?
Thanks,
Andez
No, that won't work.
As soon as your SQL Server 2012 version would access one of the database, it will upgrade it to the latest internal database version for the 2012 version.
And once that's happened, the SQL Server 2008 R2 cannot use that database file anymore.
The best solution for this would be to put the database on a separate server which you can access from both your partitions - and consolidate on one SQL Server version (preferably 2012). The other obvious option would be to install the same version of SQL Server on both partitions.
Everything is stored within database, so no you will not have any issues. Just remember to use not only main application database, but use the same meta-databases (aka System dbs).
In fact it works this way on failover clusters.
EDIT:
Haven't noticed you are going to run 2 different db systems. I would recommend you to use exactly the same versions of SQL server.

Export SQL database (all tables) from remote server

I'm current using a 3rd party product, which uses an SQL Server database. I've been asked to take a copy of the database for our own backup/security purposes, but I'm having trouble.
To access the database I'm currently logging into one of my companies servers using remote desktop, where SQL Server 2005 Express is installed. Using that instance of SQL Server I then connect to the 3rd party's SQL server.
when I execute Tasks -> Back Up..., it appears to work, but the files are stored locally on the remote SQL Databases server, which my IT teams tells me is expected.
I tried using Tasks -> Generate Scripts... but the option to "Script Data" isn't available, either because it's SQL Server 2005 Express, or because the database is remote (not sure which, but probably one of those).
I've tried other things that I can't recall at the moment, and I'm out of ideas.
Can anyone suggest something that will let me get a 'local' copy of the remote databases table structure AND data?
The Generate Scripts wizard is unavailable because you are using a very old version of Management Studio Express. The 2012 version will work just fine against 2005 instances, but there is no longer an Express edition anyway, because all of the SSMS features are now available without any license.
Download the latest versions here:
https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
I list downloads for the older versions at the bottom of this post:
https://blogs.sentryone.com/team-posts/latest-builds-management-studio/
Backups do generate locally. That is to be expected, as your team has already told you. You can generate it locally and then download it with a tool such as an FTP client. I highly recommend Redgate tools. See http://www.red-gate.com/products/dba/sql-backup/ It's a great tool and has some network backup options built in to ship your backups elsewhere. If it's a one-time thing, Redgate also has tools for that too, e.g. SQL Compare and SQL Data Compare.
The solution you pick really depends on how frequently you have to run and download backups locally and how big the DB is.

Will SQL Server Express work with a database made in regular SQL Server?

I was wondering if we could backup the database that we currently host on regular SQL Server, and put it onto our clients computer when we setup SQL Server Express for them.
Is this possible?
Thanks,
Matt
Yes, it's possible to restore a database backup from the Standard edition to the Express edition. It's not possible to restore a SQL Server 2008 to a SQL Server 2005 version, though.
However, there a some minor differences between versions. I've noticed an issue in SQL Server Express 2005 when calling .NET SQL CLR functions across databases, so your mileage may vary. I haven't been able to find a good overview of the exact differences between the various SQL Server editions.
It's always best to keep the development platform as close as possible to the release platform. I can only recommend that you use the Express edition of SQL Server for development as well; and re-test your application.

Do I have both SQL Server 2005 and SQL Server 2008 installed?

When in 'SQL Server Configuration Manager' I see, under 'SQL Server Services', 2 items that look like SQL Server's:
SQL Server (sqlexpress)
SQL Server (mssqlserver)
Does that mean I have 2 versions installed at the same time? The 'SQL Server (mssqlserver) is currently stopped).
You have two instances. They might or might not be the same version (meaning 2005/2008).
Express is just an SKU / edition from the myriad of different editions.
You can have the same version or multiple versions/SKUs installed as different instances on the same machine.
So unless someone wittingly set up a new instance with the name "sqlexpress", you probably have two kinds of products installed (both can be 2008 or both can be 2005 or they can be different - it is just that one of them is presumably the Express SKU while the other is say Standard.)
You can get more information on the instances by using ##VERSION.
It looks like you got SQL Server Express installed with Visual Studio and then later installed SQL Server 2008. I've done this before and the best solution I found was to completely uninstall SQL Server Express and SQL Server 2008. Remove all the files in the Microsoft SQL Server directory in Program Files, then reinstall SQL Server 2008. If you still have problems getting the 2008 instance to be the default, you may also need to uninstall Visual Studio.
In the future, if you're going to install the development (or other) version of SQL Server locally, I suggest making sure you install it before Visual Studio. The VS install won't install SQL Server Express if it detects an existing SQL Server instance on the system.
BTW, you can verify if this is true by using the Add/Remove Programs Control Panel item.
SQLExpress is the light/free edition, usually used for developers or very lightweight applications.
MSSQLServer is the full blown SQL install.
So yes you have 2 "SQL Server" installs, but they are different products, I can't say which versions based on your provided data.
You have two SqlServer instances installed on your system. One is SqlServer Express Edition and the other one a Sql Server. I can't say which version or edition.
Maybe you can find some more information in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft).
I'd vote against removing either one--SQL server does fine with multiple instances and they are good for different things. For example, lots of open source projects presume a local copy of sql express at .\SQLEXPRESS for development use. Whereas you can't write analysis service stuff with SQL Express.
Or, its not a problem. Those aren't the droids your looking for. Move along.

Syncing SQL server 2000 with 2005 -- will DTS still work?

we have a local staging server running sql server 2000 and a remote public version also running sql server 2000. The remote version will be upgraded to 2005 and I am wondering if the DTS packages we have in place will continue to function between the two machines?
If not, what would be the simplest, most efficient way to sync between the two?
We will not be upgrading the local server, and the upgrade of the remote one will be taking place very soon (not in our control).
Thank you!
If your DTS packages reside on the local server, there shouldn't be an issue (aside from obvious changes to SQL itself (I.E. the old-school joins not working anymore)), and in fact, I've even seen developers save DTS packages on SQL 2005 databases though I'm sure it's not a very good idea.
EDIT: It might also be worthwhile to check out this link for the tools to design/modify DTS packages with SQL Server Management Studio.