Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Sunday, March 11, 2012

[Shared Memory]ConnectionCheckForData error on delete command.

Hello,
I ave a strange error with SQLServer 2000 SP3.
I made a table that contains over 62'000 records. When I delete over
300 records, I have this error:
[Microsoft][ODBC SQL Server Driver][Shared
Memory]ConnectionCheckForData (CheckforData()).
Serveur : Msg 11, Niveau 16, État 1, Ligne 0
Structure of my table:
create table ActiveTimeForProcessing (
ACTIVETIMEFORPROCESSING_PK int identity,
InstanciedClassName int not null,
ActiveTime int not null,
DateFrom datetime not null,
DateTo datetime not null,
constraint PK_ACTIVETIMEFORPROCESSING primary key
(ACTIVETIMEFORPROCESSING_PK)
)
go
alter table ActiveTimeForProcessing
add constraint ActiveTimeForProcessingHasActiveTime foreign key
(ActiveTime)
references ActiveTime (ACTIVETIME_PK)
go
CREATE INDEX [IX_ActiveTimeForProcessing_DateFrom] ON
[dbo].[ActiveTimeForProcessing]([DateFrom]) ON [PRIMARY]
GO
CREATE INDEX [IX_ActiveTimeForProcessing_DateTo] ON
[dbo].[ActiveTimeForProcessing]([DateTo]) ON [PRIMARY]
GO
Something very strange is that on an other server, it work fine...
Thanks to help me.
PascalHi,
Try
1. Run DBCC CHECKDB against the database to make sure it is clean.
2. Check the errorlog for any error that match the time that you get the
error.
Sincerely,
Yih-Yoon Lee
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||Thanks a lot, but I tryed you purpose...
Finally I found sollution... Service Pack 3a......... ... ...
Thanks one more.
Pascal
""Jinxin"" <yihyoonl@.online.microsoft.com> a écrit dans le message de news:
ZRYO4j$PDHA.2696@.cpmsftngxa09.phx.gbl...
> Hi,
> Try
> 1. Run DBCC CHECKDB against the database to make sure it is clean.
> 2. Check the errorlog for any error that match the time that you get the
> error.
> Sincerely,
> Yih-Yoon Lee
> Microsoft, SQL Server
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
>

Thursday, March 8, 2012

[Performance Discussion] To schedule a time for mssql command, which way would be faster a

1. Use mssql server agent service to take the schedule
2. Use a .NET windows service with timers to call SqlClientConnection

above, which way would be faster and get a better performance?I don't think you'll see any performance difference.

but go with agent.|||ok, but will have a difference when busy

Sunday, February 19, 2012

[DBNETLIB]ConnectionCheckForData (CheckforData())

Hi...

SQL SERVER 2000 SP3, WINDOWS 2K SERVER...

If i run this command on a remote server

select replicate(' ',190)

i have the following error

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.

Connection Broken

if i run select replicate(' ',60) on the same server it completes
succesfully...

any ideas?...

thanks...Sangines (javier.sangines@.gruposenda.com) writes:
> SQL SERVER 2000 SP3, WINDOWS 2K SERVER...
> If i run this command on a remote server
> select replicate(' ',190)
> i have the following error
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData
> (CheckforData()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broken
> if i run select replicate(' ',60) on the same server it completes
> succesfully...

Interesting...

Often such events are accompnied by messages in the SQL Server errorlog
with a stack dump, indicating that there was an execution error in
SQL Server. However, given the statement you submit this sounds
unlikely. I assume that you run it from Query Analyzer?

So in this case, I would say that it smells a network problem of
some sort. Do you still get the message if you run the query locally
on the SQL Server machine? Do you get the message if you talk to
other SQL Servers?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||> Interesting...
> Often such events are accompnied by messages in the SQL Server errorlog
> with a stack dump, indicating that there was an execution error in
> SQL Server. However, given the statement you submit this sounds
> unlikely. I assume that you run it from Query Analyzer?
> So in this case, I would say that it smells a network problem of
> some sort. Do you still get the message if you run the query locally
> on the SQL Server machine? Do you get the message if you talk to
> other SQL Servers?

Thanks for quick response Erland...

Yes...it was a network problem, caused by misconfiguration in network device...

problem solved...

thanks again...

Thursday, February 16, 2012

[ask] how to invoke sqldatasource command in method?

hello everybody, i have a question to ask,

suppose i have a sqldatasource, can i use it in a method??

this is my case, i need to make a new method to count the rows in a datagrid, so i will have to read the sqldatasource. the problem is, how to retrieve it?? usually i use the built in sqldatasource_selected to count the rows...

is there any other way??

Lets have a binddata method

privatevoid BindData()

{

SqlDataSource1.SelectCommand =

"Select * from clients";

}

Call the above method in PageLoad or any other desired Event

In theSqlDataSource1_Selected

retrive the total rows

protectedvoid SqlDataSource1_Selected(object sender,SqlDataSourceStatusEventArgs e)

{

Label1.Text = e.AffectedRows.ToString();

}

Hope this will help you.

let me know if need further clarifications

|||

yupz i know that, but that doesn't solve my problem

if i save the total row to a variable, let's say countRow = e.AffectedRows, how can i pass this value to another method??

(i need this value to be added by 1 so i can use it for the next primary key)

|||

Store it in a Viewstate or Session Variable

Set Value

Session[

"RowCount"] = e.AffectedRows;

ViewState[

"RowCount"] = e.AffectedRows;

Getvalue

int rowCount1 =int.Parse(Session["RowCount"].ToString());

int rowCount2 =int.Parse(ViewState["RowCount"].ToString());

If you need to access the value even in otherpage use Session or Viewstate itself ok

|||

oww yes, session variable...i completely forget it :)

thx so much bro...

but that viewstate variable...what is the difference??

btw thx so much bro

|||

The values stored in session will be available through out the Session of a particular user irrespective of the page he/she is navigating.

Value stored in viewstate will be available only in the page in which it have been set.

More over in Viewstate you can place only string ,in Session variable you can place any object

Have a look into these links

http://hiltong.blogspot.com/2004/11/viewstate-vs-session-state-vs.html

http://aspalliance.com/articleViewer.aspx?aId=135&pId=

Hope this will help you

|||well...thank you very much bro

Monday, February 13, 2012

[2005] Who created this table?

Is there a command I can use to find out WHO created a specific table?
~LeShort of asking your coworkers?

If you have Lumigent's Log Explorer, you can extract some of that information (at least when the table was created) from the transaction logs or the transaction log backups.

If you do not have the applicable transaction logs, you are pretty much reduced to trying to figure out who has rights to create tables, and asking them.|||Unless it was a sandbox (so who would care anyway), I would have total control over my databases.

I'm not too sanguin about a wild west show|||Unless it was a sandbox (so who would care anyway), I would have total control over my databases.

I'm not too sanguin about a wild west show

It is a sandbox, but we told our developers not to create dummy tables. So we are trying to crack down.

So it looks like Sql Server 2005 has NO way of determining who created a table. That's too bad.

`Le|||For 2005 you can define DDL triggers that will fire on a create table statement. You can use them to create an audit trail.