In our company, we work under the Team Foundation server 2008. By default the databases destination is C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA.
The problem is that the C drive is small and we are always running out of space.
I am thinking to move the databases from the C drive to D drive, but I am not sure what are the consequences of such action.
Any help is very appreciated.
Moving the database to a different drive won't have any affect on how you access TFS through Visual Studio. You can simply detach and re-attach the database files in a different location. See these instructions for doing so.
Edit: Note that there are quite a few databases that need to be moved. Here's an additional resource that you'll want to refer to as well.
You should just be able to move them as you would move and other SQL database (probably best detaching, copying and re-attaching at their new location). I cannot think of any problems with moving them.
Related
From this Q+A I learned how to attach a database, i.e. a set of mdf/ldf files, to SQL Server.
Basically you have to put the files in a specific location, C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\
What is the rationale for this? How can you change it an why should or shouldn't you do this?
Surely this is not a big deal at all for small databases, but for large ones, is this good practice?
I have .mdf files that are backups of several databases, and I would like to know if it is possible to attach these files at once.
If it is also possible, for example via PHP code, I also feel free to explore.
Our company has a SQL Server 2008 R2 database on one of our servers. We would like to be able to make a copy of this database and open it off of a local machine; however, the size is greater than 10GB so the Express version won't do it. Is there a way we can open this locally without paying for another full license, since we do have one for running the database itself?
There is no way to restore a DB over 4 gigs without a licence.
If we had more information about what you were trying to do with it, we might be able to suggest alternatives.
Is it for analysis? Perhaps you can come up with a SSIS package that copies over only the tables that you need.
Do you need it for backup? Perhaps there is another way to verify things.
Is it for testing? Well, you almost certainly need another licence in this case.
I'm working on a project in Visual Studio, and I want to create a local database file (.mdf) within the project directory so that it can be checked into SubVersion and have configuration management. Unfortunately, trying to create/attach a database on a network share leads to an error.
All of the resources I have found to enable NAS functionality are SQL Server 2000 based and do not work for 2005/2008.
I don't care about the performance issues surrounding storing a database non-locally and I can guarantee 100% up-time and connectivity to the file server during the periods that I have the database attached. I do care about having my database files stored with the project.
To clarify, my working set from SubVersion is on the NAS. Corporate mobility means I might be at a different workstation later and I'll need access to my working set.
Also, I don't want any answers telling me that I shouldn't do this... I know its strongly recommended against. However, in the case of some sort of database corruption I can always just revert back to the repository version.
Everyone (including Microsoft) can, should, and will tell you that this is not necessarily a good idea. Be that as it may, MS did provide a way to do this in SQL 2005 (and maybe earlier and maybe later): trace flag 1807. See the MS KB article 304261 for details. (I don't know if it's still valid for 2008.)
Jeff Atwood hat written an article about this topic
Check out his blog entry "Get Your Database Under Version Control" with links to the topic and this blog entry. Also look at the comments
Here are some tools for versioning Databases
I'm pretty sure that you cannot do this with a local mdf. You need to run an instance of SQL Server (even if its express). When you install the instance, you tell the installer package where to store its data and log files. At this point, tell SQL to keep its data and logs on the NAS.
My system is for development, and I run a local copy of sql server 2005. I want to move all the database files out of program files, and put in a better location on another partition. To do this would you simply detach all the databases in SSMS, move the .mdf and .ldf files with windows explorer, then reattach?
That should work.
http://support.microsoft.com/kb/224071
Yes, detach and re-attach them. If you are going to move the system databases also, that will take some special effort. Instructions for that can be found on MSDN.
http://msdn.microsoft.com/en-us/library/ms345408(SQL.90).aspx
Probably this is what you are looking for. I would want to write my answer here but I am too lazy to do that, but I am sending you to my blog post regarding Moving Data File in SQL Server;
http://dbalink.wordpress.com/2008/11/06/how-to-moving-data-files/