I want to setup mirroring between 2 copies of SQL server. The primary box is SQL server enterprise edition.
Can I mirror it to a SQL server standard edition? The purpose is to save a metric ton of money.
From Books Online:
The two partners, that is the principal server and mirror server, must be running the same edition of SQL Server. The witness, if any, can run on any edition of SQL Server that supports database mirroring.
That being said, it is possible to set it up as long as you use TSQL commands and not the GUI. I would never recommend it, but it is possible, as long as you guarantee you're not using any Enterprise features. More warnings HERE and HERE.
Last edit - apparently this has been completely blocked in SQL 2012. Looks like you're out of luck.
Related
After seeing a lot of things in the internet I haven't found any explanation between the two file types: .mdf and .sdf.
.sdf would be a compact version of SQL Server (.mdf) I believe. Still they appear utterly different.
Have followed the two tutorials on msdn, i.e. MVC Movie App and the Musicstore. Both use .sdf.
Partial quote (full): 'First of all it should be "|DataDirectory|ASPNETDBContext.mdf" (notice the extension difference). Your applic...'
Both tutorials have the connection string to .sdf, i.e.:
<add name ="MovieDBContext"
connectionString ="Data Source=|DataDirectory|Movies.sdf"
providerName ="System.Data.SqlServerCe.4.0"
/>
<add name ="MusicStoreEntities"
connectionString ="Data Source=|DataDirectory|MvcMusicStore.sdf"
providerName ="System.Data.SqlServerCe.4.0"
/>
Question:
My question is what to use where and when? More over why to use which where.
SQL Server Compact (sdf files) popular in Windows phone for storing some data (small count of data), also it could be used in web sites, but it has poor performance, even SQLite is better.
SQL Server (mdf files) used in big sites with a lot of data. Its more powerful, but cant be used in phones and must be installed on servers.
Look this: Comparison of SQL Server Compact, SQL Server Express 2012 and LocalDB
SQL Server Compact Edition is indeed quite different from "regular" SQL Server.
SQL Server CE is a stand-alone, one-user database that gets loaded by your application on the machine where your code runs; it has all data in the one single .sdf file and support only a small subset of the "regular" SQL Server (and its features). SQL Server CE is great for simple, stand-alone, one-user apps (like phone apps).
"Real" SQL Server is a server product - you install it on a server, your clients only connect to it (typically, the client machines don't have SQL Server itself installed). It's a full-blown RDBMS with everything - stored proc, triggers etc. and thus best optimized to handle structured, large-scale data - think enterprise applications, such as order handling, invoicing, accounting, large-scale databases for multiple users of any kind.
First, the sql server database file is not a full sql server database, if you're creating it in this fashion it's a sql server express. Sql Server Express databases aren't terribly fantastic to use since most hosts don't run sql server express and publishing them is tricky if you then try to get them running on a sql server database. Better to start with sql server first then express and migrate.
the local db is actually sql server compact edition. http://en.wikipedia.org/wiki/SQL_Server_Compact
For connection strings, go to http://www.connectionstrings.com/sql-server/ There is pretty much every connection string available there. To work with SQL Server Express you will need to have it installed, and to manage it you will need to download the sql server express management tools. Generally, most sql express instances are designed to be used with local accounts but if I remember correctly you can use the management tools to create a sql server login.
A database that was originally from SQL Server 2008, was restored into SQL Server 2012. A backup from SQL Server 2012 was made and I am trying to restore it on my local SQL Server 2008 Express. However I get an error 'Specified cast is not valid' (SQLManagerUI).
I have generated an SQL Script from 2012 and set it so that it will generate with compatibility to SQL Server 2008. However it is a large sql file, around 700mb.
I recall before that I had tried to run a script of that size before on my local SQLExpress and also got an error.
Is there a way I can get a "large" database from SQL Server 2012 into SQL Server 2008 Express?
Thanks to Marc and Aaron for providing the answers.
The quick answer is no, it's not possible to restore a backup file from a higher version to a lower version of SQL Server.
A work around would be to generate the scripts to create the database.
You can target the script generation to a lower version.
Please see comments above for more information.
Links:
Why an SQL Server Database from a higher version cannot be restored onto a lower version of SQL Server?
Create Database in SQL Server 2012, Script and Use in 2008?
Couple things to add that might be helpful to folks
When scripting large databases using scripting wizard in SSMS it’s really important to check the execution order and be willing to re arrange it manually. Older versions of SSMS had this problem because they (probably) relied on sp_depends that has a bug.
What I’ve found really useful in such cases are tools like ApexSQL Diff that you can use to read database backups and generate scripts that are in correct execution order.
SQL Server database backup restore on lower version
One thing that none of the methods will catch is the thing Aaron mentioned about using functions specific to higher version.
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 as between SQL Server and SQL Server. 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.
My company is planning to migrate it's intranet/internet based ERP to the latest form of MS SQL Database available.
Presently we are using SQL Server 2000 Professional.
And we are planning to shift to SQL Server 2008 Web edition.
Please tell me whether this is the right step and whether it is feasible or not.
Thank you in advance.
"Please tell me whether this is the right step " - that's something you and your company need to decide.
It is feasible, and in the majority of cases straight forward.
Your first step should be to run the Microsoft SQL Server 2008 Upgrade Advisor
Microsoft SQL Server 2008 R2 Feature Pack contains the Microsoft SQL Server 2008 R2 Upgrade Advisor
Formulate and test a rollback plan
Determine your upgrade window and acceptable downtime.
Ensure database consistency: Run DBCC CHECKDB on databases to be upgraded to ensure that they are in a consistent state before performing the upgrade.
Back up all important files: Back up all SQL Server databases from the instance to be upgraded (including master, model and msdb), data and transaction log files, as well as any application files, script files, extract files, etc. so that you can completely restore them in the event of a failure.
It's both feasible and easy. The path from one version of SQL Server to another is usually pretty simple. Do you have any special stored procedures or reports generated in SQL Server that need to be rewritten/re-imported?
As far as right step - the question is, Why? If it's working, do you really need to mess with it?
If it's for intranet (some app for your internal usage) then consider using SQL 2008 Express edition. It's free and you can use it as an instance running along the full 2000 version. That way you will have some extra features from the full version.
But you have to know that applications running on SQL 2000 may not work on 2008 and they are even more probable not to work on 2008 R2.
We have a Sql Server 2005 Standard Edition running on a Production website. We'd like to move to a cloud hosting but they only offer Sql Server Express Edition on there.
My question is, will there be any problems in moving over? We only use tables, views, stored procedures and a few user defined functions. And we also have a Backup Maintenance Plan in place. Will any if this change?
WHat other limitations/problems (if any) can we expect to have? And is it a good idea to run on Express in Production?
And I would like to add, will it be OK if we moved from SQL server 2005 Standard to Sql Server 2008 Express - what possible problems there could be with this move?
There are limitations for SQL Server 2005 Express as listed here
These include:
- max 1GB RAM only
- max DB size of 4GB
- 1 CPU
Theses restrictions may cause you a problem. See the full list in the link.
With regrd to moving from 2005 Standard, to 2008 Express, then I expect the limitations of Express Edition may be the main factor when you consider if it really is an option. The limitations for 2008 Express are similar, see here.
Hope this helps
The migration im unsure.
Express does not support triggers (fully), nor SQL scheudling.
Its size is limited to 4GB.
You can only ever have one instance with express.
It does however support Full Text and Reporting Services (in the express advanced edition)
We have plenty of clients running SQL Express due to cost. Only small pain has been the need to write a windows service for a job that could be easily run in proper SQL scheduling in the paid for the version.
Im sure there are many more differences but these are the ones im aware of, hope this helps.
I've used SQL Server Express for simple data persistence in production with no issues.
From the looks of your situation the only feature that will not be supported is backup maintenance. However, if you're hosted on a cloud, your ISP should take care of backup for you.
What can you do in SQL Server 2008 Standard Edition that you cannot do in SQL Server 2008 Web Edition?
I've seen the Microsoft feature lists, but I am wondering from a very practicle standpoint where I am going to run into limitations.
Have you seen this matrix as well?
http://msdn.microsoft.com/en-us/library/cc645993.aspx
From what I can tell Web excludes a lot of the more advanced features, especially those related to development and data mining, but nothing that would stop you from using it for a non-enterprise web site's data source. It seems to be between the Express version and Standard version.
One of the biggest limitations is that it can't be a publisher for SQL replication. If you want to have multiple database and replication data between them, then you need at least one SQL server to be Standard or Enterprise to act as the publisher.
http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx
Edit: Sorry, you've probably already looked at the above.