리버's 아름다운 소풍

'backup'에 해당되는 글 1건

  1. 2007/03/27 SQL 7.0에서 네트웍공유에 백업하는 방법
Q. Why can't I backup/restore my SQL Server databases to a share on another server?

R. 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 nobody 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 backup, not you. This is the
same for backups 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 backup 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 backup.

The default set of NT credentials used by MSSQLSERVER is the SYSTEM account. You can
check what userid that MSSQLSERVER is running under by looking at control
panel/services highlighting MSSQLSERVER and choosing the start-up option.

The SYSTEM account has no access to shares on the network as it isn't an
authenticated network account. Therefore SQL Server running under this account cannot
backup to a normal network share.

So, if you want to backup to a network share you have two choices :-

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

or

2. Amend the following registry value on the TARGET server and add the share name
you want to dump to - the share does not then authenticate who is coming in and
so a SYSTEM account will work. The server service on the target server must be
re-started before the change takes effect. Note that this effectively removes ALL
security on that share, so you're letting anyone or anything have access. This is
probably not something you want to do with production business data.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\LanmanServer\Parameters\NullSessionShares

Whichever method you use, you MUST also use a UNC name to reference the file required
and not a drive letter.

e.g. (6.5) DUMP DATABASE pubs to DISK='\\server01\share\backupdir\backup.dmp'

e.g. (7., 2000) BACKUP DATABASE pubs to DISK='\\server01\share\backupdir\backup.dmp'
이올린에 북마크하기
이 글의 관련글
    이글의 태그와 관련된 글이 없습니다.
일주일간 인기글
오늘 인기글
1 
BLOG main image
리버's 아름다운 소풍
이씨플라자 개발자가 살아가는 이야기
by 리버

카테고리

전체 (287)
살.아.가.며. (168)
웹.이.야.기. (58)
OS (13)
Software (15)
Security (4)
SQL Server (7)
Programming (19)

달력

«   2008/10   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
textcubeDesignMyselfget rss
Candle

900

636

-30 days

today : 59