Thanks for replying.
I did all this, but when i do
select * from master..sysdatabases
in Studio Management, i still read as filename the local path
(c:\myapp\app_data) instead of :
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\mydb.mdf
So if i remove mydb.mdf from its local path, i have no access anymore to
that db.
The mydb.mdf is attached but not integrated into Sql Server.
You see what i mean?
> does the MDF file exists on the local drives of the SQL Server server?
>
[quoted text clipped - 23 lines]
>> Thanks
>> Bob
Ekrem Önsoy - 30 Sep 2007 12:13 GMT
Hello Bob!
I think you made it like this:
-Stoped SQL Server service and copied your mdf and ldf files to "C:\Program
Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\" and restarted your SQL
Service.
You should go this way:
Connect to your SQL Server instance and then detach your database (mydb or
whatever). Move your mdf and ldf files (related to mydb) to their new
location which must be "C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\" I guess. And go to SSMS and attach your database
from the new path.
You should use detach\attach while moving databases, otherwise there will be
junkies of those databases in master database which is not good and could be
confusing later.

Signature
Ekrem Önsoy
> Thanks for replying.
> I did all this, but when i do
[quoted text clipped - 39 lines]
>>> Thanks
>>> Bob
Jeje - 30 Sep 2007 14:53 GMT
now I see...
SQL Server don't copy the database files into the default DATA folder.
Simply because SQL Server can access database store anywhere on the server
second because a DBA generally move the database to a different set of
disks.
it's why the attach process just attach the database from the location you
specify without moving the files.
a database is created in the DATA folder only when you CREATE a new database
WITHOUT specifying the storage folder.
the database is always "integrated" into SQL Server (using or not the DATA
folder is not important)
so if you want your database into the DATA folder, detach the database, move
the files into the DATA folder yourself and attach the database again using
the DATA folder instead-of the myapp one.
> Thanks for replying.
> I did all this, but when i do
[quoted text clipped - 39 lines]
>>> Thanks
>>> Bob
Bob - 30 Sep 2007 18:11 GMT
Thanks to both
> now I see...
>
[quoted text clipped - 59 lines]
>>>> Thanks
>>>> Bob