homework-jianmu/2.0/documentation/tdenginedocs-cn/faq/index.html

33 lines
5.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang='cn'><head><title>文档 | 涛思数据</title><meta name='description' content='TDengine是一个开源的专为物联网、车联网、工业互联网、IT运维等设计和优化的大数据平台。除核心的快10倍以上的时序数据库功能外还提供缓存、数据订阅、流式计算等功能最大程度减少研发和运维的工作量。'><meta name='keywords' content='大数据Big Data开源物联网车联网工业互联网IT运维, 时序数据库缓存数据订阅消息队列流式计算开源涛思数据TAOS Data, TDengine'><meta name='title' content='文档 | 涛思数据'><meta property='og:site_name' content='涛思数据'/><meta property='og:title' content='文档 | 涛思数据'/><meta property='og:type' content='article'/><meta property='og:url' content='https://www.taosdata.com/cn/documentation/faq-ch/index.php'/><meta property='og:description' content='TDengine是一个开源的专为物联网、车联网、工业互联网、IT运维等设计和优化的大数据平台。除核心的快10倍以上的时序数据库功能外还提供缓存、数据订阅、流式计算等功能最大程度减少研发和运维的工作量。' /><link rel='canonical' href='https://www.taosdata.com/cn/documentation/faq-ch/index.php'/><script src='../lib/jquery-3.4.1.min.js' type='application/javascript'></script><link href='../lib/bootstrap.min.css' rel='stylesheet'><link href='../styles/base.min.css' rel='stylesheet'><link rel='stylesheet' href='../lib/docs/taosdataprettify.css'><link rel='stylesheet' href='../lib/docs/docs.css'><script src='../lib/docs/prettify.js'></script><script src='../lib/docs/prettyprint-sql.js'></script></head><body><script>$('#documentation-href').addClass('active')</script><div class='container-fluid'><main class='content-wrapper'><section class='documentation'><a href='../index.html'>回去</a><h1>常见问题</h1>
<h4>1. 遇到错误"failed to connect to server", 我怎么办?</h4>
<p>客户端遇到链接故障,请按照下面的步骤进行检查:</p>
<ol>
<li>在服务器,执行 <code>systemctl status taosd</code> 检查<em>taosd</em>运行状态。如果没有运行,启动<em>taosd</em></li>
<li>确认客户端连接时指定了正确的服务器IP地址</li>
<li>ping服务器IP如果没有反应请检查你的网络</li>
<li>检查防火墙设置确认TCP/UDP 端口6030-6039 是打开的</li>
<li>对于Linux上的JDBCODBC, Python, Go等接口类似连接, 确保<em>libtaos.so</em>在目录<em>/usr/local/lib/taos</em>里, 并且<em>/usr/local/lib/taos</em>在系统库函数搜索路径<em>LD_LIBRARY_PATH</em></li>
<li>对于windows上的JDBC, ODBC, Python, Go等连接确保<em>driver/c/taos.dll</em>在你的系统搜索目录里 (建议<em>taos.dll</em>放在目录 <em>C:\Windows\System32</em>)</li>
<li>如果仍不能排除连接故障请使用命令行工具nc来分别判断指定端口的TCP和UDP连接是否通畅
检查UDP端口连接是否工作<code>nc -vuz {hostIP} {port}</code>
检查服务器侧TCP端口连接是否工作<code>nc -l {port}</code>
检查客户端侧TCP端口链接是否工作<code>nc {hostIP} {port}</code></li>
</ol>
<h4>2. 虽然语法正确,为什么我还是得到 "Invalid SQL" 错误</h4>
<p>如果你确认语法正确请检查SQL语句长度是否超过64K。如果超过也会返回这个错误。</p>
<h4>3. 为什么我删除超级表总是失败?</h4>
<p>请确保超级表下已经没有其他表,否则系统不允许删除该超级表。</p>
<h4>4. 是否支持validation queries?</h4>
<p>TDengine还没有一组专用的validation queries。然而建议你使用系统监测的数据库”log"来做。</p>
<h4>5. 我可以删除或更新一条记录吗?</h4>
<p>不能。因为TDengine是为联网设备采集的数据设计的不容许修改。但TDengine提供数据保留策略只要数据记录超过保留时长就会被自动删除。</p>
<h4>6. 我怎么创建超过250列的表</h4>
<p>TDengine最大允许创建250列的表。但是如果确实超过我们建议按照数据特性逻辑地将这个宽表分解成几个小表。</p>
<h4>7. 最有效的写入数据的方法是什么?</h4>
<p>批量插入。每条写入语句可以一张表同时插入多条记录,也可以同时插入多张表的记录。</p>
<h4>8. windows系统下插入的nchar类数据中的汉字被解析成了乱码如何解决</h4>
<p>windows下插入nchar类的数据中如果有中文请先确认系统的地区设置成了中国在Control Panel里可以设置这时cmd中的<code>taos</code>客户端应该已经可以正常工作了如果是在IDE里开发Java应用比如Eclipse Intellij请确认IDE里的文件编码为GBK这是Java默认的编码类型然后在生成Connection时初始化客户端的配置具体语句如下</p>
<p> Class.forName("com.taosdata.jdbc.TSDBDriver");</p>
<p> Properties properties = new Properties();</p>
<p> properties.setProperty(TSDBDriver.LOCALE_KEY, "UTF-8");</p>
<p> Connection = DriverManager.getConnection(url, properties);</p><a href='../index.html'>回去</a></section></main></div><?php include($s.'/footer.php'); ?><script>$('pre').addClass('prettyprint linenums');PR.prettyPrint()</script><script src='lib/docs/liner.js'></script></body></html>