Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

Disable TDE Expand / Collapse
Author
Message
Posted Wednesday, March 11, 2009 5:44 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay 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
Posted Thursday, March 12, 2009 5:42 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:11 PM
Points: 15,517, Visits: 27,898
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
Posted Thursday, March 12, 2009 10:44 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay 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
Posted Thursday, March 12, 2009 11:03 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:11 PM
Points: 15,517, Visits: 27,898
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
Posted Thursday, March 12, 2009 11:11 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:02 PM
Points: 33,062, Visits: 15,176
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
Posted Thursday, March 12, 2009 3:13 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay 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
Posted Thursday, March 12, 2009 3:27 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay 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
Posted Thursday, March 12, 2009 5:26 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:11 PM
Points: 15,517, Visits: 27,898
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
Posted Thursday, March 12, 2009 5:41 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 4:02 PM
Points: 33,062, Visits: 15,176
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
Posted Thursday, March 12, 2009 5:43 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay 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 »

Add to briefcase 123»»»

Permissions Expand / Collapse