Move Sharepoint 2010 to point to a different database? - sql-server

Has anyone here moved the database underlying a SP 2010 install from one database instance to another (same data, just hosted in another instance)?
For example. we just want to move the database to a diffrerent machine.
In addition, has anyone moved SP 2010 from using SQL Express to a higher version of SQL Server? I would like to run some proof of concept tests with SQL Express, and if all goes well, then move to SQL Standard or Enterprise.
Cheers,
Daniel

Check out the following article:
http://technet.microsoft.com/en-us/library/cc512725.aspx

I don't think you'll run into any problems, just make sure you aren't going backwards in versions between databases. Backing up a database in SQL Server 2008 and restoring in 2005 isn't easy.
I've never done this with SharePoint, but I believe it lets you specify the location of the configuration database. Then you just need to match the user permissions.

The TechNet article "Move All Databases (SharePoint 2010)" is your main guide.
Note that this article contains the following warning:
The new database server must be running the same version of Windows
Server and Microsoft SQL Server as the existing database server.
This in NOT true!
Both from my own experience in migrating SharePoint databases and talks I've had with Microsoft Primary Field Engineering, I can say this method also works when SQL Server versions differ. But only if you upgrade to higher SQL Server versions (i.e. SQL Server 2005 to SQL Server 2008 R2). I was told this scenario is also fully supported by Microsoft.
Also, don't forget to update the database compatibility level for the migrated databases. This should future-proof your databases and enable advanced SQL Server optimization.

Related

Upgrade database from sql server 2008 to sql server 2016

I have database created on SQL SERVER 2008. I want to upgrade it to SQL SERVER 2016. what is the best way to upgrade the whole database?
Thanks in advance.
Migration can be done many ways from 2008 to 2016. In-house upgrade, backup restore, etc. Different approaches are explained here:
https://learn.microsoft.com/en-us/sql/database-engine/install-windows/upgrade-database-engine
But simple backup/restore approach is the always better in my practical understanding. Also It has links for SSIS/SSAS/SSRS if required plan for those. Each has different approaches...
Major things to consider are how to remove deprecated features and how to make use of new features:
Deprecated features:
2012:
https://technet.microsoft.com/en-us/library/ms143729(v=sql.110).aspx
2014:
https://msdn.microsoft.com/en-us/library/ms144262(v=sql.120)
2016:
https://learn.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server-2016
You can use new AMR tool to identify what tables you can use for in-memory also you can do analysis of columnstore indexes etc using below:
https://blogs.technet.microsoft.com/dataplatforminsider/2013/09/17/new-amr-tool-simplifying-the-migration-to-in-memory-oltp/
I had big problems upgrading from 2008 to 20014 as it complained about 2008 SP2 missing, but there where additional messages about missing instance ID's or nothing needed to be installed.
The upgrade from 2008 to 2012 was a better move as the 2012 is probaly better designed to deal with a previous release.
Once 2012 was installed I moved to 2014 with no problem and did not have to care about attached databases. It just upgraded.
I had to use the "SQL Server Configuration Manager" to enable Named Pipes or TCP/IP connection in the "SQL Server Network Configuration" section, and enable the new SQL service .exe in the windows firewall.
To add it to the firewall the service exe "sqlsrvr.exe" was identified using the Windows task manager and using "properties" optaning the path to the .exe.
The installation makes you nervous but once installed you know SQL Server is one of the few Microsft products that does not bother you. It just works.
Instead of downloading missing servicepacks manually it was easier to run Windows update and have it suggest SQL server sevicepacks. Winows update actually helped before migrating to the next version.
Here is a nice chart of sql server editions with links to downloads:
Microsoft SQL Server Version List

MS Access to SQL Server

I am trying to move my rapidly growing MS Access 2016 database to a SQL Server back end and build an asp.net front end. I am trying to migrate data from the Access database to an instance of SQL server 2014 but this is not going so well. I tried to migrate it using the MS Migration Assistant but this is not supported for versions after 2010. Does anyone know an easy way to convert Access tables to SQL Server?
Thanks in advance.
The only migration assistant that was depreciated was the one built into Access. So you are correct that after Access 2010, the migration system is removed.
However, there is a SQL Migration Assistant for Access that can be used here:
https://www.microsoft.com/en-us/download/details.aspx?id=54255
The above SSMA for Access is better than the old migration assent and is designed for upgrading Access to SQL server.
NOTE CAREFULLY that the shortcut on the desktop is for office x64 which FEW have, so make sure you launch the x32 bit version of SSMA – you find the shortcut to x32 in the programs folder (or just type I SSMA in windows 10 and select the x32 version.
AGAIN:
Make sure you follow above to launch the x32 version else it will not work.
Create your database in SQLServer
In Management studio, Right click on your database. Go to
Tasks
Import data
This should bring up the SQL Server Import and Export Wizard
In Data source, choose Microsoft Access. I have 3 choices in my test server. I'm not sure what one to use, so it might pay to play around.
Follow the Wizard, which should get you to were you want to be
To automate migration from Microsoft Access database(s) to SQL Server
SQL Server Migration Assistant (SSMA) is a free supported tool
A video tutorial and all procedure I posted on the blog:
https://www.imran.xyz/convert-microsoft-access-database-to-sql-server-database/
You can download it from Microsoft
https://www.microsoft.com/en-us/download/details.aspx?id=54255

Is there a difference between SQL Server Express (2012) and LocalDB?

In his excellent and popular comparision chart, ErikEJ draws a distinction between SQL Server Express 2012, and SQL Server 2012 LocalDB. However, I can't find such a distinction anywhere else in the MSDN documentation ("LocalDB" isn't even mentioned in the official MS SS12 book or on the MSDN SQL Edition comparison page.) This leads me to suspect that Express and LocalDB aren't really two separate products as ErikEJ suggests, but rather just two different terms for the same thing (which would explain why, on this MSDN page, it is called "SQL Server 2012 Express LocalDB").
If there really is a difference between the products, can anyone point me to some official documentation comparing them?
OK, I think I have found the answer to my own question. (It was buried under the tabs on the SS Express product page.)
Here is a summary of the distinctives of LocalDB I found on that page:
LocalDB is a lightweight deployment option for SQL Server Express Edition with fewer prerequisites and quicker installation.
LocalDB has all of the same programmability features as SQL Express, but runs in "user mode"* with applications and not as a service.
LocalDB is not intended for multi-user scenarios or to be used as a server. (If you need to accept remote connections or administer remotely, you need SQL Server Express.)
"Express with Tools" (which includes SS Management Studio Express, Azure, etc) can be used with LocalDB or without. (The same goes for "Express with Advanced Services".)
UPDATE: I just found this useful description in Windows IT Pro (Jul '12, p.23):
LocalDB isn’t SQL Server Express, nor is it SQL Server Compact.
LocalDB uses the same sqlservr.exe engine as the other editions of
SQL Server, but it runs in user mode—not as a service. LocalDB is
used for offline development by tools such as SSDT to ensure that the
code you develop is 100-percent compatible with your production
SQL Server database.
If I am reading this correctly, LocalDB seems to be more like a configuration option of Express than an entirely separate product. So apparently if I download Express (or Express w/ Tools), I will have the option to install the LocalDB version, which is supposedly easier ("zero-configuration") than the full Express. (Update: with VS2012, LocalDB comes installed by default.)
One other important distinction, according to this post, is that "currently Visual Studio 2010 doesn't really work with LocalDB." (We have to use SS Management Studio instead, at least for now.)
*(The concept of "User Mode" or "User Instances" is a key distinctive of LocalDB. In fact, according to this post, "LocalDB can be seen as an upgrade of the User Instances feature of SQL Server Express." For more about User Instances, refer to the MSDN blogpost "What is a RANU?")
UPDATE - Feb 2021
LocalDB is SQL Server Express edition
From official documentation
Express edition is the entry-level, free database and is ideal for
learning and building desktop and small server data-driven
applications. It is the best choice for independent software vendors,
developers, and hobbyists building client applications. If you need
more advanced database features, SQL Server Express can be seamlessly
upgraded to other higher end versions of SQL Server. SQL Server
Express LocalDB is a lightweight version of Express that has all of
its programmability features, runs in user mode and has a fast,
zero-configuration installation and a short list of prerequisites.
The docs provides a very detailed comparison of features between editions.
I use a table from ErikEJ, which shows: the features and differences between SQL CE 3.5, SQL CE 4, Local DB and SQL Server 2012. According to this table the differences between Local DB and SQL Server 2012 are:
Installation size:
SQL Server 2012: 120 MB download size; 300 MB expanded on disk
Local DB: 32 MB download size; 160 MB on disk
Runs as Service
SQL Server 2012: Yes
Local DB: No (runs as process started by app)
FILESTREAM support
SQL Server 2012: Yes
Local DB: No
Subscriber for merge replication
SQL Server 2012: Yes
Local DB: No
Number of concurrent connections
SQL Server 2012: Unlimited
Local DB: Unlimited (but only local)
NB: Sorry this isn't "official documentation", but hope it's useful to the next bod as it answers the underlying query about the differences.
The major difference are Server Express run as a service while LocalDB doesn't need any server or intensive processing to run.

How does ProviderManifestToken affect the database if the versions don't match?

We have a simple console app that uses EF 4 to process data; read from one, do some stuff, insert into another database. In the EDMX file, ProviderManifestToken for the destination db is set to "2005".
Yesterday, our app blew up. To make a long story short, our consultant says the db, which should be SQL Server 2000, was upgraded to 2005. That upgrade, according to them, was the reason for the app implosion. No one can explain how the upgrade occurred.
Can the value of ProviderManifestToken cause an upgrade to the db? For example, if a db is currently 2000 and this app runs with "ProviderManifestToken = 2005", can that force an upgrade on the db? What happens, if anything at all, if the versions do not match?
Do you think that Entity framework contains installation DVD to upgrade your SQL Server 2000 to SQL Server 2005? No it doesn't. Provider manifest token only describes dialect (EF generates queries based on the dialect). It doesn't trigger any changes on the database. Somebody had to upgrade your database (upgrade to a new version is not free - you must have licence for that, it is not something downloaded through windows update).
Btw. SQL Server 2000 is not supported by EFv4 anyway. If you had your dialect set to 2005 and your solution worked with your database then it was 2005 all the time because linq-to-entities queries using First, Single, Take, Skip, etc. generated for 2005 dialect don't work on SQL Server 2000.

Replicating between SQL Server 2005 and SQL Server Compact Edition

Can it be done and if so, how?
You can also check out Sync Services for Sql Server and Compact edition. The benefit of Sync Services is that you don't need a replication server or IIS and you can also sync between compact edition databases. This method involves writing a fair bit more code and is fairly involved, but I'd recommend looking into it as a lightweight service.
You can use Merge Replication. Theres a tutorial here SQL Server Compact 3.5 How-to Tutorials (Number 5).
Certainly replication is possible, as is Sync Services if you're not afraid to get your hands dirty. It depends on the details of what you need:
Sometimes-connected application wanting to have a read-only cache: Sync Services
Sometimes-connected application wanting to have part or full update ability: Sync Services
Remote site with multiple workstations needing read/write access to data: replication if you can get a secure network connection that's stable enough, otherwise look at extending Syn Services to work with SQL Express (or full SQL Server) based on the sample here: Sync using SQL Express
If you just want a SQL CE database and you're working with a SQL 2008 server then the wizard in Visual Studio 2008 SP1 will do all the work for you, you need only add 1 line of code to it if you want bi-directional support. If you can't upgrade then it will take more work with SQL 2005, and it's only reliable if you have at least SP2.
I'm in the middle of a project that requires multiple sites to have a sub-set of data in an environment where each site may lose it's connection to the head office at times, we've managed to get Sync Services to work with SQL 2008 at the head office and SQL Express 2008 at each site with full change tracking (2008 feature) and it's working great. It does require a reasonable amount of code (C# and SQL), so we've used some pretty smart templates to help. Be aware that.
Perhaps you could refine your question with more details?
Because of budget constraints I think it will have to beta-tester's approch,i tried following the guide and cant seem to get it working. Before I spend time getting it to work, I just confrim, Replicating between SqlServer 2005 and Compact Edition is something that can be done?
I just confrim, Replicating between
SqlServer 2005 and Compact Edition is
something that can be done?
Yes it can definately be done using either Merge Replication or Sync Services

Resources