如何使用Atom Editor&设置查询超时数据原子? [英] How to set query timeout using Atom Editor & Data-Atom?

查看:84
本文介绍了如何使用Atom Editor&设置查询超时数据原子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始将 Atom 与包

I'm start using Atom with the package Data-Atom for SQL Server connection.

但是执行查询时,我总是收到此错误:

But I keep getting this error when I execute a query:

结果: 错误(ETIMEOUT)-超时:请求未能在15000毫秒内完成"

Results: "Error (ETIMEOUT) - Timeout: Request failed to complete in 15000ms"

但是在Visual Studio上,相同的查询没有错误地执行,因此我认为服务器是可以的.

But on Visual Studio the same query executes without errors, so the server is ok I presume.

有解决此问题的方法吗?

There is a way to resolve this?

推荐答案

更新:连接选项未传递给node-mssql,但在

Update: The connection options weren't being passed through to node-mssql but after this PR is merged they will be.

为了将超时设置为一小时,我将以下内容添加到data-atom-connections.cson.

In my attempt to set the timeout to one hour I added the below to data-atom-connections.cson.

{
    name: "sqlserver01"
    protocol: "sqlserver"
    user: "dzamo"
    password: "norton"
    server: "sqlserver01.localdomain"
    database: "AdventureWorks"

    options: "requestTimeout=36000000"
}

什么也没发生.我必须在~/.atom/packages/data-atom/node_modules/tedious/lib/connection.js中对其进行硬编码才能使长时间运行的查询起作用.我将对此进行更多调查,并在github上打开一个错误.

And nothing happened. I had to go and hardcode it in ~/.atom/packages/data-atom/node_modules/tedious/lib/connection.js to get a long-running query to work. I'll investigate this a bit more and open a bug on github.

这篇关于如何使用Atom Editor&设置查询超时数据原子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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