通过cygwin sqlplus连接到远程oracle(connecting to remote oracle via cygwin sqlplus)
我试图使用cygwin sqlplus连接到位于myserver.mycompany.com端口1530的远程oracle安装。当我尝试
sqlplus username@myserver.mycompany.com:1530/orcl
我收到错误:
ORA-12154: TNS:could not resolve the connect identifier specified
当我将
ORACLE_HOME
设置为/cygdrive/c/oracle/product/10.2.0/client_1
,出现另一个错误:Error 6 initializing SQL*Plus Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
我可以telnet到服务器的端口1530,并且本地安装的SQL Developer也能够连接到数据库。 我究竟做错了什么?
I'm trying to use cygwin sqlplus to connect to a remote oracle installation located at myserver.mycompany.com port 1530. When I try
sqlplus username@myserver.mycompany.com:1530/orcl
I get the error:
ORA-12154: TNS:could not resolve the connect identifier specified
When I set
ORACLE_HOME
to /cygdrive/c/oracle/product/10.2.0/client_1
, I get a different error:Error 6 initializing SQL*Plus Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
I can telnet to the server's port 1530, and the SQL Developer installed locally is also able to connect to the database. What am I doing wrong?
原文:https://stackoverflow.com/questions/299504
最满意答案
这是为什么一致的缩进很重要的一个很好的例子。 在这里,我用一致的缩进修改了你发布的内容,问题更加明显(如果你没有使用有助于此的编辑器, JSONLint是一个方便的工具):
{ "query": { "filtered": { "query": { "more_like_this": { "fields": ["tags"], "like": ["t1", "t2"], "min_term_freq": 1, "min_doc_freq": 1 }, "filter": { "bool": { "must": [{ "match": { "category": "cat1" } }] } } } } }
您的过滤器是“查询”的子项,而不是“已过滤”的子项。
实际上,您不应该使用过滤,不推荐使用, 请参阅此处 。 您应该将其更改为bool,如此处所指定的那样。
This is a great example of why consistent indentation is important. Here, I've modified what you've posted with consistent indentation, and the problem is much more apparent (JSONLint is a handy tool, if you aren't using an editor that helps with this):
{ "query": { "filtered": { "query": { "more_like_this": { "fields": ["tags"], "like": ["t1", "t2"], "min_term_freq": 1, "min_doc_freq": 1 }, "filter": { "bool": { "must": [{ "match": { "category": "cat1" } }] } } } } }
Your filter is a child of "query", instead of a child of "filtered".
Really though, you shouldn't use filtered, it is deprecated, see here. You should change that to a bool, as specified there.
相关问答
更多-
按照常识,我发现以下是我想要的bool段: bool => { must => [ {match => { pcode => $postcode }}, ], should => [ {match => { address => $keyword }}, {match => { name => $keyword }}, ...
-
我会猜测你的字段是分析的,这是弹性搜索中的字符串字段的默认设置。 因此,当它编入索引时,它没有被索引为一个术语“更新时间”,而是作为2个术语:“更新”和“时间”。 这就是为什么你的术语搜索找不到这个词。 如果您的字段将始终包含必须完全匹配的值,则最好在映射中定义此字段为未分析。 您可以通过使用新映射重建索引来实现: curl -XPUT http://localhost:9200/your-index -d '{ "mappings" : { "your-type" : { ...
-
如何过滤弹性搜索查询(How to filter elastic search query)[2023-09-09]
所以通过修改代码解决了这个问题 exports.search = function (req, res) { if (!req.query.q) return res.status(400).send('No Query Provided') log.error(req.query.q) User.search({query_string: {query: req.query.q}}, (err, results) => { if (err) return handleError(re ... -
使用jQuery进行客户端表搜索 Using jQuery for client side table search
-
没有名为match过滤器,您可以使用term POST myapp/_search/ { "query": { "filtered": { "filter": { "bool": { "must": [ { "term": { "userName": "Micky" } }, { ...
-
我正在使用这个解决方案,而不是集成Zend Lucene我设法使用自动生成的Symonfy的过滤器。 这就是我这样做的方式: //module/actions.class.php public function executeIndex(sfWebRequest $request) { //set the form filter $this->searchForm = new EmployeeFormFilter(); //bind it empty to fetch a ...
-
这是为什么一致的缩进很重要的一个很好的例子。 在这里,我用一致的缩进修改了你发布的内容,问题更加明显(如果你没有使用有助于此的编辑器, JSONLint是一个方便的工具): { "query": { "filtered": { "query": { "more_like_this": { "fields": ["tags"], "like": ["t1", "t2"], "min_term_freq": 1, ...
-
NEST弹性搜索中的Lambda查询具有过滤器和值的数组(Lambda query in NEST elastic search to have array of filters and values)[2024-05-11]
您需要创建一个Bool Should过滤并传递可以动态生成的FilterContainer对象数组。 我编写了一个小代码片段,它将根据您的要求构建Nest查询。 var Filter = new List{ "field1", "field2" }; var Value = new List { "value1", "value2" }; var fc = new List (); for (int i = 0; i < 2 /* Size ... -
尝试这个 { "query": { "bool": { "must": [ { "match": { "Category": "Sport" } }, { "multi_match": { "query": "world series", "type": "cross_fields", ...
-
弹性搜索嵌套过滤器(elastic search nested filter)[2024-01-19]
您可以使用以下查询。 您还必须确保映射中的节拍定义为嵌套类型。 { "size": 10000, "query": { "bool": { "should": [{ "match": { "process_name": "process01" } }, { "match": { ...