启用Ad Hoc Distributed Queries 在使用openrowset/opendatasource前搜先要启用Ad Hoc Distributed Queries服务,因为这个服务不安全所以SqlServer默认是关闭的 启用Ad Hoc Distributed Queries的方法 SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问,因为此组件已作为此
MySQL中你可以使用SELECT...INTO OUTFILE语句来简单的导出数据到文本文件上. show global variables like '%secure%';SHOW VARIABLES LIKE "secure_file_priv";secure_file_prive=null -- 限制mysqld 不允许导入导出secure_file_priv=/tmp/ -- 限制mysqld的导入导出只能发生在/tmp/目录下secure_file_priv='' -- 不
1.导出本地数据库数据到本地文件 mysql -A service_db -h your_host -utest -ptest mysql> select * from t_apps where created>'2012-07-02 00:00:00' into outfile /tmp/apps.csv 2.导出远程数据库数据到本地文件 mysql -A service_db -h your_host -utest -ptest -ss -e "SELECT * from t_a