How can we help you today? How can we help you today?

Crashes with An unexpected error....

Is there any workaround for the error below.
It is rendering this tool completely unusable.
I would be grateful for any tips.

I have checked permissions and DBCC

Best regards 
JohnLeo Carton

Error
------------------------------------------------------------------------------------------------------------------------------------------------------------

An unexpected error was encountered while querying the database system tables (for Comment). You may have insufficient permissions, or the database may be in an inconsistent state.  You are recommended to use SQL Compare with dbo permissions.  You can check the database is in a consistent state by running DBCC CHECKDB.

Original error message: Cannot load the Backup Reader dll (see inner exception)!

Query being executed: SQL query: 

SELECT sm.object_id AS id,

definition AS text,

1 AS colid, 

(CASE WHEN OBJECTPROPERTY(so.object_id, N'IsReplProc')<>0 OR so.type = 'P' THEN 1 ELSE 0 END) AS number, 

CAST(CASE WHEN sm.definition IS NULL THEN 1 ELSE 0 END AS bit)  AS Encrypted, -- https://msdn.microsoft.com/en-us/library/ms175081.aspx 

CONVERT(bit, CASE WHEN so.type = 'D' AND so.parent_object_id != 0 THEN 1 ELSE 0 END) AS IsDefault,

ISNULL(sm.uses_quoted_identifier, 0) AS QuotedIdentifier,

NULL AS ctext

FROM sys.sql_modules sm WITH (NOLOCK)

LEFT JOIN sys.objects so WITH (NOLOCK) ON so.object_id = sm.object_id

WHERE (so.type in ('P', 'V', 'TR', 'TA', 'IF', 'FN', 'TF', 'FS', 'FT')

OR (so.type = 'D' AND so.parent_object_id != 0)

OR sm.object_id IN (SELECT object_id FROM sys.triggers WITH (NOLOCK) WHERE parent_class=0))

UNION ALL

SELECT d.object_id AS id,

d.definition AS text,

parent_column_id AS colid,

0 AS number, 

CAST(0 AS BIT) AS Encrypted, -- Not encryptable https://msdn.microsoft.com/en-us/library/ms173758.aspx

CAST(1 AS BIT) AS IsDefault,

CAST(0 AS BIT) AS QuotedIdentifier,

NULL AS ctext

FROM sys.default_constraints d WITH (NOLOCK)

UNION ALL

SELECT

p.object_id AS id,

p.definition AS text, 

CAST(1 as int) AS colid, 

procedure_number AS number, 

CAST(CASE WHEN p.definition IS NULL THEN 1 ELSE 0 END AS bit) AS Encrypted, -- https://msdn.microsoft.com/en-us/library/ms179865.aspx

CAST(0 as bit) AS IsDefault,

m.uses_quoted_identifier AS QuotedIdentifier,

NULL AS ctext

FROM sys.numbered_procedures p WITH (NOLOCK)

LEFT JOIN sys.sql_modules m WITH (NOLOCK) ON p.object_id = m.object_id



ORDER BY id, colid, number


JLMCC
0

Comments

7 comments

  • trustthedba
    I have the same error popping up for me on one database as well. SQL Source Control works for the other two databases I have enabled source control on.

    I have the proper permissions and DBCC comes back fine.

    I am also able to run the query manually with no issues.

    Below is the inner exception if that helps Redgate.
    trustthedba
    0
  • JAR
    I am having the same problem also,  I got this error when trying to setup source control on a new computer.  This computer has had modifications to the TLS settings due to some changes we are testing to communicate only on tls1.2.  Don't know if this caused the error or not.  

    I did verify that DBCC CheckDB came back fine as well.  
    JAR
    0
  • trustthedba
    Redgate messaged me when I placed a support ticket, it's a bug, you will have to update to the new version.
    trustthedba
    0
  • JAR
    Thanks for the information.  I checked for updates and it tells me it is up to date.  So I am guessing that it has not been released yet.
    JAR
    0
  • trustthedba
  • trustthedba
  • JAR
    Worked like a champ, thanks!
    JAR
    0

Add comment

Please sign in to leave a comment.