
SQL Issue Resolution
envykok
这个作者很懒,什么都没留下…
展开
-
Vista下sql2005附加数据库失败问题
Vista下安装SQL Server 2005/2008后,进行附加数据库错误的解决我在Vista下安装了SQL Server 2005,分离数据库后,进行附加时,发生如下错误: 提示“无法打开物理文件…………。操作系统错误 5:"5(拒绝访问。)"(Microsoft SQL Server,错误:5120) 网上很多都是说出现该问题是由于用混合验证方式登录数据库造成转载 2010-04-22 22:15:00 · 226 阅读 · 0 评论 -
Indexed View & NOEXPAND
Indexedviews can be created in any edition of SQL Server 2005. In SQL Server2005 Enterprise Edition, the query optimizer automatically considersthe indexed view. To use an indexed view in all other editions, theNOEXPAND table hint must be used.Refr原创 2010-09-28 01:14:00 · 481 阅读 · 0 评论 -
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any inform
<br />SQL Bulk insert from Excel 2003 - Microsoft.Jet.OLEDB.4.0<br /> <br />--http://www.sqlteam.com<br />1 Export data to existing EXCEL file from SQL Server table<br />insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', <br /> 'Excel 8.0;Database=D:原创 2010-09-17 16:16:00 · 2619 阅读 · 0 评论 -
FOR XML could not serialize the data for node '@description' because it contains a character (0x0007) ....
<br />Error Message :<br />FOR XML could not serialize the data for node '@description' because it contains a character (0x0007) which is not allowed in XML. To retrieve this data using FOR XML, convert it to binary, varbinary or image data type and use th原创 2010-06-15 22:42:00 · 272 阅读 · 0 评论 -
也谈 SQL Injection 解决方案
SQL Injection (注入)虽然学数据库时间不长,但我也来谈谈SQL Injection解决方案.方案1:参数化SQL 语句方案2:存储过程方案3:给与可能的最低权限给用户( 例如:如果只需要'SELECT'则只给与'SELECT'权限)每个人都关心数据安全。如果不关心的话,可能没有意识到访问服务器中的敏感数据是非常容易的。因为SQL SERVER在这方面已经替我们考虑过了,所以在我们开发应用程序就可以直接使用SQL SERVER的安全策略。 在SQL原创 2010-07-17 19:40:00 · 200 阅读 · 0 评论 -
Is it possible to create a view within a stored procedure,'CREATE VIEW' must be the first statement in a query batch.
<br />Hi,<br />A stored procedure cannot be created with the create View command in it . <br />But we could create a t-sql string with the create View statement and execute the string with sp_executesql<br />-refer to http://social.msdn.microsoft.com/forum原创 2010-07-19 21:16:00 · 237 阅读 · 0 评论 -
SQL Server 无法修改表,超时时间已到
<br />SQL Server 一张表存储大量数据的时候,对表结构作修改就非常耗时了。其实耗时还好说,我们年轻,有的是时间……最怕的是它觉得太耗时就放弃给你修改了。这几天想给某个表加个字段,就遇到了这样的问题。点了保存后过一段时间,就会弹出个对话框说:<br />无法修改表。超时时间已到,在操作完成之前超时时间已过或服务器未响应<br />解决办法:在 SQL Server Management Studio里,通过菜单“工具-选项”打开选项对话框。在左侧寻找“设计器-表设计器和数据库设计器”,然后在转载 2010-07-09 18:51:00 · 748 阅读 · 0 评论 -
SQL Server 无法修改表,超时时间已到
<br />SQL Server 一张表存储大量数据的时候,对表结构作修改就非常耗时了。其实耗时还好说,我们年轻,有的是时间……最怕的是它觉得太耗时就放弃给你修改了。这几天想给某个表加个字段,就遇到了这样的问题。点了保存后过一段时间,就会弹出个对话框说:<br />无法修改表。超时时间已到,在操作完成之前超时时间已过或服务器未响应<br />解决办法:在 SQL Server Management Studio里,通过菜单“工具-选项”打开选项对话框。在左侧寻找“设计器-表设计器和数据库设计器”,然后在转载 2010-07-09 18:27:00 · 495 阅读 · 0 评论 -
SQL Login 问题
当用户使用*.bak去还原时候,database 可能带有user,但这个还没有注册到login里面,可以用: EXEC sp_change_users_login Auto_Fix,username 去自动更新Login http://www.seattletech.com/forum/viewtopic.php?t=71 After the use原创 2010-04-29 12:42:00 · 257 阅读 · 0 评论 -
money and numeric
numeric and money SELECT TOP 1 ISNULL(PRICE,) FROM [TABLE1] --Money works--Numeric(16,2) fails原创 2010-04-29 12:34:00 · 138 阅读 · 0 评论 -
Vista 下 创建用户登录
The user is not associated with a trusted SQL Server Connection 解决步骤: (1)Microsoft SQL server manager - Run as administrator (2) Change Server Instance Server authentication : use原创 2010-04-28 00:24:00 · 136 阅读 · 0 评论