Answered by:
External disk - Instance

Question
-
Hi.
I have a 250 Gb DB in an external disk. I can't copy it in the pc because It doesn't have the storage capacity.
I have installed SQL Server 2008 Enterprise R2 and I want to query the DB.
I have created a new instance in the external disk in the Data folder of MSSQL10_50, where I copied the DB. However, I can´t change the instance MSSQLSERVER that reads by default .
What can I do to query the DB hosted in the external disk?
Thanks.
Sunday, March 4, 2012 5:02 PM
Answers
-
Hi,
There are 3 separate issues here; -
1) Installing SQL Server,
2) Installing an Instance of SQL Server,
3) Accessing a SQL Server database.
I guess from your question that you have already installed SQL Server on an internal hard disk of your PC and this installation will include a default (local) SQL Server instance. I'm un-easy about installing a new instance on an external hard disk. I think this could create more issues especially if this external hard disk is not going to be permanently attached to your PC.
I guess the DB you copied to your external hard drive consists of the MDF file,etc.
So I would simply ATTACH this database to your default instance of SQL Server within the installation of SQL Server physically installed on an internal drive of your PC.
Please find the following link for instructions on how to attach a database; -
http://msdn.microsoft.com/en-us/library/ms190209.aspx
I hope this helps.
Kind Regards,
Kieran.
If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI, PGD SoftDev (Open), MBCS http://uk.linkedin.com/in/kieranpatrickwood
- Edited by Kieran Patrick Wood Sunday, March 4, 2012 6:09 PM
- Proposed as answer by Iric Wen Tuesday, March 6, 2012 6:26 AM
- Marked as answer by Kalman TothEditor Saturday, March 10, 2012 9:59 PM
Sunday, March 4, 2012 6:07 PM -
Hi
I suggest you to check the permissions for the SQL Service Account on the external drive (Make sure it has read/write) then you will be able to attach the database to the SQL instance and access it
Javier Villegas | @javier_vill | http://sql-javier-villegas.blogspot.com/
Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you- Marked as answer by Kalman TothEditor Saturday, March 10, 2012 9:59 PM
Monday, March 5, 2012 12:42 AM
All replies
-
Hi,
There are 3 separate issues here; -
1) Installing SQL Server,
2) Installing an Instance of SQL Server,
3) Accessing a SQL Server database.
I guess from your question that you have already installed SQL Server on an internal hard disk of your PC and this installation will include a default (local) SQL Server instance. I'm un-easy about installing a new instance on an external hard disk. I think this could create more issues especially if this external hard disk is not going to be permanently attached to your PC.
I guess the DB you copied to your external hard drive consists of the MDF file,etc.
So I would simply ATTACH this database to your default instance of SQL Server within the installation of SQL Server physically installed on an internal drive of your PC.
Please find the following link for instructions on how to attach a database; -
http://msdn.microsoft.com/en-us/library/ms190209.aspx
I hope this helps.
Kind Regards,
Kieran.
If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI, PGD SoftDev (Open), MBCS http://uk.linkedin.com/in/kieranpatrickwood
- Edited by Kieran Patrick Wood Sunday, March 4, 2012 6:09 PM
- Proposed as answer by Iric Wen Tuesday, March 6, 2012 6:26 AM
- Marked as answer by Kalman TothEditor Saturday, March 10, 2012 9:59 PM
Sunday, March 4, 2012 6:07 PM -
Hi
I suggest you to check the permissions for the SQL Service Account on the external drive (Make sure it has read/write) then you will be able to attach the database to the SQL instance and access it
Javier Villegas | @javier_vill | http://sql-javier-villegas.blogspot.com/
Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you- Marked as answer by Kalman TothEditor Saturday, March 10, 2012 9:59 PM
Monday, March 5, 2012 12:42 AM