小编Sil*_*mra的帖子

为什么这个PostgreSQL全文搜索会在不同的(RDS)服务器上中断?

在多个开发服务器上,此查询已返回预期记录:

SELECT name, name_tsv FROM vision 
WHERE name_tsv @@ plainto_tsquery('Washington Square Park');
Run Code Online (Sandbox Code Playgroud)

name_tsv最初是在我的开发服务器上填充的

UPDATE vision SET name_tsv=to_tsvector(name);
Run Code Online (Sandbox Code Playgroud)

并通过触发器保持最新状态.

我在AWS PostgreSQL RDS实例上创建了相同的数据库.dev和RDS postgres版本均为9.3.1.据我所知,每个pg_catalog都有相同的FTS配置,字典,解析器和模板(默认情况下;我没有在这里搞乱任何东西).当然,我无法访问RDS实例上的pg conf文件.在此RDS实例上,上面的查询返回0条记录.

我在两个上运行了这个诊断查询:

SELECT name, 
name_tsv, 
to_tsvector(name), 
plainto_tsquery('Washington Square Park'), 
name_tsv @@ plainto_tsquery('Washington Square Park') AS matches_stored_name,
to_tsvector(name) @@ plainto_tsquery('Washington Square Park') AS matches_fresh_tsvector
FROM vision WHERE id_vision = 2977;
Run Code Online (Sandbox Code Playgroud)

RDS实例的结果是:

"1609: Washington Square Park";"'1609':1 'park':4 'squar':3 'washington':2";"'1609':1 'park':4 'square':3 'washington':2";"'washington' & 'square' & 'park'";f;t
Run Code Online (Sandbox Code Playgroud)

dev实例的结果是:

"1609: Washington Square Park";"'1609':1 'park':4 'squar':3 'washington':2";"'1609':1 'park':4 'squar':3 'washington':2";"'washington' & 'squar' & …
Run Code Online (Sandbox Code Playgroud)

postgresql full-text-search amazon-web-services amazon-rds

6
推荐指数
1
解决办法
848
查看次数

如何通过"保存对话框"从ASP.NET MVC中的Azure下载PDF文件

我有一个存储在Azure存储上的文件,我需要从ASP.NET MVC控制器下载.下面的代码实际上工作正常.

string fullPath =  ConfigurationManager.AppSettings["pdfStorage"].ToString() + fileName ;
Response.Redirect(fullPath);
Run Code Online (Sandbox Code Playgroud)

但是,PDF将在同一页面中打开.我希望通过"保存"对话框下载文件,以便用户保持在同一页面上.在转移到Azure之前,我可以写

return File(fullPath, "application/pdf", file);
Run Code Online (Sandbox Code Playgroud)

但是Azure无法正常工作.

c# asp.net asp.net-mvc azure azure-storage

6
推荐指数
2
解决办法
3001
查看次数

在Ubuntu上从PHP连接到SQL Azure

我正在尝试通过在Ubuntu 11.04服务器上运行的PHP连接到SQL Azure数据库。

服务器正在运行PHP版本=> 5.3.5-1ubuntu7.11。

我已经使用apt-get install多次安装了freetds-bin,freetds-common,tdsodbc,odbcinst,php5-odbc和unixodbc。我试图用SSL支持编译FreeTDS,但不确定是否成功。

此时,在尝试使用isql工具进行连接时,出现错误“ 08S01-通信链接失败”。Microsoft的一篇文章将错误解释为“在SQLDriverConnect函数完成处理之前,驱动程序与驱动程序尝试连接到的数据源之间的通信链接失败。” 对此的一些研究明确指出FreeTDS中缺乏SSL支持,但是我不清楚如何验证已启用该功能。

我将使用PHP数据对象或mssql_ *函数连接到SQL Azure数据库。我对PDO不太熟悉,但似乎PDO不一定使用ODBC?我对此还不太清楚,并且我怀疑这导致我对isql看到的与我在PHP中看到的问题无关的问题进行故障排除。isql工具的连接问题是否与PHP中的PDO或mssql_ *函数中的连接问题有关?

我最近使用PDO的尝试是:

<?php

$c = new PDO("odbc:Driver=FreeTDS;Port=1433;Server=sssssssssss.database.windows.net;Database=db_xxxxx_xxx_xxx;UID=db_xxxxx_xxx_xxx_ExternalWriter;PWD=ppppppppp");

?>
Run Code Online (Sandbox Code Playgroud)

此代码在我的Apache日志文件中生成以下错误:

[2013年12月24日星期二13:23:10] [错误] [客户端10.1.1.11] PHP致命错误:消息为'SQLSTATE [08S01]的未捕获异常'PDOException'SQLDriverConnect:20004 [unixODBC] [FreeTDS] [SQL Server]读取从服务器失败'/var/www/test/pdo.php:3\n堆栈跟踪:\ n#0 /var/www/test/pdo.php(3):PDO-> __ construct('odbc:Driver = Fre ...')\ n#1 {main} \ n在第3行的/var/www/test/pdo.php中抛出

我的/etc/freetds/freetds.conf:

[global]
        # TDS protocol version
        tds version = 9.1

        # Whether to write a TDSDUMP file for diagnostic purposes
        # (setting this to /tmp is insecure on a multi-user system)
        dump file = /tmp/freetds.log
        debug flags = …
Run Code Online (Sandbox Code Playgroud)

php sql-server azure ubuntu-11.04 azure-sql-database

5
推荐指数
1
解决办法
1368
查看次数

使用远程桌面时,带 win 键的快捷键不起作用

我有一个关于Windows远程桌面的问题,就是这样。当我使用远程桌面时,我无法在远程窗口中使用Win键的任何快捷键,例如:win+D win+E。当我按 win 键时,它应该打开开始菜单,但什么也没发生。

我的客户端是windows 8.1,远程机器是windows server 2008 r2。

你遇到过这个问题吗?我应该怎么办?谢谢。

windows remote-desktop keyboard-shortcuts windows-server-2008-r2

5
推荐指数
1
解决办法
1万
查看次数

Windows 10 IOT通用Windows应用程序,如何以编程方式安装应用程序

在树莓派2上运行win10 IOT核心,我想知道以下是否可行:

1)运行无头应用程序,称为"版本检查程序".此外,还有其他多个无头应用正在运行.

2)如果有新版本的应用程序,它会下载该软件包

3)下载新包后,它会安装应用程序

如果可以的话,我应该从哪里开始?

install win-universal-app raspberry-pi2 windows-10-iot-core

5
推荐指数
1
解决办法
424
查看次数

Azure Elastic DB中ReferenceTableInfo与ShardedTableInfo有什么区别?

我下载了示例代码->“ ElasticScaleStarterKit”(在Visual Studio中->文件->新建->项目->在线->用于Azure SQL的Elastic DB Tools-入门)。

该模式定义如下:

schemaInfo.Add(new ReferenceTableInfo("Regions"));
schemaInfo.Add(new ReferenceTableInfo("Products"));
schemaInfo.Add(new ShardedTableInfo("Customers", "CustomerId"));
schemaInfo.Add(new ShardedTableInfo("Orders", "CustomerId"));
Run Code Online (Sandbox Code Playgroud)

ReferenceTableInfo与ShardedTableInfo有什么区别?

我了解,简单的区别是所有数据库(例如状态表等)都适用的“干燥”信息与特定客户的个人信息之间。

但是,如果所有表都设置为“引用”会发生什么?这种设置的缺点是什么:

schemaInfo.Add(new ReferenceTableInfo("Regions"));
schemaInfo.Add(new ReferenceTableInfo("Products"));
schemaInfo.Add(new ReferenceTableInfo("Customers"));
schemaInfo.Add(new ReferenceTableInfo("Orders"));
Run Code Online (Sandbox Code Playgroud)

希望有帮助:)

谢谢!

azure-elastic-scale azure-sql-database

5
推荐指数
1
解决办法
131
查看次数

使用 REST API 或 Azure 管理库在 SQL Azure 数据库上执行存储过程

有没有办法使用 REST API 或 Azure 管理库在 SQL Azure 数据库上创建执行存储过程?

我在这里检查了 Azure SQL 数据库的操作http://msdn.microsoft.com/en-us/library/azure/dn505719.aspx和 .NET 的管理库在这里http://msdn.microsoft.com/en-us/ Library/azure/dn602775(v=azure.11).aspx,我没有看到任何选项。

.net c# azure azure-sql-database

4
推荐指数
1
解决办法
1738
查看次数

在Amazon RDS上设置字符集(Postgresql)

我使用Postgresql 9.3.1配置了一个RDS实例,我的应用程序需要en_US.UTF-8.当postgres在本地安装时,我将不得不使用"--locale = en_US.UTF-8"创建集群.

现在使用RDS,我的理解是我需要创建一个自定义参数组,但我的问题是:

  • 我需要修改哪个字段?CLIENT_ENCODING?
  • 我究竟将该字段设置为什么?我可以指定en_US.UTF-8或仅指定UTF-8(或UTF8 ??)
  • 我打算升级到9.4.5,上面的答案是否会保持不变?

不幸的是,我发现的唯一其他答案专门针对MySQL.

postgresql amazon-web-services amazon-rds postgresql-9.3

3
推荐指数
1
解决办法
4498
查看次数

Azure SQL数据库与Azure移动服务

我正在尝试将我的Android应用程序移植到基于云的应用程序中.我希望将数据存储在云端.我是一个.NET人,所以看看Azure.我看到Azure Mobile服务允许我创建表和身份验证功能.我也查看了Azure SQL数据库.

我想知道这两种服务之间的区别是什么,使用移动服务的方案比使用Azure SQL数据库提供的值更多

在此输入图像描述

sql azure azure-mobile-services azure-sql-database

2
推荐指数
1
解决办法
1254
查看次数

context.Database.ExecuteSqlCommand-错误代码701-Microsoft Azure

我在迁移配置种子方法中具有以下代码:

string sqlQuery = // 22 mb file contents
context.Database.ExecuteSqlCommand( sqlQuery );
Run Code Online (Sandbox Code Playgroud)

ExecuteSqlCommand函数使Azure抛出此错误:

服务在处理您的请求时遇到错误。请再试一遍。错误代码701。当前命令发生了严重错误。结果(如果有的话)应丢弃。

为什么会这样呢?我真的找不到很多信息

c# sql entity-framework azure

1
推荐指数
1
解决办法
1917
查看次数

SonarQube 可以连接 Azure SQL 数据库吗?

我的 SonarQube 在 Microsoft Azure 的 VM 实例上运行。现在 SonarQube 的数据库是 MySQL,我正在尝试将 MySQL 更改为 Azure SQL 数据库,但是由于 ActiveRecord 组件中发生的一些错误,SonarQube 无法连接 Azure SQL 数据库。我知道 SonarQube 不正式支持 Azure SQL 数据库并支持下面的 SQL Server,但是 Azure SQL 数据库与 SQL Server 兼容,因此可以连接 Azure SQL 数据库。如果有人知道,请告诉我如何连接 Azure SQL 数据库。

SonarQube 的支持数据库

sonar.properties:

sonar.jdbc.username=sonar@<server>
sonar.jdbc.password=<password>
sonar.jdbc.driverClassName=net.sourceforge.jtds.jdbc.Driver
jdbc:jtds:sqlserver://<server>.database.windows.net:1433/<databasename>;ssl=require
Run Code Online (Sandbox Code Playgroud)

错误跟踪:

org.jruby.rack.RackInitializationException: no connection available
    from arjdbc/jdbc/RubyJdbcConnection.java:517:in `set_native_database_types'
    from /opt/sonar/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb:61:in `initialize'
    from /opt/sonar/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:31:in `initialize'
    from /opt/sonar/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection_methods.rb:6:in `jdbc_connection'
    from org/jruby/RubyKernel.java:2227:in `send'
    from /opt/sonar/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
    from /opt/sonar/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
    from /opt/sonar/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
    from org/jruby/RubyKernel.java:1519:in `loop' …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails jruby sonarqube azure-sql-database

0
推荐指数
1
解决办法
2382
查看次数