Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hii,,
 

Please explain diffence betwee password and media password in sql server?
as we use
 
1. BACKUP DATABASE mydb
TO DISK = N'C:\mydb.bak'
with INIT
,mediapassword = 'sqlpass'
,NAME = 'Full Backup of mydb';
 
2. 1. BACKUP DATABASE mydb
TO DISK = N'C:\mydb.bak'
with INIT
,password = 'sqlpass'
,NAME = 'Full Backup of mydb';
 
please explain the difference..
 
thanx.
Posted 18-Apr-13 6:50am
Comments
Anupam Singh _ at 19-Apr-13 0:48am
   
If I want to restore database with replace in other system .Can I face any issues ??

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

password:
 
"If a password is defined for the backup set, the password must be supplied to perform any SQL Server restore operation from the backup set. A backup set password does not protect the backup file from being overwritten, however. To prevent a backup file from being overwritten, use a media-set password instead."
 
mediapassword:
 
"If a password is defined for the media set, the password must be supplied before you can create a backup set on that media set. In addition, that media password also must be supplied to perform any restore operation from the media set. Password-protected media may be overwritten only by reformatting."
  Permalink  
Comments
Anupam Singh _ at 19-Apr-13 0:58am
   
If I want to restore database with replace in other system .Can I face any issues ??
RedDK at 19-Apr-13 13:39pm
   
Sort of depends upon whether there's a password of any kind. I can say this though, if there's no password, copying a .mdf/.ldf combo to "another" machine then ATTACHing it to the instance ... should be alright. As long as you've got copies why not experiment?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 274
1 Sergey Alexandrovich Kryukov 255
2 Shweta N Mishra 216
3 PIEBALDconsult 200
4 BillWoodruff 174
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100