Thursday, March 29, 2012
Error: ConnectionCheckForData (CheckforData()).
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
The situation is this:
Client: Microsoft Windows 2003 Standard
Client s/w: Microsoft SQL Server 2000 Client Tools (patched with SP4)
Server: Microsoft Windows 2003 Standard (SP1)
Server s/w: MSDE 2000, SP3
Network:
Connection is made over a MAN through two firewalls.
Error conditions:
1. I am able to make the initial connection.
2. I am able to perform:
a. SELECT @.@.VERSION
b. SELECT Host_Name()
c. SELECT TOP 1 * FROM sysfiles
3. I get the error whenever I attempt to perform any multi-row recordset (such as SELECT TOP 2 * FROM sysfiles).
We have restarted the SQL instance and the error repeated itself immediately.
When we restart the server, the error goes away. Right now, I am trying to figure out how long from the time the server is restarted to the time the failures appear. By the way, the server is not mine; it's managed by a partner agency so I have limited access to system statistical functions. I have tried inspecting @.@.PACK_SENT, @.@.PACK_RECEIVED and @.@.PACKET_ERRORS, but I do not have access to sysperfinfo or perf monitor.
I have tried Googling the error message and the results seem to be scattered: there was a problem with corrupt indexes (fixed in SP4), a problem with distributed inserts and some other issues that don't seem to apply in this situation.
I am mystified and I don't know what to suggest. If any of you have any ideas, I would be grateful for your thoughts.
Regards,
hmscottCheck ur networking hardware or configuration
somewhere. Look at your network interface settings - especially duplex
settings. Sometimes setting the NICs to Auto duples causes these errors.
checked SQL Server error log? Stack dumps?
Monday, March 26, 2012
Error: 644
Server: Msg 2750, Level 16, State 4, Line 2
Warning: Page (1:300465), Slot 9 in object 2009058193 Index 0 Column Val value -1.#QNAN is out of range for data type "real". Update column to a legal value.
A service using a stored procedure result in the following errir in the event log:
Error 644, Severity: 21, State 5
Could not find the index entry for RID '16ca8880200' in index page (1:31928), index ID 7, database 'BPS'.
I have tried 'dbcc checkdb' and 'dbcc checktable' both with option REPAIR_REBUILD and I have tried 'dbcc reindex' but none of them helped.
Are there other options or can I find the column that shall be updated to a legal value?Did you get any error messages when your ran the DBCC's?
Sounds like a corruption problem to me...
Can you export the data? You may need to do it in ranges...you'll find there will be probably 1 corrupt row...
SELECT * FROM myTable WHERE identity < 1000
and so on...do a binary search..start at the middle your data...
In either Case, you'll either need to do a restore (which hopefully isn't corrupt), or export the data and build a new db...don't know what else could be hosed..
But that's only my own opinion (MOO)|||Have you tried to drop the index and recreate it ?
Have you used the REPAIR_ALLOW_DATA_LOSS option ?
Sunday, March 11, 2012
Error: [Microsoft][ODBC SQL Server Driver] Timeout Expired
The view have 12 tables and 20 joins, which tells you the complaxcity of
the view. When run this view using Query Analyzer it gave me the above
msg as well and then i update timeout property within QA. After
updating the timeout property, the view run fine. I need the same
changes in Enterprise Manager and update timeout property for the server
but it still not working.
Help!
Many Thanks
*** Sent via Developersdex http://www.codecomments.com ***Hi
Do you have appropriate indexes on the tables involved, especially on the
columns used for the joins?
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Syed" wrote:
> I am getting above error msg when I tried to run my View.
> The view have 12 tables and 20 joins, which tells you the complaxcity of
> the view. When run this view using Query Analyzer it gave me the above
> msg as well and then i update timeout property within QA. After
> updating the timeout property, the view run fine. I need the same
> changes in Enterprise Manager and update timeout property for the server
> but it still not working.
> Help!
> Many Thanks
>
> *** Sent via Developersdex http://www.codecomments.com ***
>
Error: [Microsoft][ODBC SQL Server Driver] Timeout Expired
The view have 12 tables and 20 joins, which tells you the complaxcity of
the view. When run this view using Query Analyzer it gave me the above
msg as well and then i update timeout property within QA. After
updating the timeout property, the view run fine. I need the same
changes in Enterprise Manager and update timeout property for the server
but it still not working.
Help!
Many Thanks
*** Sent via Developersdex http://www.developersdex.com ***Hi
Do you have appropriate indexes on the tables involved, especially on the
columns used for the joins?
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Syed" wrote:
> I am getting above error msg when I tried to run my View.
> The view have 12 tables and 20 joins, which tells you the complaxcity of
> the view. When run this view using Query Analyzer it gave me the above
> msg as well and then i update timeout property within QA. After
> updating the timeout property, the view run fine. I need the same
> changes in Enterprise Manager and update timeout property for the server
> but it still not working.
> Help!
> Many Thanks
>
> *** Sent via Developersdex http://www.developersdex.com ***
>
Error: [Microsoft][ODBC SQL Server Driver] Timeout Expired
The view have 12 tables and 20 joins, which tells you the complaxcity of
the view. When run this view using Query Analyzer it gave me the above
msg as well and then i update timeout property within QA. After
updating the timeout property, the view run fine. I need the same
changes in Enterprise Manager and update timeout property for the server
but it still not working.
Help!
Many Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Hi
Do you have appropriate indexes on the tables involved, especially on the
columns used for the joins?
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Syed" wrote:
> I am getting above error msg when I tried to run my View.
> The view have 12 tables and 20 joins, which tells you the complaxcity of
> the view. When run this view using Query Analyzer it gave me the above
> msg as well and then i update timeout property within QA. After
> updating the timeout property, the view run fine. I need the same
> changes in Enterprise Manager and update timeout property for the server
> but it still not working.
> Help!
> Many Thanks
>
> *** Sent via Developersdex http://www.codecomments.com ***
>
Friday, March 9, 2012
error with subquery.....
I am getting an error from a query that that has a subquery.
Msg 512, Level 16, State 1, Line 2
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
(0 row(s) affected)
This is a the query.
select *
from dhcp
where nameofcomputer = (SELECT p.nameofcomputer
FROM v_Pams_DHCP p
Left Outer Join adat2005_main a
ON p.nameofcomputer = a.nameofcomputer
where a.serialnumber is null)
Thanks in advance.
Gene
Use in operator,
Code Snippet
select
*
from
dhcp
where
nameofcomputer
in (
SELECT
p.nameofcomputer
FROM
v_Pams_DHCP p
Left Outer Join adat2005_main a
ON p.nameofcomputer = a.nameofcomputer
where
a.serialnumber is null
)
Exists Might be faster than IN,
Code Snippet
select
*
from
dhcp
where
Exists
(
SELECT
p.nameofcomputer
FROM
v_Pams_DHCP p
Left Outer Join adat2005_main a
ON p.nameofcomputer = a.nameofcomputer
where
a.serialnumber is null and p.nameofcomputer = dhcp.nameofcomputer
)
Wednesday, March 7, 2012
error with sp_tables_ex
Hi all,
I am using a sp for show the external tables in a linked server ABC which via Ole DB for Visual Foxpro.
sp_tables_ex ABC
It returns error,
Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 41
The OLE DB provider "SQL Server" for linked server "(null)" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7311, Level 16, State 2, Procedure sp_tables_ex, Line 41
Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "SQL Server" for linked server "(null)". The provider supports the interface, but returns a failure code when it is used.
When I used the same command to other linked server(with ole DB VFP also but with different path). And I tried 'select * from openquery(ABC, 'select * from product')'. Both work fine.
Kindly advise. Thanks in advance.
Hi Stephanie,
Are you by any chance running into the problem described in this KB article:
FIX: OLE DB Provider Improperly Enumerates DBSCHEMA_TABLES
http://support.microsoft.com/kb/314888
HTH,
Jivko Dobrev - MSFT
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Error with NULL using EXECUTE SCALAR
I keep getting an error message when I try to place the result of an execute scalar command into a text box. The msg is:"conversion from 'DBNull' to type 'String' is not valid"
The code I am using is:
Dim con as OLEDBConnection
con =NewOleDB connection("Provider = MIcrosoft.JetOLEDB.4.0, Data Source = "c:\caps.mdb")
Dim cmd As OLEDBCommand
cmd= NewOLEDBCommand("Select Product from [Inventory Table] Where [Customer ID] = " & grid View1.SelectdValue
texBox1.Text = cmd.ExecuteScalar
The code works fine as long as there is a value for the Product. However if the value in the database is NULL I get an error message: :"conversion from 'DBNull' to type 'String' is not valid". How do I wok around this?
Chas28
You need to first check the returning value of the query that if it is null then you don't need to set the text box text because its text property require an empty or non empty string not the Null value.
Try this:
if not cmd.ExecuteScalar =DBNull.Value then
texBox1.Text = cmd.ExecuteScalar
End If
Don't forget to click "Mark as Answer" on the post that helped you.
This earns you a point.
Zeeshan Malik
http://zeemalik.wordpress.com
Sorry, but "if not cmd.ExecuteScalar =DBNull.Value" does not work. I get the error message :
'= is not defined for system.data.OLEDbCommand' and 'system.DBNull''
but thanks for trying.
Chas28
|||ok try this:
Dim returnValue as String
returnValue = cmd.ExecuteScalar
if not ( returnValue =DBNull.Value OR returnValue =Nothing)then
texBox1.Text = returnValue
End If
Don't forget to click "Mark as Answer" on the post that helped you.
This earns you a point.
Zeeshan Malik
http://zeemalik.wordpress.com
Sunday, February 26, 2012
error with linked server
when i try to run a query using linked servers, i get the following
error.
Server: Msg 125, Level 15, State 1, Line 1
Case expressions may only be nested to level 10.
I do have more than 10 case statements, it works fine when it is less
than 10. can anyone tell me if there is a way to have more than 10
case statements. thanks alot.
Jay
my query
Select category, val, Sum(QTY) As QTY , yr
From
(
Select val, QTY2 As QTY,
KEEP = Case
When code = '004' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '005' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '003' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '017' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '007' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '008' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '009' And ((YR > 2003) Or (YR = 2003 And MON > 11))
Then 'N'
When CODE = '010' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '038' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '032' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '030' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
When CODE = '018' And ((YR > 2003) Or (YR = 2003 And MON > 12))
Then 'N'
Else 'Y' End
From
amf a Join linkedserver.source.dbo.table2 b On a.COM = b.COM
Where CATEGORY In ('1') And CODE In ('001','003','004','005')
And b.YR Between 2003 And 2004 And b.MON <= 1
) x
Where KEEP = 'Y'
Group By CATEGORY, YR"Jay" <webforum2000@.yahoo.com> wrote in message
news:9594a55e.0404230831.50bcabe0@.posting.google.c om...
> Hi
> when i try to run a query using linked servers, i get the following
> error.
> Server: Msg 125, Level 15, State 1, Line 1
> Case expressions may only be nested to level 10.
> I do have more than 10 case statements, it works fine when it is less
> than 10. can anyone tell me if there is a way to have more than 10
> case statements. thanks alot.
> Jay
> my query
> Select category, val, Sum(QTY) As QTY , yr
> From
> (
> Select val, QTY2 As QTY,
> KEEP = Case
> When code = '004' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '005' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '003' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '017' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '007' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '008' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '009' And ((YR > 2003) Or (YR = 2003 And MON > 11))
> Then 'N'
> When CODE = '010' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '038' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '032' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '030' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> When CODE = '018' And ((YR > 2003) Or (YR = 2003 And MON > 12))
> Then 'N'
> Else 'Y' End
> From
> amf a Join linkedserver.source.dbo.table2 b On a.COM = b.COM
> Where CATEGORY In ('1') And CODE In ('001','003','004','005')
> And b.YR Between 2003 And 2004 And b.MON <= 1
> ) x
> Where KEEP = 'Y'
> Group By CATEGORY, YR
Since most of your conditions are the same, have you tried something like
this?
Select category, val, Sum(QTY) As QTY , yr
From
(
Select val, QTY2 As QTY,
KEEP = Case
When code in ('004', '005, '003', '017', /* etc. */)
And ((YR > 2003) Or (YR = 2003 And MON > 12))
Else 'Y' End
From
amf a Join linkedserver.source.dbo.table2 b On a.COM = b.COM
Where CATEGORY In ('1') And CODE In ('001','003','004','005')
And b.YR Between 2003 And 2004 And b.MON <= 1
) x
Simon|||
hi
thanks for the suggestion. I have a problem, this is one of the query
where it is all the same, in a few others it varies a lot. i want to
know if the limitaion exists in sql using linked servers ( since it
works fine if i dont use linked servers and have them in the same
server). i want to get aroud this, so that i dont have to change all my
existing queries, and would hamper my using linked server. thanks.. any
suggestion?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Sunday, February 19, 2012
Error while running xp_cmdshell
Analyzer.
Msg 50001, Level 1, State 50001
xpsql.cpp: Error 5 from CreateProcess on line 675
Here is the command that I am running that generates this error
message:
xp_cmdshell "@.ECHO test message > c:\temp\newtemp.txt"
The command inside the xp_cmdshell command runs successfully from a
Windows command prompt. Simpler commands also fail with the same error
message. For example:
xp_cmdshell 'dir'
Can anyone suggest a solution to this problem? I assume this problem is
due to a permissions/security issue. I have given Everyone Full Control
over c:\temp.
Windows 2000
SQL Server 2000
Thanks for any help.Probably a permissions issue.
Best way to troubleshoot this is as follows:
1. Log in as "sa" or as a sysadmin user (you are already doing this
step right?)
2. Try running the xp_cmdshell (does it work?)
3. If no, check the startup account for the MSSQLSERVER service - does
this user have the ability to run this command? Not sure? Log off the
server and log back in as this service startup user.. Try running the
DOS command...
The key is to make sure the account running the SQL Server service has
the p|||Chris Allison (chris.f.allison@.gmail.com) writes:
> I am getting the following error when running a command in Query
> Analyzer.
> Msg 50001, Level 1, State 50001
> xpsql.cpp: Error 5 from CreateProcess on line 675
> Here is the command that I am running that generates this error
> message:
> xp_cmdshell "@.ECHO test message > c:\temp\newtemp.txt"
> The command inside the xp_cmdshell command runs successfully from a
> Windows command prompt. Simpler commands also fail with the same error
> message. For example:
> xp_cmdshell 'dir'
And what does "xp_cmdshell 'set'" yield? That is, a command that
does not perform any disc access at all?
"NET HELPMSG 5" gives "Access is denied", but I'm too bad at Windows
to say what access it is. Since this happens in CreateProcess one
could suspect that access is denied when try to create a subprocess.
Under which user does SQL Server run? And are yourself logged into
SQL Server as sysadmin, or as an unpriviledged user?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi, the xp_cmdshell stored procedure needs grants in cmd.exe
go to %systemroot%\system32\cmd.exe right click, and add grants.
It is not recommended by security reasons.
regards
Sha0
www.badchecksum.com|||One simple answer:
Antivirus software!
It could be any of the solutions suggested on the internet when searching for "Error 5 from CreateProcess" on Google, but I tried them all and none of them helped.
I uninstalled the antivirus software (Panda) and it worked like a charm!
Try uninstalling (or configuring) your antivirus software.
Kind regards, good luck and may the source be with you
/Boozon
Error while restoring SQL7 data on SQL Express 2005
Hi,
I have backup of data from SQL Server 7.0 and now when i'm trying to restore it into SQL Express 2005, I'm getting following error......
--
Msg 3154, Level 16, State 2, Line 1
The backup set holds a backup of a database other than the existing 'GOSLDW' database.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
--
Here is SQL i'm using to restore database,
RESTORE DATABASE GOSLDW
FROM DISK = 'C:\sqlserverData\GOSLDW'
WITH MOVE 'GOSLDW' TO 'C:\sqlserverData\GOSLDW.mdf',
MOVE 'GOSLDW' TO 'C:\sqlserverData\GOSLDW.ldf'
GO
Why i'm getting this error? Am i missing anything here?
Thanks in advance for your HELP.
- R
There is already a database existing with this name, you either have to drop the database first or replace it with the WITH REPLACE option, see BOL for more details.HTH, jens Suessmeyer.
http://www.sqlserver2005.de
|||
Thanks for you reply...
After droping database and runing same query again I got message back that database is restore successfully but I don't see any database created.
How i can see this restored database?
I'm new in this SQLServer world..... Thanks for your help.
-R
|||When you say you can't see it where are you looking? If this is the treeview in SSMS then try right clicking on the databases node and select refresh. If yuo still can not see it then try executing the following query
select * from sys.databases
|||I guess you are just connected to the wrong instance, use the following command while connected to the *assumed* right instance to see wheter the database appears in the list: SELECT * FROM sys.databases If not the instance does not hold the database you want to use and you restore the database on another system than the wanted :-|
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||Thanks now its working fine. I had to stop server and restart to see all database.
Thanks for you help,
R
|||You should not have to do that, a simple refresh of the node should allow you to see them all.Error while Quering Qracle table from SQL 2000
i am receiving following error while querying a particular table in Oracle form SQl 2000.
Other tables can be queried.
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDAORA' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ICommandPrepare::Prepare returned 0x80004005: The provider did not give any information about the error.].
Someone coould please guide me as to how to resolve this error?
Regrads,
YogeetaYOUR QUESTION IS NOT CLEAR .
Please try to post your question clearly and pass few more informations regarding your problem.|||
Quote:
Originally Posted by debasisdas
YOUR QUESTION IS NOT CLEAR .
Please try to post your question clearly and pass few more informations regarding your problem.
A user is accessing one particular Oracle table from SQL2005.For a particular table while running a simple sekect query he gets the following error message.
The other tables can be queried from the connected server in MS SQL.
Error Received:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDAORA' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ICommandPrepare::Prepare returned 0x80004005: The provider did not give any information about the error.].
I hope now its clear and can enlighten me on this.
Regards
Wednesday, February 15, 2012
Error While connecting to SQL Server
i have an Error While connecting to My SQL Server Express
just when i click add new data source i have an error msg as shown in this pic :

Plz Help Me ,,,
This seems to be a problem with VS, not SQL Express, according to this post. Check that out and see if it helps.
Mike