我在源数据库中发现视图下有两个表,但是导入到本地数据库后这两个表都没了,访问显示 Invalid object name 'vwNews'.
这个是导入后的
这是怎么回事 ,导出和导入好像都没有提示错误
------解决方案--------------------
是的,问题比较清晰了,你的视图引用了很多表,而你的表是否预先已经创建到目标数据库?如果没有,那么执行创建视图过程就会报错,然后创建不成功,
Msg 208, Level 16, State 1, Procedure vwNews, Line 9
Invalid object name 'gengjunzf3.NewsInfo'.
Msg 15135, Level 16, State 4, Procedure sp_addextendedproperty, Line 37
Object is invalid. Extended properties are not permitted on 'gengjunzf3.vwNews', or the object does not exist.
Msg 15135, Level 16, State 4, Procedure sp_addextendedproperty, Line 37
Object is invalid. Extended properties are not permitted on 'gengjunzf3.vwNews', or the object does not exist.
Msg 208, Level 16, State 1, Procedure vwJiedao, Line 9
Invalid object name 'gengjunzf3.JieDaoUser'.
Msg 15135, Level 16, State 4, Procedure sp_addextendedproperty, Line 37
Object is invalid. Extended properties are not permitted on 'gengjunzf3.vwJiedao', or the object does not exist.
Msg 15135, Level 16, State 4, Procedure sp_addextendedproperty, Line 37
Object is invalid. Extended properties are not permitted on 'gengjunzf3.vwJiedao', or the object does not exist.
先把这些里面提到的表预先创建再试试