免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4741 | 回复: 3
打印 上一主题 下一主题

SQLSTATE 42000] (Error 11). [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-31 08:29 |只看该作者 |倒序浏览
We have our main SQL server (SQL2000 SP4) with over a 1000 customer databases.  Each database has 2 important tables that we wish to backup as one.  We used to copy all of the data into a single ALLCUSTS database on the original server every evening, but this got rather large. (around 14 million records in one table and 23 million in another and counting).

We now have another server (SQL2000 SP4) which we wish to use to hold the ALLCUSTS tables.

This is run as a job every evening with the tables truncated then this query is run.

CODE
DECLARE @Database VARCHAR(100), @SQL VARCHAR(1000)
DECLARE CURS CURSOR FOR SELECT C.CustID FROM NTSERVER4.CustInfo.dbo.CUSTOMER C JOIN NTSERVER4.master.dbo.sysdatabases D ON C.CustID=D.name ORDER BY C.CustID
OPEN CURS
FETCH CURS INTO @Database
WHILE @@FETCH_STATUS=0
    BEGIN
    SET @SQL=\'INSERT INTO ALLCUSTS..STORAGE SELECT \'\'\'+@Database+\'\'\', * FROM NTSERVER4.\'+@Database+\'.dbo.STORAGE\'
    EXEC(@SQL)
    FETCH CURS INTO @Database
    END
CLOSE CURS
DEALLOCATE CURS
We have a similar job to collect the other tables data run at the same time

The job history shows that it fails with [SQLSTATE 42000] (Error 11)Check your network documentation.  
Sometimes it fails on one job, other times on the other, occaisionaly on both, and sometimes they both work OK. Arrrggghh!

I have Googled this error but I can not find an exact refernce to it.  Both the servers are on the same subnet, the first is running 2000 and the second is 2003.

Any help would be appreciated

论坛徽章:
0
2 [报告]
发表于 2007-01-31 12:16 |只看该作者
看如下文章对你是否有用
http://support.microsoft.com/kb/ ... d=2852&sid=1223



PRB:SQL Server 2000 命名实例上的维护作业失败,返回错误 22029
察看本文应用于的产品
文章编号 : 326485
最后修改 : 2003年11月4日
修订 : 1.0
本文的发布号曾为 CHS326485
本页

症状

原因

替代方法

状态

更多信息

参考
症状
对 SQL Server 2000 命名实例执行通过数据库维护计划向导创建的数据库作业失败。如果在 SQL Server Agent 中查看作业历史记录并启用显示步骤详细信息复选框,则您将看到以下错误:
sqlmaint.exe failed.[SQLSTATE 42000][Error 22029].The step failed.
回到顶端

原因
维护计划中目标文件夹(指定用来存储数据库备份的文件夹;用于事务日志备份或报表的文件夹)的字符串包含“-S”。例如,目录路径“C:\\Db-Save”包含“-S”字符串。
回到顶端

替代方法
若要解决此问题,请不要将包含“-S”的字符串用于目录路径。另外请注意,只有当连字符后面的“S”是大写字母(“S”)时才会出现此错误。
回到顶端

论坛徽章:
0
3 [报告]
发表于 2007-01-31 12:18 |只看该作者

论坛徽章:
0
4 [报告]
发表于 2007-01-31 14:30 |只看该作者
之前看过了,好像没有用
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP