存档
Sybase ASE自版本15.0.2开始增加判断字符串是否为日期类型的函数:isdate,以及判断字符串是否为数字类型的函数:isnumeric
函数:isdate
Syntax
isdate(character_expression)
Parameters
character_expression
is a character-type variable, constant expression, or column name.
Usage
Returns 1 if the expression is a valid datetime value; returns 0 if it is not. Returns 0 for NULL input.
本人的pc机上装的数据库比较多。有:oracle 10g,MySQL5.0.45,Sybase ASE15.0.3,Sybase IQ15.1,MSSQLSERVER2005,MSSQLSERVER2000,Sybase Anywhere8,Sybase Anywhere9,Sybase Anywhere10等等。还有非安装版的Sybase ASE12.5.x,ASA5,ASA6等。
数据库比较多,都通过系统工具中的服务项来启动不太现实。有时用到的时候直接用命令行启动,这样挺方便。注册表信息也省得维护了。
最近,在用SQLSERVER2005 management studio读取表数据的时候,报了下面的两个错误。
在对象资源管理器中找到sqlserver2000数据库中的用户表,点右键“打开表”报错如下:
标题: Microsoft SQL Server Management Studio
------------------------------
调用的目标发生了异常。 (SQLEditors)
------------------------------
其他信息:
找不到请求的 .Net Framework 数据提供程序。可能没有安装。 (System.Data)
在对象资源管理器中找到sqlserver2005中某个用户数据库中的用户表,点右键“打开表”报错如下:
标题: Microsoft SQL Server Management Studio
------------------------------
调用的目标发生了异常。 (SQLEditors)
------------------------------
其他信息:
创建 system.data 的配置节处理程序时出错: 列“InvariantName”被约束为是唯一的。值“iAnywhere.Data.SQLAnywhere”已存在。 (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 126) (System.Configuration)
------------------------------
列“InvariantName”被约束为是唯一的。值“iAnywhere.Data.SQLAnywhere”已存在。 (System.Data)
问题怎么解决呢?
在网上搜索了很多,有说和MySQL有关的。的确我的pc上有MySQL5.0.45。但是将MySQL的相关项目去掉还是不管用。这些链接如下,
大家可以参考下:
找不到请求的 .Net Framework 数据提供程序。可能没有安装。
MySql “找不到请求的 .Net Framework 数据提供程序。可能没有安装。”解决方法
根据访问sqlserver2005数据库时的报错,可能和.NET FRAMEWORK的配置文件有关系。查看C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG 下的machine.config文件。发现的DbProviderFactories节下的最后四个项目为:
<add name="SQL Anywhere 10 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 10" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere, Version=10.0.1.34152, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />
<add name="SQL Anywhere UltraLite.NET 10 Data Provider" invariant="iAnywhere.Data.UltraLite" description=".Net Framework Data Provider for SQL Anywhere UltraLite.NET 10" type="iAnywhere.Data.UltraLite.ULFactory, iAnywhere.Data.UltraLite, Version=10.0.1.3415, Culture=neutral, PublicKeyToken=ff11483eb5a8c1a5" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.0.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<add name="SQL Anywhere 11 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 11" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere, Version=2, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />
根据列"InvariantName"被约束为是唯一的。值"iAnywhere.Data.SQLAnywhere"已存在。观察到SQL Anywhere 10 Data Provider 和 SQL Anywhere 11 Data Provider 这两个项目下的 invariant 都是 "iAnywhere.Data.SQLAnywhere",尝试着将"SQL Anywhere 11 Data Provider"项目删除 ,然后重新打开management studio,问题解决。
总结一下:问题不在于微软的.NET FRAMEWORK3.5的安装时间先后的问题, 是Sybase公司的Anywhere起的驱动程序名称的问题。iAnywhere.Data.UltraLite 就没问题。 为什么SQL Anywhere 10和SQL Anywhere 11 都对应一样相同的Invariant名称呢?
如果ASA10和ASA11都装在一台机器上,就肯定会出现这个问题。 不敢把SQL Anywhere 11 Data Provider对象的 invariant改为:iAnywhere.Data.SQLAnywhere11。反正我也不做数据库开发,我只关系数据库管理方面的。 二者取其一,将SQL Anywhere 11 Data Provider项目暂时注释掉,
<!-- <add name="SQL Anywhere 11 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 11" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere, Version=2, Culture=neutral, PublicKeyToken=f222fc4333e0d400" /> -->
保存machine.config,重新启动management studio。 问题解决。 o(≧v≦)o~~
————————————————————————————————-
—- 本文为andkylee个人原创,请在尊重作者劳动成果的前提下进行转载;
—- 转载务必注明原始出处 : http://www.dbainfo.net
—- 关键字:ASA 10 11 SQLSERVER management studio DbProvider InvariantName
————————————————————————————————-
很早的一篇文章了,2006年7月。算是sybase自吹自擂的,但也给sybase-dba稍微一些信心。
15 reasons why Sybase will be in your future
--01 July 2006
I've heard Sybase is facing difficulties. What do you think Sybase will become? What will happen to its software?
Is it a right moment to get into Sybase?
> EXPERT RESPONSE
There are many reasons to use Sybase products
I would go for Sybase since it has a well-established and skilled workforce, both in the infrastructure and development teams who are fully familiar with the Sybase range of products
Applications developed using Sybase have now been running for a while. They provide adequate service to the business community. There is absolutely no guarantee that migrating these applications to other DBMS, such as Oracle, will result in the same level of service and, consequently, the business will not suffer. Additionally, there has been no known, published case where a migration from Sybase to Oracle or otherwise has resulted in a noticeable performance gain
Sybase products are generally perceived within the DBA community to be very reliable and easier to maintain, compared to peers like Oracle.
Any move from Sybase to other DBMS have got to be justified in terms of the current level of dissatisfaction with Sybase and the level of desire to use other. In the investment banking arm, neither of these conditions prevail and I cannot recall anywhere else this is valid.
The exit barriers from Sybase and the entry barriers to others are high. For a medium-to-large application, it will take an average of ten years for investment for ROI. A simple cost/benefit analysis will verify this statement.
Sybase enjoys a far more favourable Total Cost of ownership (TCO) compared to Oracle.
Following TCO, on average, based upon experience in the City, one requires 2.5 Oracle DBAs to provide the same level of service as a single Sybase DBA.
Sybase is fairly modular with a simpler syntax. This needs to be contrasted with what Oracle offers. In most cases with Oracle, you require a third-party product to allow the DBA to reduce his/her workload. Perhaps that may be a reason why TOAD, a non-Oracle product, is the most popular GUI interface for Oracle!
The majority of complex trading systems of bank use sophisticated replication technology to provide publisher-subscriber or peer-to-peer replication. At this juncture, none of the competitors, including Oracle, can provide the same degree of functionality that Sybase Replication server provides. This will expose banks to unnecessary risks. Buying third party products, such as Golden Gate etc., will add additional complexity, dependency on multiple vendors and cost.
Linux is becoming an ideal and cost-effective platform for the development teams and small- to medium-sized companies. With the availability of heterogeneous dump and load of Sybase databases across different operating systems, Sybase, by virtue of its modularity and ease of use is an ideal DBMS for Linux. This needs to be contrasted with Oracle which is, pound for pound, a far heavier beast and resource hungry.
The latest Sybase flagship product, ASE 15, has filled much of the perceived functionality gap between ASE and others if there was any. ASE 15 also provides additional functionalities that others do not offer. It is also debatable how much this functionality that other RDBMS claim to have and ASE not, are practical as opposed to being over-engineered and esoteric. An example would be Oracle functionality claims.
The future of Sybase is secure. More than half of Wall Street runs on Sybase. Since Sybase arguably provides the most secure database (please read articles on security issues with regard to Oracle and Microsoft), it is a favourite with the US Dept. of Defense and CIA.
SAP's release of its lightway product for Sybase on Linux and IBM's steps towards selling their line of P5 Linux servers with ASE, while they have DB2 and Informix themselves, are pretty strong statements about the future of Sybase.
Sybase realizes the importance of financial services as its prime market. Thus, it works closely to react to banks' requirements whereas with Oracle and Microsoft, despite the size of banking organizations, they are to some extent "just another customer." This is one reason why Sybase is reacting quickly in bringing the security features required by the investment banking customers, such as extensive Kerberos support, programmable authentication and data encryption to the market..
Also it is worthwhile noting that that several major financial institutions have switched Sybase from SELL or HOLD to BUY. This cannot be proved openly, because these customers' names are confidential - but it is true.