isoft/mssql-bundle
Composer 安装命令:
composer require isoft/mssql-bundle
包简介
Driver for work with MsSQL server
README 文档
README
WARNING: This fork is abandoned :(
Install
Add the isoft/mssql-bundle into composer.json
"require": {
....
"isoft/mssql-bundle": "master-dev"
},
Usage
Add to section doctrine - dbal in config.yml option driver_class
doctrine:
dbal:
driver_class: \Realestate\MssqlBundle\Driver\PDODblib\Driver
host: %database_host%
user: %database_user%
password: %database_password%
# options:
# ansi_nulls: on
# ansi_warnings: on
The %database_driver% must not be set, neither the %charset% parameter, as for stackoverflow.com/questions/8492941/doctrine-2-how-to-add-custom-dbal-driver#answer-8731924
The connection options (ansi_nulls and ansi_warnings) may be configured for MSSQL to ON|OFF
In app/AppKernel.php registerBundles(), add the following line:
$bundles = array(
...
new Realestate\MssqlBundle\RealestateMssqlBundle(),
...
);
This driver requires version 8.0 (from http://www.ubuntitis.com/?p=64) as default 4.2 version does not have UTF support
An example of freetds.conf (/etc/freetds/freetds.conf) is:
[mssql_server]
host = xxx.xxx.xxx.xxx
port = 1433
tds version = 8.0
client charset = UTF-8
text size = 20971520
can't use nvarchar!!
In SQL 2000 SP4 or newer, SQL 2005 or SQL 2008, if you do a query that returns NTEXT type data, you may encounter the following exception: _mssql.MssqlDatabaseError: SQL Server message 4004, severity 16, state 1, line 1: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.
It means that SQL Server is unable to send Unicode data to FTREETDS, because of shortcomings of FTREETDS. You have to CAST or CONVERT the data to equivalent NVARCHAR data type, which does not exhibit this behaviour.
isoft/mssql-bundle 适用场景与选型建议
isoft/mssql-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 138.34k 次下载、GitHub Stars 达 19, 最近一次更新时间为 2012 年 06 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 isoft/mssql-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 isoft/mssql-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 138.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 14
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2012-06-27