in

SDT Community Server

SDT Forums, Blogs, Photos server.

Floating Heart

No description is bad.

Browse by Tags

All Tags » Database (RSS)
  • Mindscape LightSpeed

    一个轻量级的O/R Mapping Framework。 现在版本为2.0。2.1据称将完全支持WCF Remoting。 http://www.mindscape.co.nz/Products/LightSpeed/features.aspx Rich domain model framework Model objects inherit off LightSpeed Entity class, which implements important .NET model object interfaces: IEditableObject , INotifyPropertyChanged , and IDataErrorInfo . Convention over configuration LightSpeed uses conventions that mandate how particular aspects of your domain model should look. Being prescriptive in this way allows you to focus...
    Posted Oct 07 2008, 03:43 PM by wicky with | with no comments
    Filed under: ,
  • ORA-06544 when performing network expdp between 11g and 10g

    http://hrivera99.blogspot.com/2008/07/ora-06544-when-performing-network-expdp.html When I was trying to perform a network export datapump between 11g and 10g I found an ORA-06544 error. [oracle@alpha admin]$ impdp SCOTT/TIGER tables=emp_10g,dept_10g network_link=db10g Import: Release 11.1.0.6.0 - Production on Tuesday, 29 July, 2008 22:37:01 Copyright (c) 2003, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning...
    Posted Sep 05 2008, 04:31 PM by wicky with | with no comments
    Filed under:
  • Oracle 11g Software Installation on Linux—CentOS-5

    http://www.jameskoopmann.com/docs/Install_Oracle11gCentOS5.htm Introduction This paper takes a look at installing Oracle 11g (11.1) on Linux (CentOS-5).You can read about CentOS at www.centos.org and be assured of its' Enterprise-class quality. This paper will use Oracle's Quick Installation Guide for Linux x86 as its' guide—noting where additional information may be obtained but getting Oracle installed on Linux as fast as possible. We at thecheapdba.com have years of experience installing...
    Posted Aug 25 2008, 05:10 PM by wicky with | with no comments
    Filed under:
  • 使用 PIVOT 和 UNPIVOT

    使用 PIVOT 和 UNPIVOT 可以使用 PIVOT 和 UNPIVOT 关系运算符将表值表达式更改为另一个表。PIVOT 通过将表达式某一列中的唯一值转换为输出中的多个列来旋转表值表达式,并在必要时对最终输出中所需的任何其余列值执行聚合。UNPIVOT 与 PIVOT 执行相反的操作,将表值表达式的列转换为列值。 注意: 对升级到 SQL Server 2005 或更高版本的数据库使用 PIVOT 和 UNPIVOT 时,必须将数据库的兼容级别设置为 90 或更高。有关如何设置数据库兼容级别的信息,请参阅 sp_dbcmptlevel (Transact-SQL) 。 PIVOT 提供的语法比一系列复杂的 SELECT...CASE 语句中所指定的语法更简单和更具可读性。有关 PIVOT 语法的完整说明,请参阅 FROM (Transact-SQL) 。 以下是带批注的 PIVOT 语法。 SELECT <non-pivoted column>, [first pivoted column] AS <column name>, [second pivoted...
    Posted Aug 23 2008, 01:09 PM by wicky with | with no comments
    Filed under:
  • Microsoft SQL Server 2008 正式发布

    微软今天宣布正式发布SQL Server 2008服务器软件,这将帮助微软与Oracle 11g,IBM DB2 9.5数据库产品对抗.此前这一产品已经经过数次延期. SQL Server 2008出现在微软数据平台愿景上是因为它使得公司可以运行他们最关键任务的应用程序,同时降低了管理数据基础设施和发送观察和信息给所有用户的成本.目前SQL Server 2008 Express 和 SQL Server Compact版本都已经开始免费下载. http://www.microsoft.com/sqlserver/2008/en/us/product-information.aspx Microsoft SQL Server 2008 provides a trusted, productive, and intelligent data platform that enables you to run your most demanding mission-critical applications, reduce time and cost of development and management...
    Posted Aug 07 2008, 08:44 AM by wicky with | with 1 comment(s)
    Filed under:
  • How to Restore SQL Server 2005 Suspect Database

    http://www.codeproject.com/KB/reporting-services/SQL_2005_Suspect_Database.aspx Introduction If your project's Database is in suspect mode, then no transaction will take place until and unless you repair your database. That causes a show stopper for your up and running application. Here, you will find a way to get out of this. Background Your Database is in Suspect Mode . I Guess, you haven't experienced this problem till now. But, if it comes to you and if the database is in LIVE, then its...
    Posted Aug 01 2008, 04:31 PM by wicky with | with 1 comment(s)
    Filed under:
  • Oracle忘记System和Sys密码怎么办?

    oracle提供两种验证方式,一种是OS验证,另一种密码文件验证方式,如果是第一种方式用以下方法修改密码: sqlplus /nolog; connect / as sysdba alter user sys identified by ; alter user system identified by ; 如果是第二种方法用以下方法修改密码: orapwd file=pwdxxx.ora password=你设定的新密码 entries=10 设定完后,重新启动服务,再次登陆就可以了。
    Posted Jun 16 2008, 10:26 AM by wicky with | with no comments
    Filed under:
  • SQL Server中自动编号的方法

    第一种:使用identity函数增加临时表的方法 select id = identity ( int , 1 , 1 ), * into #tmp from table select * from #tmp drop table #tmp 在SQL2005中新增了ROW_NUMBER()函数,给我们带来了很多方便,使用方法如下: SELECT id,ROW_NUMBER() OVER ( order by id) as RowNumber FROM Table 有一个方便,as后的别名可以在语句后面作为条件单独使用.
    Posted Jun 13 2008, 02:15 PM by wicky with | with no comments
    Filed under:
  • Updatable subscriptions - No transaction is active

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1461689&SiteID=1 Question: This may be a simple answer, but I was wondering when setting up transactional replication with updatable subscriptions why does this error occur? Error: The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "REPLLINK " was unable to begin a distributed transaction. Changed database context to 'MyDB'. OLE DB provider "SQLNCLI" for linked server...
    Posted Jun 03 2008, 09:33 AM by wicky with | with no comments
    Filed under:
  • Error: The partner transaction manager has disabled its support for remote/network transactions

    http://www.cnblogs.com/Isabella/articles/504004.html Reason: Either the Microsoft Distributed Transaction Coordinator (MSDTC) service is not running, or your Renaissance Place(a application) application is installed to more than one server (separate database, application, and/or report servers) running Windows Server 2003. The enhanced security built in to Windows Server 2003 may prevent the MSDTC service from functioning as required. This is generally only an issue if the following are true: - Renaissance...
    Posted Jun 02 2008, 05:12 PM by wicky with | with no comments
    Filed under:
  • How to create Datafiles in a Data Guard (10g) environment

    http://searchoracle.techtarget.com/tip/0,289483,sid41_gci1302327,00.html Rama Balaji 02.25.2008 Rating: -4.50- (out of 5) I came across this Data Guard situation lately where a datafile was added to the primary database, but failed during creation on the standby. The database version was 10.2.0.3 and standby_file_management was set to AUTO. Standby_file_management is a parameter, and when set to AUTO on the standby site, will create datafiles automatically on the standby site, for every datafile...
    Posted May 21 2008, 03:44 PM by wicky with | with no comments
    Filed under:
  • How to Create Linked Server for a MySQL in SQL Server

    http://www.sqlservercentral.com/Forums/Topic340912-146-1.aspx It took me about a day to figure this out, so I thought I'd try to save someone else the pain... Creating a Linked Server in SSMS for a MySQL database 1. Download the MySQL ODBC driver from mysql.com 2. Install MySQL ODBC driver on Server where SQL Server resides -Double Click Windows Installer file and follow directions. 3. Create a DSN using the MySQL ODBC driver Start-> Settings -> Control Panel -> Administrative Tools...
    Posted Apr 08 2008, 09:27 AM by wicky with | with 1 comment(s)
    Filed under:
  • Data Guard之添加数据文件

    作者:NinGoo | 【转载时请务必以超链接形式标明文章原始出处和作者信息及本声明】 地址: http://www.ningoo.net/html/2007/dba_memo_data_guard_add_data_file.html 一般情况下,如果数据文件采用的是裸设备,为了便于管理,会在裸设备上创建soft link,这样在data guard环境中就有个问题,必须在主备库同时执行创建相同的link,否则备库是auto standby file management的话,会导致数据文件创建失败(前提是去掉了文件系统的写权限,否则会加到文件系统中去,这样麻烦更麻烦了)。 加入在主库创建了soft link,添加了datafile,而备库没有创建对应的link多话,则会遇到以下错误: Errors in file /u01/oracle/admin/comm/bdump/comm_mrp0_2380526.trc: ORA-01274: cannot add datafile '/u01/oracle/oradata/comm/test.dbf' - file could...
    Posted Jan 02 2008, 01:10 PM by wicky with | with no comments
    Filed under:
  • ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

    RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/31/2007 09:55:18 ORA-19504: failed to create file "/bak/bak_629373314_15_1" ORA-27054: NFS file system where the file is created or resides is not mounted with correct options Additional information: 3 正确的选项为...
    Posted Dec 24 2007, 02:33 PM by wicky with | with no comments
    Filed under:
  • How to Rename or Move Datafiles and Logfiles

    文档 ID : 注释:115424.1 主题: How to Rename or Move Datafiles and Logfiles 类型: BULLETIN 状态: PUBLISHED 内容类型: TEXT/PLAIN 创建日期: 18-JUL-2000 上次修订日期: 10-JUN-2004 PURPOSE In many situations, a datafile or logfile must be renamed inside Oracle. Whereas the contents of the file remain valid, you need to define a new physical name or location for it. For example: - You want to move a database file to a different disk for performance or maintenance reasons. - You have restored a datafile from backup, but the disk...
    Posted Nov 26 2007, 11:04 AM by wicky with | with no comments
    Filed under:
  • ifsimportexport get error "IFS-30008: Unable to import LibraryObject"

    http://forums.oracle.com/forums/thread.jspa?threadID=229897 Errors in log: IfsException in run(); exiting: oracle.ifs.common.IfsException: IFS-30008: Unable to import LibraryObject oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject oracle.ifs.common.IfsException: IFS-30010: Attribute would not be unique (NAME) oracle.ifs.common.IfsException: IFS-30008: Unable to import LibraryObject oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject oracle.ifs...
    Posted Nov 12 2007, 10:21 PM by wicky with | with no comments
    Filed under:
  • oidrepld instance already exist. Only one instance of OIDREPLD can be started

    http://forums.oracle.com/forums/thread.jspa?threadID=546990&tstart=15 If i execute ps -ef|grep oidrepld, no process is running. 1) if i stop instance: oidctl server=oidrepld connect=<servicename> instance=1 stop show: *** Cannot Stop an Instance that is not running *** 2) If i start instance: oidrepld instance already exist. Only one instance of OIDREPLD can be started it's very unusual and i don't know that i do or how i can recreate replica with remtool? ----> select * from...
    Posted Nov 11 2007, 08:07 PM by wicky with | with no comments
    Filed under:
  • ORA-01031: insufficient privileges when start sqlplus / as sysdba

    1. check whether ORACLE_HOME, ORACLE_SID, ORACLE_BASE set properly 2. use owner of oracle files instead of root, i.e. oracle 3. make sure oracle user is in dba group
    Posted Nov 02 2007, 02:47 PM by wicky with | with no comments
    Filed under:
  • OracleAS 10g Upgrade Paths

    Please refer to attached file.
    Posted Sep 05 2007, 03:17 PM by wicky with | with no comments
    Filed under:
  • MD5加密

    MD5加密 pl/sql版 CREATE OR REPLACE function md5(input_string VARCHAR2 ) return varchar2 IS raw_input RAW ( 128 ) : = UTL_RAW.CAST_TO_RAW(input_string); decrypted_raw RAW ( 2048 ); error_in_input_buffer_length EXCEPTION; BEGIN sys.dbms_obfuscation_toolkit.MD5(input => raw_input, checksum => decrypted_raw); return lower (rawtohex(decrypted_raw)); END ; from: unknown Java版 public static String encodePassword(String password, String algorithm) { byte [] unencodedPassword = password.getBytes(); MessageDigest...
    Posted Jul 12 2007, 10:29 AM by wicky with | with 1 comment(s)
    Filed under: ,
  • Top 15 free SQL Injection Scanners

    http://www.security-hacks.com/2007/05/18/top-15-free-sql-injection-scanners While the adoption of web applications for conducting online business has enabled companies to connect seamlessly with their customers, it has also exposed a number of security concerns stemming from improper coding. Vulnerabilities in web applications allow hackers to gain direct and public access to sensitive information (e.g. personal data, login credentials). Web applications allow visitors to submit and retrieve data...
    Posted Jul 07 2007, 06:44 PM by wicky with | with no comments
    Filed under: ,
  • Sync For SQLServer

    我一直寻思着是否要做一个Simple DB Comparer,最后决定再google一把,然后这个东西就跳出来了。 由 沉睡的蚂蚁 开发: Sync For SQLServer Comparison and synchronization of SQL Server 2000 and SQL Server 2005 database definition. Dependency checking so objects are scripted in the correct order. Support for schema objects including tables, stored procedures, views, user-defined functions, user-defined data types extended properties, default constraints, checks... Schema differences are visualized intuitively: Schema difference for tables, views,...
    Posted Jun 29 2007, 10:34 AM by wicky with | with 2 comment(s)
    Filed under:
  • ORA-02041: client database did not begin a transaction

    When using OracleClient connect to Oracle 8i and using database link, error "ORA-02041: client database did not begin a transaction" occur even for single select statement. This is unfortunately a known problem, there is a QFE ready which you can get by contacting PSS for Q830173, you also need to add a new keyword to the connection string, (please verify with PSS what the actual string is). As part of this workaround you cannot use Distributed Transactions on that particular connection...
    Posted Jun 07 2007, 08:09 PM by wicky with | with no comments
    Filed under: , ,
  • MD5 Hash SQL Server Extended Stored Procedure

    http://www.codeproject.com/database/xp_md5.asp Introduction This is an extended stored procedure for Microsoft SQL Server 2000 that implements an optimized MD5 hash algorithm. It is intended to work much like the MySQL MD5() function. The algorithm was taken from here . I only added the md5_string() function. The DLL should work for older versions of SQL Server too, although I have not tested that. The source was compiled and tested on Microsoft Visual C++ 6.0 and .NET 2003. Installation Extract...
    Posted May 28 2007, 11:11 AM by wicky with | with no comments
    Filed under: ,
  • SQL Server COLLATE

    如果SQL Server的Server Collation 和 Database Collation不一致的时候,使用临时表往往会出现如下错误 Cannot resolve collation conflict for equal to operation. 解决方法当然不是hard code一个Collation到创建语句,而是使用database_default 选项。 Create Temporary Table ... ( fieldname varchar(50) collate database_default ) COLLATE A clause that can be applied to a database definition or a column definition to define the collation, or to a character string expression to apply a collation cast. Syntax COLLATE < collation_name > < collation_name >...
    Posted Apr 25 2007, 08:15 PM by wicky with | with no comments
    Filed under:
  • Oracle 10g - Managing a Physical Standby Database

    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm
    Posted Apr 19 2007, 03:24 PM by wicky with | with no comments
    Filed under:
  • Oracle - 10g Data Guard Scenarios

    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#CIHIABDH
    Posted Apr 19 2007, 03:21 PM by wicky with | with no comments
    Filed under:
  • Oracle 查看用户/表占用的空间

    查看用户占用的空间 SELECT owner, tablespace_name, ROUND (SUM (BYTES) / 1024 / 1024, 2) "USED(M)" FROM dba_segments GROUP BY owner, tablespace_name ORDER BY SUM (BYTES) DESC; SELECT owner, tablespace_name, segment_name, segment_type, ROUND (SUM (BYTES) / 1024 / 1024, 2) "USED(M)" FROM dba_segments GROUP BY owner, tablespace_name, segment_name, segment_type ORDER BY SUM (BYTES) DESC 其中owner是用户,segment_name是表/索引
    Posted Apr 07 2007, 08:52 AM by wicky with | with no comments
    Filed under:
  • SQL Server 2005 SP2

    下载页面: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=d07219b2-1e23-49c8-8f0c-63fa18f26d3a (英文) http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=d07219b2-1e23-49c8-8f0c-63fa18f26d3a (中文) 快速下在链接: SQLServer2005SP2-KB921896-x86-CHS.exe SQLServer2005SP2-KB921896-x64-CHS.exe SQLServer2005SP2-KB921896-x86-ENU.exe SQLServer2005SP2-KB921896-x64-ENU.exe SQLServer2005SP2-KB921896-IA64-ENU.exe
    Posted Feb 25 2007, 09:05 AM by wicky with | with no comments
    Filed under:
  • 从SQL Server表中随机取一条记录

    这是比较巧妙的方法: SELECT TOP(1) * FROM YOURTABLE ORDER BY CHECKSUM(NEWID()); 表大的时候可能性能不是很好。
    Posted Feb 06 2007, 02:07 PM by wicky with | with 1 comment(s)
    Filed under:
More Posts Next page »
Copyright SDT, 2006-2009. All rights reserved.