使用SSMA将数据从Access迁移到SQL Server时出错

时间:2017-04-25 13:28:01

标签: sql-server ms-access

我正在尝试使用SSMA将两个数据库从Access 2007迁移到SQL Server 2014.SSMA识别Access数据库,但表和查询显示为零。我已经修改了允许管理员控制的权限,这些是原始数据库的副本,但表格没有显示。有什么我可以失踪的吗?

2 个答案:

答案 0 :(得分:2)

我有同样的问题,经过几个小时看这个问题,它似乎是一个属性" SSMATableState"在桌子上将它们隐藏在SSMA中。 可能SSMA补充说,使用后,我猜......

在Access中添加一个模块和此代码,运行它以删除它:

Sub tabsSSMAfix()
    Dim t As TableDef, a, p
    Dim db As Database
    Set db = CurrentDb
    For Each t In db.TableDefs
        If (t.Attributes And dbSystemObject)=0 Then
            Debug.Print t.Attributes 
            Debug.Print t.SourceTableName
            'If (t.Attributes And dbAttachSavePWD) Then Debug.Print "pwd"
            For Each p In t.Properties
                Debug.Print t.Name; " "; p.Name; "="; p
                If p.Name = "SSMATableState" Then
                    t.Properties.Delete "SSMATableState"
                End If
            Next p
            Debug.Print
        End If
    Next t
End Sub

答案 1 :(得分:0)

最近有同样的问题。 确保使用名为的连接: 本机OLE DB \ Microsoft Office 12.0 Access数据库引擎OLE DB提供程序。

您可以在预览数据时使用正确的提供商。