我已经创建了XML文件,我想将xml文件插入到sql表中。 [英] I have created on XML file and I want to insert xml file in to sql table.

查看:98
本文介绍了我已经创建了XML文件,我想将xml文件插入到sql表中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的代码

I have used below code

INSERT INTO E_AutoIssue_EmailTemplates (Template_value)
SELECT * FROM OPENROWSET(
   BULK 'C:\Amey\ACE\XML\60 days autoissue.xml',
   SINGLE_BLOB) where EmailTemplateId=1;



但它给了我许可错误



消息4834,等级16,状态1,行5

您无权使用批量加载对帐单。





还有其他的将文件插入表


but it gives me permission error as

Msg 4834, Level 16, State 1, Line 5
You do not have permission to use the bulk load statement.


Is there any other to insert the file in table

推荐答案

这是@Aleksandar Vucetic在 StackOverflow [ ^ ]

1.启动SQL Server Managament Studio

2.展开安全性 - >登录

3.找到您的用户,右键单击它并获取属性

4.打开服务器角色选项卡

5.确保已检查bulkadmin。

6.如果bulkadmin不适合你,你可以尝试其他角色。

7.点击好的



试试这个:)
Here is step wise solution by @Aleksandar Vucetic on StackOverflow[^]
1. Start SQL Server Managament Studio
2. Expand Security->Logins
3. Locate your user, right click on it and take Properties
4. Open Server Roles tab
5. Make sure that bulkadmin is checked.
6. There you can experiment with other roles if bulkadmin doesn't work for you.
7. Click OK

Try this :)


这篇关于我已经创建了XML文件,我想将xml文件插入到sql表中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆