Friday, March 23, 2012
Restore the Database
I am using SQL 2000 Server.
I've backedup one of my SQL server Database with the
password using sql statement like :
Backup database <databasename> to <devicename> with
password=''?'
But after a few months I forget the password what I have
given during backup. Now I could not restore the database
from the backup file.
1) How can I restore the Database from the backup file
without password or
2) How can I know what the password is given during backup
Thanks
Shafinur
MCP, MCSD, MCDBA
tiptopsr@.agni.comThis is a multi-part message in MIME format.
--=_NextPart_000_002E_01C3B1AC.31729530
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I'm afraid you're out of luck. Part of backing up with a password is
keeping the password in a secure place - like the company safe - or just
remembering well.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Shafinur" <tiptopsr@.agni.com> wrote in message
news:066701c3b1d3$cc53b6c0$a301280a@.phx.gbl...
Hello,
I am using SQL 2000 Server.
I've backedup one of my SQL server Database with the
password using sql statement like :
Backup database <databasename> to <devicename> with
password=''?'
But after a few months I forget the password what I have
given during backup. Now I could not restore the database
from the backup file.
1) How can I restore the Database from the backup file
without password or
2) How can I know what the password is given during backup
Thanks
Shafinur
MCP, MCSD, MCDBA
tiptopsr@.agni.com
--=_NextPart_000_002E_01C3B1AC.31729530
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#c0c0c0>
<DIV><FONT face=3DTahoma size=3D2>I'm afraid you're out of luck. =Part of backing up with a password is keeping the password in a secure place - =like the company safe - or just remembering well.</FONT></DIV>
<DIV><BR>-- <BR> Tom</DIV>
<DIV> </DIV>
<DIV>----<BR>Thomas A. =Moreau, BSc, PhD, MCSE, MCDBA<BR>SQL Server MVP<BR>Columnist, SQL Server Professional<BR>Toronto, ON Canada<BR><A href=3D"www.pinnaclepublishing.com=">http://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=
/sql</A><BR>.</DIV>
<DIV>"Shafinur" <<A =href=3D"mailto:tiptopsr@.agni.com">tiptopsr@.agni.com</A>> wrote in message <A href=3D"news:066701c3b1d3$cc53b6c0$a301280a@.phx.gbl">news:066701c3b1d3$cc=53b6c0$a301280a@.phx.gbl</A>...</DIV>Hello,<BR>I am using SQL 2000 Server.<BR>I've backedup one of my SQL server Database =with the <BR>password using sql statement like :<BR><BR>Backup database <databasename> to <devicename> with =<BR>password=3D''?'<BR><BR>But after a few months I forget the password what I have <BR>given during =backup. Now I could not restore the database <BR>from the backup file.<BR><BR>1) =How can I restore the Database from the backup file <BR>without password =or<BR>2) How can I know what the password is given during backup<BR><BR>Thanks<BR><BR>Shafinur<BR>MCP, MCSD, MCDBA<BR><A href=3D"mailto:tiptopsr@.agni.com">tiptopsr@.agni.com</A><BR><BR></BODY></H=TML>
--=_NextPart_000_002E_01C3B1AC.31729530--
Wednesday, March 7, 2012
restore MSSQL BAK file by TSQL
Hi,
I need an application with asp.net that let me restore database by getting .bak file and database name and database user and user password, my database is SQL Server 2005.
There is an open source one named
Database Publishing Services 1.1
Google it or search Microsoft site about it
HTH
Regards
Saturday, February 25, 2012
Restore Master Key
Do we need to know the database master key password inorder to restore the same from a Master Key backup ?
What if the scenario is like, I have Master Key backup file but do not have the password specified at the time of creation ?
Any help is appreciated.
satya
You need the password. If you don't have it, you cannot use the backup.
Thanks
Laurentiu
Thanks
I needed just a clarification. We are actually trying to develop an implementation strategy for encrypting data in SQL 2005.
satya
|||Quick Follow-up on this. This is what exactly I am trying to test.
1. Create Master Key with password
2. Create certificate (encrypted by master key)
3. Create symmetric key (encrypted by certificate)
4. insert encrypted data using encryptbykey built-in
5. Test decryption using built-in decryptbykeyautocert
Once this all is working fine, do these backups
1. Backup Master Key
2. Backup Certificate as .CER file and private key as .PVK file.
Drop the these following security objects
1. Drop symmetric key
2. Drop certificate
3. Drop master key
Restore keys from backups
1. Restore master key
2. Create certificate from backups
3. Create symmetric key
I receive no errors while performing these T-SQL statements, but I am no longer able to view previously encrypted data. Decrypted values showing as NULL
Do you think, I am trying to do something wrong here ?
thanks
satya
|||To recreate the same symmetric key that you used for encryption, you need to use the same algorithm, identity_value, and key_source in the CREATE SYMMETRIC KEY statement. Also take a look at: http://blogs.msdn.com/lcris/archive/2005/10/14/481434.aspx, the last pargraph is relevant to this.
Thanks
Laurentiu
Works like a charm !! Thanks.
Only concern, I have is that we need to remember little more things for recover process to work perfectly :)
Is there any white paper yet on "Recocering Encrypted databases".
thanks
satya
|||You could store those pieces of information in a separate table encrypted by a certificate.
What exactly would you like covered under the title "recovering encrypted databases"?
Thanks
Laurentiu
Most of it I can find it in your blogs. May be I am looking for a consolidated one.
Key Management - Best Practices in symmetric key encryption, asymmetric encryption (or using certificates) and hybrid approach (Symmetric Key getting encrypted by certificates)|||For the FORCE option, see http://blogs.msdn.com/lcris/archive/2006/04/10/572678.aspx. It's not an option to bypass the password protection.
I'll transmit your suggestions to our documentation team, so they can look into adding new articles on these topics or update existing articles and add more information.
Thanks
Laurentiu