ms logparser导出到sql语句

发布于 2024-09-25 06:55:41 字数 435 浏览 0 评论 0原文

是否可以使用 logparser 命令行实用程序将 sql 语句输出为文本?它似乎一心想要实际连接到 sqlserver 并自动执行插入。我只想要一个包含表创建和插入语句的文本文件,以便我可以针对 sqlite 而不是 sqlserver 运行它们。或者如果您知道如何让 logparser 实用程序直接与 sqlite 一起使用,那也很好。我真的没有心情编写自己的实用程序,尽管有了 logparser.dll 的优点,这不会太难。目前,我想我必须使用 logparser 导出到 xml 而不是 sql,然后使用巧妙的 xslt 脚本将 xml 转换为 sql。

is it possible to use the logparser commandline utility to output sql statements as text? it seems bent on actually connecting to sqlserver and performing the inserts automatically. i just want a text file with the table creation and insert statements so that i can run them against sqlite instead of sqlserver. or if you know how to get logparser utility to work with sqlite directly that would be fine also. i'm really not in the mood to write my own utility, though it wouldn't be too hard with the logparser.dll goodness. at the moment, i think i'm going to have to use logparser to export to xml instead of sql, then use a clever xslt script to turn the xml into sql.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨洒年华 2024-10-02 06:55:41

您可以尝试使用 -o:SQL 选项并指定 SQLite 驱动程序:

logparser -i:W3C "select * from filename.w3c"
    -o:SQL -database:yourdb.db -driver:"SQLite3 ODBC Driver" 

You could try to use the -o:SQL option and specify the SQLite driver:

logparser -i:W3C "select * from filename.w3c"
    -o:SQL -database:yourdb.db -driver:"SQLite3 ODBC Driver" 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文