如何使用 SQLCMD 将 Microsoft Access 数据库 (mdb) 导入到 SQL Express 文件中?

发布于 2024-10-08 12:08:24 字数 319 浏览 0 评论 0原文

由于某种原因,由于某些安全策略,SQL 管理工作室和导入和导出向导都无法在我的朋友网络上运行,

两天前我问了一个有关 OSQL 的问题,StackOverflow 的人告诉我它将被淘汰,我应该使用 SQLCMD。

现在我被这个屏幕困住了,无法做任何事情:(

alt text

长话短说,我的问题非常精确:

使用 SQLCMD..

1-需要从 AND 导入和导出命令到 MDB/MDF

2-需要附加/分离命令

For some reason neither SQL managment studio nor import and export wizard works on my friends network due to some security policy

i asked a question about OSQL two days ago and StackOverflow guys told me it is going to be obselete and that i should use SQLCMD instead.

now i am stuck with this screen and cant do anything :(

alt text

to cut long things short my question is very precise:

using SQLCMD..

1-need to import and export command from AND to MDB/MDF

2-need attach / detach commands

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

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

发布评论

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

评论(2

丢了幸福的猪 2024-10-15 12:08:24

下面的mokokamello

介绍了如何附加新数据库并确保已附加数据库

alt text

您还需要检查这些链接

< a href="http://msdn.microsoft.com/en-us/library/ms165673.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms165673.aspx

http://msdn.microsoft.com/en-us/库/ms188031.aspx
最重要的链接

http://support.microsoft.com/kb/224071

如果您想要分离

sp_detach_db DatabaseName
Go

mokokamello

below is how to attach new database and make sure your database is attached

alt text

you also will need to check these links

http://msdn.microsoft.com/en-us/library/ms165673.aspx

http://msdn.microsoft.com/en-us/library/ms188031.aspx
AND THE MOST IMPORTANT LINK

http://support.microsoft.com/kb/224071

if you want to dettach

sp_detach_db DatabaseName
Go
也只是曾经 2024-10-15 12:08:24

SQLCMD 允许您向所选服务器输入 Transact-SQL 语句。

用于连接到外部数据源的 T-SQL 命令是 OPENDATASOURCE

更多信息 此处

您应该能够使用它构建一系列查询,以便提取和导出您正在使用的数据。

用于分离数据库的 SPrc 为 sp_detach_db,用于附加 sp_attach_db 的 SPrc

详细信息此处此处这里

SQLCMD allows you to enter Transact-SQL statements to the chosen server.

The T-SQL command for connecting to an external data source is OPENDATASOURCE

More info here:

You should be able to construct a series of queries using this in order to pull in, and export the data you are working with.

The SProc to detatch a database is sp_detach_db, and to attach sp_attach_db

More information here, here and here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文