Thursday, March 8, 2012
backup password
I have created a backup file of database with password. When I restore the backup file, it restores sucessfully without asking for the password. What is the use of password being supplied in the T-sql when it does not check for password when we restore it
Any commentsAre you sure you are restoring from the right backup?
Can you try this and see if it lets you restore without password?
USE Master
GO
BACKUP DATABASE Pubs TO DISK = 'Pubs.BAK' WITH PASSWORD = 'A123', INIT
GO
RESTORE DATABASE Pubs FROM DISK='Pubs.Bak'
--WITH PASSWORD = 'A123'
GO
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Kevin" <anonymous@.discussions.microsoft.com> wrote in message
news:57D4BD6F-B978-410D-B4EF-2FE193E8285B@.microsoft.com...
Hi,
I have created a backup file of database with password. When I restore the
backup file, it restores sucessfully without asking for the password. What
is the use of password being supplied in the T-sql when it does not check
for password when we restore it.
Any comments ?
backup password
I have created a backup file of database with password. When I restore the b
ackup file, it restores sucessfully without asking for the password. What is
the use of password being supplied in the T-sql when it does not check for
password when we restore itAre you sure you are restoring from the right backup?
Can you try this and see if it lets you restore without password?
USE Master
GO
BACKUP DATABASE Pubs TO DISK = 'Pubs.BAK' WITH PASSWORD = 'A123', INIT
GO
RESTORE DATABASE Pubs FROM DISK='Pubs.Bak'
--WITH PASSWORD = 'A123'
GO
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Kevin" <anonymous@.discussions.microsoft.com> wrote in message
news:57D4BD6F-B978-410D-B4EF-2FE193E8285B@.microsoft.com...
Hi,
I have created a backup file of database with password. When I restore the
backup file, it restores sucessfully without asking for the password. What
is the use of password being supplied in the T-sql when it does not check
for password when we restore it.
Any comments ?
Backup passw
I perform a backup with a password (quiet long), but I'm
afraid of tools that may read the password/break the file.
My question is if I place a long password would it be
more difficult tools read the passw (255 chars) or it's
hopeless?
Thanks in advance!
Konstantinos MichasUsing a password on a backup doesn't prevent other people reading your data.
It just prevents an unauthorised person using SQLServer to restore the data
and therefore may make it slightly more difficult for them to access the
data. The backup isn't encrypted so it's still possible to read the backup
media using third party tools.
In short, if the confidentiality of your data is important to you, you
probably shouldn't rely on a backup password (of any length).
David Portas
SQL Server MVP
--|||To add some to David's correct response there is a 3rd party tool called SQL
LiteSpeed that will encrypt the entire backup for you and they won't be able
to easily crack it.
Andrew J. Kelly SQL MVP
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
> Using a password on a backup doesn't prevent other people reading your
data.
> It just prevents an unauthorised person using SQLServer to restore the
data
> and therefore may make it slightly more difficult for them to access the
> data. The backup isn't encrypted so it's still possible to read the backup
> media using third party tools.
> In short, if the confidentiality of your data is important to you, you
> probably shouldn't rely on a backup password (of any length).
> --
> David Portas
> SQL Server MVP
> --
>|||Hello and thanks both for your response, 3d party tools
can read the structure of DB from bakcup file, right?
Thanks in advance?
Konstantinos
>--Original Message--
>To add some to David's correct response there is a 3rd
party tool called SQL
>LiteSpeed that will encrypt the entire backup for you
and they won't be able
>to easily crack it.
>
>--
>Andrew J. Kelly SQL MVP
>
>"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org>
wrote in message
>news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
people reading your[vbcol=seagreen]
>data.
SQLServer to restore the[vbcol=seagreen]
>data
them to access the[vbcol=seagreen]
possible to read the backup[vbcol=seagreen]
important to you, you[vbcol=seagreen]
length).[vbcol=seagreen]
>
>.
>|||What do you mean by that? The 3rd party tool I was referring to simply does
a backup and encrypts the resulting backup file. Are you asking if it can
then read the file later on? If so then of coarse as it would be pretty
useless to encrypt the file and not be able to restore it. But you will
need the key to do this and if memory serves me right it is 128 bit (or
higher) encryption.
Andrew J. Kelly SQL MVP
"ATHENS 2004" <anonymous@.discussions.microsoft.com> wrote in message
news:d8b101c43a8f$4f4b8460$a601280a@.phx.gbl...[vbcol=seagreen]
> Hello and thanks both for your response, 3d party tools
> can read the structure of DB from bakcup file, right?
> Thanks in advance?
> Konstantinos
>
> party tool called SQL
> and they won't be able
> wrote in message
> people reading your
> SQLServer to restore the
> them to access the
> possible to read the backup
> important to you, you
> length).|||I don't know of any tool specifically designed to read a password protected
SQL backup if that's what you mean. I was actually referring to software
that can read *any* data from backup media (for example:
http://www.intermedia.uk.com/mmpc.htm). If you can read the data file then
it's certainly possible to extract information from it. I'm pretty sure it's
also theoretically possible to hack a password-protected backup so that it
can be restored to SQLServer without the password.
David Portas
SQL Server MVP
--|||I see, thank you both answering!
>--Original Message--
>Hello and thanks both for your response, 3d party tools
>can read the structure of DB from bakcup file, right?
>Thanks in advance?
>Konstantinos
>
>party tool called SQL
>and they won't be able
>wrote in message
>people reading your
>SQLServer to restore the
>them to access the
>possible to read the backup
>important to you, you
>length).
>.
>
Backup passw
I perform a backup with a password (quiet long), but I'm
afraid of tools that may read the password/break the file.
My question is if I place a long password would it be
more difficult tools read the passw (255 chars) or it's
hopeless?
Thanks in advance!
Konstantinos MichasUsing a password on a backup doesn't prevent other people reading your data.
It just prevents an unauthorised person using SQLServer to restore the data
and therefore may make it slightly more difficult for them to access the
data. The backup isn't encrypted so it's still possible to read the backup
media using third party tools.
In short, if the confidentiality of your data is important to you, you
probably shouldn't rely on a backup password (of any length).
--
David Portas
SQL Server MVP
--|||To add some to David's correct response there is a 3rd party tool called SQL
LiteSpeed that will encrypt the entire backup for you and they won't be able
to easily crack it.
Andrew J. Kelly SQL MVP
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
> Using a password on a backup doesn't prevent other people reading your
data.
> It just prevents an unauthorised person using SQLServer to restore the
data
> and therefore may make it slightly more difficult for them to access the
> data. The backup isn't encrypted so it's still possible to read the backup
> media using third party tools.
> In short, if the confidentiality of your data is important to you, you
> probably shouldn't rely on a backup password (of any length).
> --
> David Portas
> SQL Server MVP
> --
>|||Hello and thanks both for your response, 3d party tools
can read the structure of DB from bakcup file, right?
Thanks in advance?
Konstantinos
>--Original Message--
>To add some to David's correct response there is a 3rd
party tool called SQL
>LiteSpeed that will encrypt the entire backup for you
and they won't be able
>to easily crack it.
>
>--
>Andrew J. Kelly SQL MVP
>
>"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org>
wrote in message
>news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
>> Using a password on a backup doesn't prevent other
people reading your
>data.
>> It just prevents an unauthorised person using
SQLServer to restore the
>data
>> and therefore may make it slightly more difficult for
them to access the
>> data. The backup isn't encrypted so it's still
possible to read the backup
>> media using third party tools.
>> In short, if the confidentiality of your data is
important to you, you
>> probably shouldn't rely on a backup password (of any
length).
>> --
>> David Portas
>> SQL Server MVP
>> --
>>
>
>.
>|||What do you mean by that? The 3rd party tool I was referring to simply does
a backup and encrypts the resulting backup file. Are you asking if it can
then read the file later on? If so then of coarse as it would be pretty
useless to encrypt the file and not be able to restore it. But you will
need the key to do this and if memory serves me right it is 128 bit (or
higher) encryption.
Andrew J. Kelly SQL MVP
"ATHENS 2004" <anonymous@.discussions.microsoft.com> wrote in message
news:d8b101c43a8f$4f4b8460$a601280a@.phx.gbl...
> Hello and thanks both for your response, 3d party tools
> can read the structure of DB from bakcup file, right?
> Thanks in advance?
> Konstantinos
> >--Original Message--
> >To add some to David's correct response there is a 3rd
> party tool called SQL
> >LiteSpeed that will encrypt the entire backup for you
> and they won't be able
> >to easily crack it.
> >
> >
> >
> >--
> >Andrew J. Kelly SQL MVP
> >
> >
> >"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org>
> wrote in message
> >news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
> >> Using a password on a backup doesn't prevent other
> people reading your
> >data.
> >> It just prevents an unauthorised person using
> SQLServer to restore the
> >data
> >> and therefore may make it slightly more difficult for
> them to access the
> >> data. The backup isn't encrypted so it's still
> possible to read the backup
> >> media using third party tools.
> >>
> >> In short, if the confidentiality of your data is
> important to you, you
> >> probably shouldn't rely on a backup password (of any
> length).
> >>
> >> --
> >> David Portas
> >> SQL Server MVP
> >> --
> >>
> >>
> >
> >
> >.
> >|||I don't know of any tool specifically designed to read a password protected
SQL backup if that's what you mean. I was actually referring to software
that can read *any* data from backup media (for example:
http://www.intermedia.uk.com/mmpc.htm). If you can read the data file then
it's certainly possible to extract information from it. I'm pretty sure it's
also theoretically possible to hack a password-protected backup so that it
can be restored to SQLServer without the password.
--
David Portas
SQL Server MVP
--|||I see, thank you both answering!
>--Original Message--
>Hello and thanks both for your response, 3d party tools
>can read the structure of DB from bakcup file, right?
>Thanks in advance?
>Konstantinos
>>--Original Message--
>>To add some to David's correct response there is a 3rd
>party tool called SQL
>>LiteSpeed that will encrypt the entire backup for you
>and they won't be able
>>to easily crack it.
>>
>>--
>>Andrew J. Kelly SQL MVP
>>
>>"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org>
>wrote in message
>>news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
>> Using a password on a backup doesn't prevent other
>people reading your
>>data.
>> It just prevents an unauthorised person using
>SQLServer to restore the
>>data
>> and therefore may make it slightly more difficult for
>them to access the
>> data. The backup isn't encrypted so it's still
>possible to read the backup
>> media using third party tools.
>> In short, if the confidentiality of your data is
>important to you, you
>> probably shouldn't rely on a backup password (of any
>length).
>> --
>> David Portas
>> SQL Server MVP
>> --
>>
>>
>>.
>.
>
Backup passw
I perform a backup with a password (quiet long), but I'm
afraid of tools that may read the password/break the file.
My question is if I place a long password would it be
more difficult tools read the passw (255 chars) or it's
hopeless?
Thanks in advance!
Konstantinos Michas
Using a password on a backup doesn't prevent other people reading your data.
It just prevents an unauthorised person using SQLServer to restore the data
and therefore may make it slightly more difficult for them to access the
data. The backup isn't encrypted so it's still possible to read the backup
media using third party tools.
In short, if the confidentiality of your data is important to you, you
probably shouldn't rely on a backup password (of any length).
David Portas
SQL Server MVP
|||To add some to David's correct response there is a 3rd party tool called SQL
LiteSpeed that will encrypt the entire backup for you and they won't be able
to easily crack it.
Andrew J. Kelly SQL MVP
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
> Using a password on a backup doesn't prevent other people reading your
data.
> It just prevents an unauthorised person using SQLServer to restore the
data
> and therefore may make it slightly more difficult for them to access the
> data. The backup isn't encrypted so it's still possible to read the backup
> media using third party tools.
> In short, if the confidentiality of your data is important to you, you
> probably shouldn't rely on a backup password (of any length).
> --
> David Portas
> SQL Server MVP
> --
>
|||Hello and thanks both for your response, 3d party tools
can read the structure of DB from bakcup file, right?
Thanks in advance?
Konstantinos
>--Original Message--
>To add some to David's correct response there is a 3rd
party tool called SQL
>LiteSpeed that will encrypt the entire backup for you
and they won't be able
>to easily crack it.
>
>--
>Andrew J. Kelly SQL MVP
>
>"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org>
wrote in message[vbcol=seagreen]
>news:JuWdnZVgqIWAtTvdRVn-uw@.giganews.com...
people reading your[vbcol=seagreen]
>data.
SQLServer to restore the[vbcol=seagreen]
>data
them to access the[vbcol=seagreen]
possible to read the backup[vbcol=seagreen]
important to you, you[vbcol=seagreen]
length).
>
>.
>
|||What do you mean by that? The 3rd party tool I was referring to simply does
a backup and encrypts the resulting backup file. Are you asking if it can
then read the file later on? If so then of coarse as it would be pretty
useless to encrypt the file and not be able to restore it. But you will
need the key to do this and if memory serves me right it is 128 bit (or
higher) encryption.
Andrew J. Kelly SQL MVP
"ATHENS 2004" <anonymous@.discussions.microsoft.com> wrote in message
news:d8b101c43a8f$4f4b8460$a601280a@.phx.gbl...[vbcol=seagreen]
> Hello and thanks both for your response, 3d party tools
> can read the structure of DB from bakcup file, right?
> Thanks in advance?
> Konstantinos
> party tool called SQL
> and they won't be able
> wrote in message
> people reading your
> SQLServer to restore the
> them to access the
> possible to read the backup
> important to you, you
> length).
|||I don't know of any tool specifically designed to read a password protected
SQL backup if that's what you mean. I was actually referring to software
that can read *any* data from backup media (for example:
http://www.intermedia.uk.com/mmpc.htm). If you can read the data file then
it's certainly possible to extract information from it. I'm pretty sure it's
also theoretically possible to hack a password-protected backup so that it
can be restored to SQLServer without the password.
David Portas
SQL Server MVP
|||I see, thank you both answering!
>--Original Message--
>Hello and thanks both for your response, 3d party tools
>can read the structure of DB from bakcup file, right?
>Thanks in advance?
>Konstantinos
>party tool called SQL
>and they won't be able
>wrote in message
>people reading your
>SQLServer to restore the
>them to access the
>possible to read the backup
>important to you, you
>length).
>.
>
Friday, February 24, 2012
Backup Master key, Cannot write into file 'c:\temp\master'. Verify that you have write permiss
Hi,
I tried to backup the master key by the following syntax :
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'
BACKUP MASTER KEY TO FILE = 'c:\temp\master' ENCRYPTION BY PASSWORD = 'mypassword'
but it failed and i got the following message:
Cannot write into file 'c:\temp\master'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.
NB: I am using the "sa" user to execute this command.
I know that we have a security permission issue , but where and how ?
Regards,
Tarek Ghazali
SQL Server MVP
In this case the permissions check are done by Windows to verify that the SQL Server service account has access to create the file. Most likely you are running SQL Server using a low privileged domain account (which is highly recommended). To check the name of the service account being used, you can use SQL Server Configuration Manager (SCM).
Rather than granting permissions directly to this service account on local Windows resources, you can grant the permissions to the corresponding Windows group that SQL Server 2005 setup created for you. You can find the name of this group in the local users and groups management tool in Windows (Computer Management tool).
The name for the SQL Server 2005 groups should be based on the following pattern:
SQLServer2005MSSQLUser$<<Server_name>>$<<Instance_name >>
For example: SQLServer2005MSSQLUser$MY_SERVER$MSSQLSERVER
Once you have found the name for the service account group, you can grant the proper permissions on Windows resources (such as write permissions on folders or read permissions on files you need to import).
I hope this information will help you,
-Raul Garcia
SDE/T
SQL Server Engine
|||Hi Raul,
first Thanks for your reply.
I tried that also but it didn't work,
Any other idea ?
Thanks,
Tarek Ghazali
SQL Server MVP
Web site: www.sqlmvp.com
|||I forgot another reason why backup may fail: the backup operations for keys won’t replace any files, make sure the file name is unique. Let me know if changing the name of the file worked.
BTW. If you create backups of your master keys on a regular schedule and regenerate the keys (which is highly recommended), it is a good idea to keep an archive of your old keys (protected in a safe place) in case you need to access data from some old backup.
Thanks,
-Raul Garcia
SDE/T
SQL Server Engine
Backup Master key, Cannot write into file 'c:\temp\master'. Verify that you have write per
Hi,
I tried to backup the master key by the following syntax :
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'
BACKUP MASTER KEY TO FILE = 'c:\temp\master' ENCRYPTION BY PASSWORD = 'mypassword'
but it failed and i got the following message:
Cannot write into file 'c:\temp\master'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.
NB: I am using the "sa" user to execute this command.
I know that we have a security permission issue , but where and how ?
Regards,
Tarek Ghazali
SQL Server MVP
In this case the permissions check are done by Windows to verify that the SQL Server service account has access to create the file. Most likely you are running SQL Server using a low privileged domain account (which is highly recommended). To check the name of the service account being used, you can use SQL Server Configuration Manager (SCM).
Rather than granting permissions directly to this service account on local Windows resources, you can grant the permissions to the corresponding Windows group that SQL Server 2005 setup created for you. You can find the name of this group in the local users and groups management tool in Windows (Computer Management tool).
The name for the SQL Server 2005 groups should be based on the following pattern:
SQLServer2005MSSQLUser$<<Server_name>>$<<Instance_name >>
For example: SQLServer2005MSSQLUser$MY_SERVER$MSSQLSERVER
Once you have found the name for the service account group, you can grant the proper permissions on Windows resources (such as write permissions on folders or read permissions on files you need to import).
I hope this information will help you,
-Raul Garcia
SDE/T
SQL Server Engine
|||Hi Raul,
first Thanks for your reply.
I tried that also but it didn't work,
Any other idea ?
Thanks,
Tarek Ghazali
SQL Server MVP
Web site: www.sqlmvp.com
|||I forgot another reason why backup may fail: the backup operations for keys won’t replace any files, make sure the file name is unique. Let me know if changing the name of the file worked.
BTW. If you create backups of your master keys on a regular schedule and regenerate the keys (which is highly recommended), it is a good idea to keep an archive of your old keys (protected in a safe place) in case you need to access data from some old backup.
Thanks,
-Raul Garcia
SDE/T
SQL Server Engine