access导入到sql server,查看access 建表sql

access导入到sql server,查看access 建表sql


首先解除SQL对组件"Ad Hoc Distributed Queries"的"STATEMENT'OpenRowset OpenDatasource"的访问

 

做法:

打开sql server的sql窗口,运行下列命令:

exec  sp_configure  ' show advanced options ' , 1
 reconfigure
 exec  sp_configure  ' Ad Hoc Distributed Queries ' , 1
 reconfigure

 

然后开始导入access表 :

SELECT *
INTO st_stbprp_b
FROM OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0',   'Data Source="w:\shanghong2.mdb";User ID=Admin;Password=')... st_stbprp_b

 

o了

 

你可能感兴趣的:(sql,SQL Server,Microsoft,Access)