Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2005, 08:55 AM
Authorized User
 
Join Date: Jun 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL enterprise manager doesn't see mapped drive

Hi guys,

I need to immigrate the databases on my old SQL Server to a new one. My idea is to do a backup of the databases on a shared network drive,and then do a database restore on the new SQL server from the shared network drive. This network drive is mapped on both servers as F:\warehouse\storage\SQLbackup.

However, I could do backup for the old SQL server, but when I tried to restore database on the new SQL server, it could not see the mapped network drive. There were only two "Backup Device Location" for me choose: C and D, both local drives on the server.

Any idea?

Cinderella



 
Old June 16th, 2005, 09:55 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please refer to the following artile
http://www.windowsitpro.com/Article/...025/14025.html

The reason is that the MSSQLSERVER service is running under a separate set of NT credentials - all services are related to an NT account. It doesn't matter who YOU are logged on as (after all SQL runs quite happily when no-one is logged on locally to the server doesn't it?). Therefore your logon account and any mapped drives are irrelevant. It is SQL Server doing the restore, not you. This is the same forrestore done via SQL Executive/SQL Agent - they just pass the TSQL to SQL Server to run, so it's still MSSQLSERVER doing the backup/restore.

For this reason the restore gui does not show you mapped drives or allow a UNC path to be typed in. You have to use raw TSQL commands to do the restore.

Change the account the MSSQLSERVER service runs under to a user account with the relevant network rights.


You MUST also use a UNC name to reference the file required and not a drive letter.
 
Old June 16th, 2005, 01:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

How about copying those .bak files locally and trying a restore of the same? That should be easier too, and avoid network traffic, if the backup files are huge in size. Any intermittent connectivity issues between these two systems during restore from network share would result in error.

Also remember you restore them using WITH MOVE option to restore it to different paths/drives if at all, compared to that of original.

_________________________
- Vijay G
Strive for Perfection
 
Old June 17th, 2005, 09:08 AM
Authorized User
 
Join Date: Jun 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks happygv!I could do that. Could I just drag and drop these .bak files in windows explorer?

To shahchi1: I changed my MSSQLSERVER service to run under an NT account with administrator's rights, but the restore gui still does not show my mapped drives.

Any advice?

Cinderella

 
Old June 17th, 2005, 09:20 AM
Registered User
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Yes you can just copy your.bak files at any folder of your local m/c and then restore the DB.

Amit
 
Old June 17th, 2005, 10:17 AM
Authorized User
 
Join Date: Jun 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot for your advice!

BTW, I could also do backup to the network drive by typing in the UNC path now.

Cinderella

 
Old June 17th, 2005, 03:36 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are right

Do not use mapped drives for SQL Server.
Use a UNC name to reach the backup location:
\\SERVERNAME\SHARENAME

Also

look for sp_addumpdevice topic in SQL Server BOL:

USE master
EXEC sp_addumpdevice 'disk', 'networkdevice',
'\\servername\sharename\path\filename.ext'


 
Old June 20th, 2005, 10:45 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Hi Shachi,

Thanks for your post.

I tried using the sp_addumpdevice.

I ran this in QA:

Use Master
exec sp_addumpdevice 'disk', 'networkdevice', '\\vivaci\sql_backups\IntranetDev\IntranetDevTest. bak'

However, when configuring a backup (All Tasks > Backup Database...), adding a destination, I could not get SQL to find the share or the file.

In the 'Select Backup Destination' window I could not get verification that the file or path exists when adding it to either 'File Name:' or as a 'Backup Device'.

Any help on how to configure a backup to this sp_addumpdevice would be greatly appreciated.

Thank you,
Richard



 
Old June 20th, 2005, 11:35 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Richard, just curious account under which SQL Server is running (not your windows account) have accessed to that shared resource?

 
Old June 20th, 2005, 11:49 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Hi Shahchi,

Security is mixed mode, SQL Server and Windows.

Startup service account:

System Account

The share permissions are everyone, full control.

Is that what the info you were curious about?

Thanks,
Richard






Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting SQL Enterprise Manager Tree Settings plusultra SQL Server 2000 1 June 26th, 2006 04:41 AM
Enterprise Manager vs SQL Management Studio Gert SQL Server 2005 5 April 26th, 2006 01:47 PM
Enterprise Manager/SQL Connection Problem wdfadude SQL Server 2000 1 July 14th, 2005 02:22 PM
How to find if drive is a mapped drive BrianWren Pro VB 6 1 June 2nd, 2005 04:07 AM
SQL Server using Enterprise Manager - winproxy whiterainbow SQL Server 2000 0 December 8th, 2004 02:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.