Attaching SQL Server database that is split into partitions - sql-server

I have a trial version of SQL Server 2012 Enterprise on our test server that has expired. I would like to install a fresh copy of another Enterprise edition and attach the current db to the new one. I have done this locally by moving the mdf and ldf files to the new destination, then attaching the db through SSMS.
However the database on the test server is 700GB big and besides the mdf/ldf files there are 16 partitions (sql server database secondary data files). Will the same procedure apply in this case?

Related

How to migrate from SQL Server 2005 to SQL Server 2012

I have this scenario:
Old Server -> SQL Server 2005 with the current Database
New Server -> SQL Server 2012 no database created.
I want to migrate the old database to the new one.
I've tried to create a backup from the Management Studio 2005 and restore in the 2012. Failed.
I've connected from the 2012 server using Management Studio 2012 to the old server and create the backup. Then restored in the new one. Failed.
The error said that the versions are incompatibles (tried to restored a version from 8.0 to 11.0)
Then, I tried to use the Copy database Wizard. But a error message shows up:
The destination server can not be an instance of SQL Server 2005 Express or higher .
So, how it is supposed to do the backup?
I'm getting the scripts in sql files as last resort...
PS: I've check this thread, I need to migrate to 2008 and then 2012?
How to migrate a database from SQL Server 2005 to 2008 as is?
When I have performed a SQL Server migration in the past I have normally performed a SQL Backup, copy to the new server and then restore, I see in your question that you got an error, update the question with the error and perhaps we can be more specific about what you need to do to make it succeed.
I have also performed a migration by detaching the database from the old server, copying the data and log files to the new server and attaching the databases. This is the method I tend to go with.
The SQL you would use to attach the MDF/LDF files is as follows:
CREATE DATABASE MyAdventureWorks
ON (FILENAME = 'C:\MySQLServer\AdventureWorks_Data.mdf'),
(FILENAME = 'C:\MySQLServer\AdventureWorks_Log.ldf')
FOR ATTACH;
You can refer to the documentation at: https://msdn.microsoft.com/en-AU/library/ms190209(v=sql.110).aspx
Please apply latest service pack SP4 on 2005 databases after this take a full backup of 2005 databases and restore it on 2012. I hope, it will work.

How can I import all databases from my development server to my local SQL Server 2008 R2?

I am working on a development server developSQL where there are 5 databases. I want to copy all those databases to my laptop (local server).
How can I do this process without using backup files or there is only one option of doing backup files and using that backup file to restore how can I do this?
Thanks in advance.
you can stop sql server, copy the all the mdf and ldf ( data and log files) and attach the copies to the sql server on your laptop
You can either attach them using a script or with management studio
http://technet.microsoft.com/en-us/library/ms190209.aspx

Database transfer between SQL Server 2000 and SQL Server 2008

I'm trying to help a client who's hosting company has decided to shutdown their hosting services and in that process I need to migrate an old ASP.Net site (DNN i think) to a new hosting company.
The old hosting company is running SQL Server 2000 and the new hosting company I'm attempting to copy it to has a 2008 version.
SQL Server Management Studio can connect to the old database ok but the Import/Export Data tool doesn't want to connect to this old system.
Is there anyway to easily transfer the database across?
Any tool you can recommend to backup a SQL 2000 db and restore it to a 2008 version or a migration tool that can converse between those two?
You should be able to just take a SQL Server database backup (using the built in backup features) from the SQL Server 2000 database, and restore it into SQL server 2008
http://msdn.microsoft.com/en-us/library/ms186858(v=sql.100).aspx
My suggestion to you is
Get the host to shut down the SQL Server
Get the host to provide you with the files or the backups
Install your own SQL Server 2000 and then run the migration. Or just plain estore the backup in SQL2008
You can also try to script database (schema + data): http://j.mp/NRb2EE and execute this script on new server. If database is large it can be huge script.
And remember to pay attention to the option Types of data to script – select option ‘Schema and data’.

Move all sharepoint 2007 databases to a new Sql Server

In our organization we have a Microsoft Sharepoint 2007 installed and configured on a Windows Server 2003 Standard Edition (32 bit).
The database had been installed and configured on a Sql Server 2000 (Windows 2000 Server 32 bit).
Now we are in the process to move all the databases from the Sql Server 2000 to a new Windows 2008 Server R2 Enterprise (64bit).
The new server has been already installed and doesn't have the same name of the Sql Server 2000.
We would like to upgrade all the Sharepoint 2007 database to the RDBMS so that we can dismiss the old, slow Sql server 2000.
Has anyone tried to do something similar?
You should do the following steps:
Backup all content and configuration databases. Backup your SSP databases.
Prepare content databases for moving.
Delete all the content databases.
Stop the SharePoint Farm by stopping a Timer, Tracing, Administration service
Copy mdf files of an old config database to a new SQL server
Attach SharePoint_Config database on a new server from copied mdf files.
Run stsadm -o renameserver -oldservername OLDSERVER -newservername NEWSERVER
Start all the SharePoint services stopped in 4.
Copy mdf files of content databases to a new server and attach these databases.
Attach content databases.
Add a content databases from a new SQL to SharePoint with stsadm or Central Administration
Restore an SSP databases
Create a new SSP using Restore command from an SSP database on a new SQL server.
Delete an old SSP.

Problem with importing an mdf created with SQL Server Express 2008 into SQL Server 2005

The question is probably extremely easy to resolve, but I need to resolve it because I need to carry on with my project. I am using SQL Server Express 2008 at home, and I've been working on an ASP.NET MVC app that stores my DB in an mdf file in the project's folder. The problem is that the SQL Server in the Uni labs is SQL Server 2005, and when I try to open the mdf file with the VS Server Explorer,It says that the version of the mdf file is more than the server can accept.
The only option that comes to my mind is exporting the DB as an sql file, just like I've done it thousand times with phpmyadmin. the thing is that the SQL Management Studio Express is not the most usable tool in the world, and for some strange reason all the articles I could find in Google were irrelevant. Please, help.
It is not possible to attach database created on SQL Server 2008 to SQL Server 2005. The other direction is possible.
Your only option is to script the database and data and run the scripts on SQL 2005. If you have used any of new features of the SQL Server 2008, you will have to rewrite the scripts.
I haven't used it much, but right click on database -> Tasks... -> Generate Scripts... / Export Data... / Import Data... should do the job right.
Google "Database Publishing Wizard", it's a tool from Microsoft to script an entire database, both schema and data.
you can script your db and its data. then run it on the target server to create a new db that is compatible with 2005 version.
Tools like Red-Gate SQL Compare and SQL Data Compare can compare a live database to e.g. a backup file, so you could compare your SQL Server 2005 database against the SQL Server 2008 Express backup file, and move data that way.
Or you could possibly generate INSERT statements for your tables that have changed data using a tool like this one here or this one here. These can generate INSERT scripts for your tables, which you can take along and run on your SQL Server 2005 target system.

Resources