May 17, 2011 at 12:46 am
Scan Density [Best Count:Actual Count].......: 99.73% [1119:1122]
On a table which has an image column, the scan density (output for DBCC SHOWCONTIG('DocumentsTable') is 99.73%
Could this be the reason for that I cannot update an image column in this table?
May 17, 2011 at 1:05 am
In an ideal environment, the density displayed would be close to 100.
Reference: http://www.sql-server-performance.com/articles/dba/dt_dbcc_showcontig_p2.aspx
So it is good that the scan density is close to 100.
But my problem is that when I want to update an image column and upload a file about 800 K through a program I get this error:
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at standards_test_swdserver.uploadstandard.UploadFileToDB(String strType, Byte[]& Buffer, Int32 FileLen, String DocumentID1, String FileContentType1)
Please help
May 18, 2011 at 4:46 pm
How long does it take before you get this error?
Do smaller and/or larger files get loaded?
Are the files stored on the same subnet?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 20, 2011 at 10:07 pm
I get the error when the size of the files exceeds 400 K or so
Files lower than 400 K are uploaded easily.
May 21, 2011 at 7:28 am
So apparently my test on your other thread didn't work.
Here's what I'd do next.
Redo the insert but from sql server side in QA.
Gradually create larger binary variables and insert them into that table. My bet here is that the server will either give you a different error message or work for all the inserts. That will tell you what you need to do next.
May 21, 2011 at 8:23 am
I just recalled having a similar problem and it turned out to be the NIC Card was configured to Auto.
I changed it to Full Duplex and that resolved the problem.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 21, 2011 at 10:06 pm
Would you please kindly let me know how I can insert data in a table via QA in SQL which has binaru data
Suppose the table has 3 columns(id, Desc, File)
id int identity PK
Desc varchar(50)
File image column
INSERT INTO TableName(Desc, File) VALUES ('Test', WHAT SHOULD COME HERE?)
May 22, 2011 at 5:26 am
IIRC image is just a fancy word for varbinary(max). So I'd just generate larger and larger binary files (with junk data).
You could also try the insert with the bulk statement. I don't have the syntax memorized tho.
May 22, 2011 at 8:34 am
Did you check the NIC Card?
I had this problem before and setting it to Full Duplex fixed the problem.
If you NIC is set to Auto you will have problems with certain types of applications.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
May 22, 2011 at 10:16 pm
I could not wait more so UNWILLINGLY I stopped the sql server and restarted it and everything was OK then. I really wanted to find out the root of the problem
May 23, 2011 at 6:35 am
maryamzolfaghar (5/22/2011)
I could not wait more so UNWILLINGLY I stopped the sql server and restarted it and everything was OK then. I really wanted to find out the root of the problem
If it works now it means it was very likely outside sql server.
I'd look at errors logs on the machine to try to get more usefull error messages to fix permanently (which is not the case at the moment).
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply