SQL Server 7 and Disk Partitions

SQL Server 7 and Disk Partitions

Post by Steven Fran » Tue, 06 May 2003 17:00:07



I am having trouble moving and SQL Server install from
one partition to another.

The current situation:
I have a server with a single disk that is broken into
two partitions.  One partition contains the OS (Win2k
Server) and the other contains my application files
including my complete SQL Server install.  The second
partition (with SQL Server) is mounted under a directory
(C:\myApplication), it does not have its own drive letter.

This situation works great and it does everything I need
it to do and I have no problems with it.  

I set the box up this way because I had hoped that when
the day came (and it has) where I needed more space for
my database, I could simply install an additional disk in
the server, move my database over to it, and then simply
mount that new disk under the same directory name (after
unmounting the partition that is currently under that
directory name).

Here is what I did:
Installed the new disk.

Mounted a new directory over the new disk
(C:\myApplicationBIG).

Copied everything from C:\myApplication to
C:\myApplicationBIG.

Unmounted both directories.

Mounted the new disk under c:\myApplication.

Everything worked great to this point.  However, the
database would not start.  It seemingly knew that a
change had occurred and complained about many different
things.  After a brief struggle to try and tweak the
registry to make things work, I gave up and reverted to
the original config.

Yes, I could reinstall everything onto the new disk, but
I'm really trying to avoid having to do that as downtime
for this box is an extreme issue.

Is there any way to fool the database into not know that
such a switch has occurred?  I had hoped that the virtual
directory would be transparent to the database, but SQL
Server obviously has some lower level interaction with
the disk and was wise to my ploy.

TIA!

 
 
 

SQL Server 7 and Disk Partitions

Post by John Bandettin » Wed, 07 May 2003 11:36:02


Steven

Are you just trying to move the database to the new disk?
You can call the new disk anything you like.

Set up the new disk, use sp_detach_db to take the database
offline. Move the .mdf and .ldf files to their new
location and then issue sp_attach_db to bring the database
back online. (See BOL for full details)

I think that is what you want.

Regards

John

 
 
 

SQL Server 7 and Disk Partitions

Post by Steven Fran » Wed, 07 May 2003 20:23:52


Actually, there is more than one database, I want the
entire install moved onto the new disk.

Quote:>-----Original Message-----
>Steven

>Are you just trying to move the database to the new
disk?
>You can call the new disk anything you like.

>Set up the new disk, use sp_detach_db to take the
database
>offline. Move the .mdf and .ldf files to their new
>location and then issue sp_attach_db to bring the
database
>back online. (See BOL for full details)

>I think that is what you want.

>Regards

>John
>.

 
 
 

SQL Server 7 and Disk Partitions

Post by John Bandettin » Thu, 08 May 2003 10:30:26


Stephen

Detach all the databases you want to keep. Make sure they are in a
secure directory. Remove SQL Server from your system. Re-install to new
location. Move database files .mdf and .ldf to where you want them and
then reattach all databases. This way will move everything to desired
location. Easy and should not take too long.

Regards

John

ps take a copy of the master database as well just in case.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. Error 5123 CREATE FILE when using new disk partition on server

We recently added a 400MB partition of additional disk on
our Compaq 7000 server running Windows NT 4 Service pack
6a. When we try to add a new database or attach data
bases moved from another server we get the following
error message.
Microsoft SQL-DMO (ODBC SQLState: 42000)
Error 5123 CREATE FILE encountered operating system error
5(Access is denied.) while attempting to open or created
the physsical file 'F:\SQL\Data\ATG\test1228_Data.MDF'.
CREATE DATABASE failed. Some file names listed could not
be created. Check previous errors.
I can write files and create file in native dos or in
other applications like MS Word.  I have admin rights on
the server and the domain and Full Control of the folders
and partition so I don't think it is a security issue. I
am also administrator for SQL with full rights and don't
have problems with the other disk on the server.
My son called this morning and he said he ran into the
same error message while attempting to attach databases
on new disk space on thier servers at his company.

2. JDBC applet connection/db2jstrt problem

3. Problem installing Server on raw disk partition

4. ADO, Dbase and code page

5. Disk Partition for a Dedicated Ingres DB Server

6. Runtime Error 3426

7. Disk I/O numbers for SQL Server on Raw SunOS Disks

8. changing default database

9. Hard disk partitions

10. disk devices on unformatted (raw) partitions

11. Controlling disk usage on a DB that spans 2 partitions

12. disks partitions and files

13. partitioning disks for best performance