Re: How do i move an SQLDatabase to another location?



Where you place your database (.mdf and .ldf) file(s) is up to you. If you use the VS UI tools, there are a number of defaults that kick in and (as you found) SQL Server uses it's own "favorite" place to keep databases--you aren't given a choice to pick your own location. SQL Server Express Edition adds even more options (and complexity) as it permits you to have a user-instance of SQL server with its own (another) copy of the database. Yes, you can choose to put your database in the project as well. As I illustrate in the book, you can end up with 6 or more versions of the database in minutes. While each of these database instances can be updated, it might appear that they are not due to the

I'm of the opinion, that one needs to decide on a deployment strategy before clicking through the defaults. You need to decide if you want to have a shared server-based database, one that's installed independently on the client or one that's associated with your project. How you manage these SQL Server servers and instances and the databases you create is really up to you. Do the VS IDE tools help? Yes, but not very much. SQL Server Management Studio gives you a lot more options and (thus) control over what gets built where and when.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message news:OOf5a%23laHHA.4788@xxxxxxxxxxxxxxxxxxxxxxx
Hello.

I realize my other post was a bit lengthy, so i'd like to repost this
question.

Developing VS2005, SP1, .NET 2.0, VB Windows form program on WIN XP Pro,
SP2. It has a Dataset with two tables using an SQL 9.0 Server Express.

After creating a new database from the VS server explorer, it seems that the
new database always resides in \C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data.

When i create the datasource, it asks if i want to copy it to my project.
If i answer yes, i cannot update the database.

How do i move the database to another location?

Any help would be gratefully appreciated.

Thanks,
Tony



Relevant Pages

  • Re: What are OleDbParameter names with Original_ prefix?
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... Since the table has a primary key column, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ADO.NET Transaction
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... Client transactions put too much schema-dependent, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Performance problems with OracleDataReader
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... referencing the columns by ordinal is far faster than using strings. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Very slow
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ...
    (microsoft.public.sqlserver.ce)
  • Re: ADO.NET Transaction
    ... The SqlBulkCopy class can take anything you can expose with a DataReader and send it to SQL Server in a single high-speed operation. ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... Client transactions put too much schema-dependent, ...
    (microsoft.public.dotnet.framework.adonet)