Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Disable TDE
22 posts, Page 1 of 3
1
2
3
»
»»
Disable TDE
Rate Topic
Display Mode
Topic Options
Author
Message
Amit Lohia
Amit Lohia
Posted Wednesday, March 11, 2009 5:44 PM
Say Hey Kid
Group: General Forum Members
Last Login: Saturday, January 22, 2011 12:01 PM
Points: 702,
Visits: 174
Guys,
What is the best way to disable TDE. I uncheck the "Set Database Encryption On property" but I am still not able to restore or attach the database on a different server.
The value of is_encrypted in sys.databases is 0 (after the uncheck).
The error message while restoring the database on a different server
Msg 3283, Level 16, State 1, Line 1
The file "AdventureWorks_Log" failed to initialize correctly. Examine the error logs for more details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
and thumb print error while doing attach.
Kindest Regards,
Amit Lohia
Post #673845
Grant Fritchey
Grant Fritchey
Posted Thursday, March 12, 2009 5:42 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:04 PM
Points: 13,375,
Visits: 25,159
This seems to work. Set it to off, backup the database with a new backup and you should be able to restore to another server without the need for certificates.
ALTER DATABASE dbname
SET ENCRYPTION OFF
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #674103
Amit Lohia
Amit Lohia
Posted Thursday, March 12, 2009 10:44 AM
Say Hey Kid
Group: General Forum Members
Last Login: Saturday, January 22, 2011 12:01 PM
Points: 702,
Visits: 174
Same issue. Even restart of instances do not work. Did anyone try this?
Kindest Regards,
Amit Lohia
Post #674454
Grant Fritchey
Grant Fritchey
Posted Thursday, March 12, 2009 11:03 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:04 PM
Points: 13,375,
Visits: 25,159
Yep. Just did. Works great. Turn on encryption on one machine, including setting a certificate and enabling it on the database. I ran a backup from there that was encrypted. I then disabled encryption, ran a backup and restored that backup to another server. All done. No issues.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #674474
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Thursday, March 12, 2009 11:11 AM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 6:14 PM
Points: 31,421,
Visits: 13,734
How large is the db? might take time to undo encryption.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #674482
Amit Lohia
Amit Lohia
Posted Thursday, March 12, 2009 3:13 PM
Say Hey Kid
Group: General Forum Members
Last Login: Saturday, January 22, 2011 12:01 PM
Points: 702,
Visits: 174
Can someone run the following commands and confirm if this is working for them.
You will need two server or instances and I am assuming server already have Master Key
USE master;
GO
-- Please make sure to create a newcertificate because your existing certificate may be on both
--server.
CREATE CERTIFICATE NewCertificate WITH SUBJECT = 'To Test TDE'
go
CREATE DATABASE TDEDisabling
GO
USE TDEDisabling
GO
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_128
ENCRYPTION BY SERVER CERTIFICATE NewCertificate
GO
ALTER DATABASE TDEDisabling
SET ENCRYPTION ON
GO
-- We have Encription ON
-- Verify Encription
WAITFOR DELAY '00:00:30'
SELECT * FROM sys.dm_database_encryption_keys
GO
BACKUP DATABASE [TDEDisabling] TO DISK = N'J:\Backups\TDEDisabling.bak' WITH NOFORMAT, NOINIT, NAME = N'TDEDisabling-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
-- Trying restoring the backup on a DIFFERENT server/instance it will fail (due to encryption)
-- Delete the backup file
ALTER DATABASE TDEDisabling
SET ENCRYPTION OFF
GO
WAITFOR DELAY '00:00:30'
SELECT * FROM sys.dm_database_encryption_keys
--Confirm no encryption is going on
GO
BACKUP DATABASE [TDEDisabling] TO DISK = N'J:\Backups\TDEDisabling.bak' WITH NOFORMAT, NOINIT, NAME = N'TDEDisabling-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
-- Restoring on a different server/INSTANCE.
RESTORE DATABASE [TDEDisabling] FROM DISK = N'J:\Backups\TDEDisabling.bak' WITH FILE = 1, MOVE N'TDEDisabling_log' TO N'I:\Logs\TDEDisabling_1.LDF', NOUNLOAD, STATS = 10
GO
-- I am still getting the following error. Though I see the database but it is not accesable
14 percent processed.
24 percent processed.
34 percent processed.
44 percent processed.
54 percent processed.
64 percent processed.
74 percent processed.
84 percent processed.
94 percent processed.
100 percent processed.
Processed 160 pages for database 'TDEDisabling', file 'TDEDisabling' on file 1.
Processed 1 pages for database 'TDEDisabling', file 'TDEDisabling_log' on file 1.
Msg 3283, Level 16, State 1, Line 1
The file "TDEDisabling_log" failed to initialize correctly. Examine the error logs for more details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Kindest Regards,
Amit Lohia
Post #674760
Amit Lohia
Amit Lohia
Posted Thursday, March 12, 2009 3:27 PM
Say Hey Kid
Group: General Forum Members
Last Login: Saturday, January 22, 2011 12:01 PM
Points: 702,
Visits: 174
Steve Jones - Editor (3/12/2009)
How large is the db? might take time to undo encryption.
I confirmed the status and it is not even working on a new database.
Kindest Regards,
Amit Lohia
Post #674774
Grant Fritchey
Grant Fritchey
Posted Thursday, March 12, 2009 5:26 PM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:04 PM
Points: 13,375,
Visits: 25,159
I think that's a torn page error. Try running a consistency check on the source db.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #674852
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Thursday, March 12, 2009 5:41 PM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 6:14 PM
Points: 31,421,
Visits: 13,734
There's definitely something wrong. Can you backup and restore the source without issues to itself?
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #674857
Amit Lohia
Amit Lohia
Posted Thursday, March 12, 2009 5:43 PM
Say Hey Kid
Group: General Forum Members
Last Login: Saturday, January 22, 2011 12:01 PM
Points: 702,
Visits: 174
No TORN page error either. Same issue with new database also. Did you try using the command I post.
Kindest Regards,
Amit Lohia
Post #674859
« Prev Topic
|
Next Topic »
22 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.