Showing posts with label pointers. Show all posts
Showing posts with label pointers. Show all posts

Wednesday, March 28, 2012

MS Sql Server loosing connection over WAN ..

Hello everyone.
We are experiencing a weird MS Sql Server behavior, and so far I have
not been able to identify the problem.. Any pointers will be deeply
appreciated.
Here is the scenario: we have three servers. One of them is running MS
Sql Server 2000, and the other two are application servers connecting
to the SQL Server. One of them is connecting over LAN, the other over
WAN. Every now and then, the one connecting over WAN becomes unable to
communicate with the SQL server. Even the Query Analyzer is not able
to connect (it cannot even get the list of databases to fill the
combo).
At the same time, the server connecting to SQL over LAN can connect
and function without any problems.
When the SQL server machine is rebooted, the server on WAN is able to
connect again...
I was suspenting some intermittent network problems, but at the time
the problem occurs, the SQL server and the problematic server on WAN
can ping each other without any problem and telnet from the server on
WAN to the SQL server port 1433 seems to work fine.
Configuration: All three servers running on Windows Server 2003 SP1,
SQL Server version is 2000 SP3a.
Where should we look into ?
Many thanks in advance,
Arifi Koseoglu
http://vyaskn.tripod.com/watch_your_timeouts.htm
check it out.
You should run a trace with profiler to capture info what happens in the
database when the problems acure.
Cheers
"arifi" wrote:

> Hello everyone.
> We are experiencing a weird MS Sql Server behavior, and so far I have
> not been able to identify the problem.. Any pointers will be deeply
> appreciated.
> Here is the scenario: we have three servers. One of them is running MS
> Sql Server 2000, and the other two are application servers connecting
> to the SQL Server. One of them is connecting over LAN, the other over
> WAN. Every now and then, the one connecting over WAN becomes unable to
> communicate with the SQL server. Even the Query Analyzer is not able
> to connect (it cannot even get the list of databases to fill the
> combo).
> At the same time, the server connecting to SQL over LAN can connect
> and function without any problems.
> When the SQL server machine is rebooted, the server on WAN is able to
> connect again...
> I was suspenting some intermittent network problems, but at the time
> the problem occurs, the SQL server and the problematic server on WAN
> can ping each other without any problem and telnet from the server on
> WAN to the SQL server port 1433 seems to work fine.
> Configuration: All three servers running on Windows Server 2003 SP1,
> SQL Server version is 2000 SP3a.
> Where should we look into ?
> Many thanks in advance,
> Arifi Koseoglu
>
|||Sounds like this is a network issue, not a database issue. There could be a
resource limitation somewhere or something maybe happening on a router or
firewall somewhere that could be causing this.
MG
"arifi" wrote:

> Hello everyone.
> We are experiencing a weird MS Sql Server behavior, and so far I have
> not been able to identify the problem.. Any pointers will be deeply
> appreciated.
> Here is the scenario: we have three servers. One of them is running MS
> Sql Server 2000, and the other two are application servers connecting
> to the SQL Server. One of them is connecting over LAN, the other over
> WAN. Every now and then, the one connecting over WAN becomes unable to
> communicate with the SQL server. Even the Query Analyzer is not able
> to connect (it cannot even get the list of databases to fill the
> combo).
> At the same time, the server connecting to SQL over LAN can connect
> and function without any problems.
> When the SQL server machine is rebooted, the server on WAN is able to
> connect again...
> I was suspenting some intermittent network problems, but at the time
> the problem occurs, the SQL server and the problematic server on WAN
> can ping each other without any problem and telnet from the server on
> WAN to the SQL server port 1433 seems to work fine.
> Configuration: All three servers running on Windows Server 2003 SP1,
> SQL Server version is 2000 SP3a.
> Where should we look into ?
> Many thanks in advance,
> Arifi Koseoglu
>
sql

MS Sql Server loosing connection over WAN ..

Hello everyone.
We are experiencing a weird MS Sql Server behavior, and so far I have
not been able to identify the problem.. Any pointers will be deeply
appreciated.
Here is the scenario: we have three servers. One of them is running MS
Sql Server 2000, and the other two are application servers connecting
to the SQL Server. One of them is connecting over LAN, the other over
WAN. Every now and then, the one connecting over WAN becomes unable to
communicate with the SQL server. Even the Query Analyzer is not able
to connect (it cannot even get the list of databases to fill the
combo).
At the same time, the server connecting to SQL over LAN can connect
and function without any problems.
When the SQL server machine is rebooted, the server on WAN is able to
connect again...
I was suspenting some intermittent network problems, but at the time
the problem occurs, the SQL server and the problematic server on WAN
can ping each other without any problem and telnet from the server on
WAN to the SQL server port 1433 seems to work fine.
Configuration: All three servers running on Windows Server 2003 SP1,
SQL Server version is 2000 SP3a.
Where should we look into ?
Many thanks in advance,
Arifi Koseogluhttp://vyaskn.tripod.com/watch_your_timeouts.htm
check it out.
You should run a trace with profiler to capture info what happens in the
database when the problems acure.
Cheers
"arifi" wrote:

> Hello everyone.
> We are experiencing a weird MS Sql Server behavior, and so far I have
> not been able to identify the problem.. Any pointers will be deeply
> appreciated.
> Here is the scenario: we have three servers. One of them is running MS
> Sql Server 2000, and the other two are application servers connecting
> to the SQL Server. One of them is connecting over LAN, the other over
> WAN. Every now and then, the one connecting over WAN becomes unable to
> communicate with the SQL server. Even the Query Analyzer is not able
> to connect (it cannot even get the list of databases to fill the
> combo).
> At the same time, the server connecting to SQL over LAN can connect
> and function without any problems.
> When the SQL server machine is rebooted, the server on WAN is able to
> connect again...
> I was suspenting some intermittent network problems, but at the time
> the problem occurs, the SQL server and the problematic server on WAN
> can ping each other without any problem and telnet from the server on
> WAN to the SQL server port 1433 seems to work fine.
> Configuration: All three servers running on Windows Server 2003 SP1,
> SQL Server version is 2000 SP3a.
> Where should we look into ?
> Many thanks in advance,
> Arifi Koseoglu
>|||Sounds like this is a network issue, not a database issue. There could be a
resource limitation somewhere or something maybe happening on a router or
firewall somewhere that could be causing this.
--
MG
"arifi" wrote:

> Hello everyone.
> We are experiencing a weird MS Sql Server behavior, and so far I have
> not been able to identify the problem.. Any pointers will be deeply
> appreciated.
> Here is the scenario: we have three servers. One of them is running MS
> Sql Server 2000, and the other two are application servers connecting
> to the SQL Server. One of them is connecting over LAN, the other over
> WAN. Every now and then, the one connecting over WAN becomes unable to
> communicate with the SQL server. Even the Query Analyzer is not able
> to connect (it cannot even get the list of databases to fill the
> combo).
> At the same time, the server connecting to SQL over LAN can connect
> and function without any problems.
> When the SQL server machine is rebooted, the server on WAN is able to
> connect again...
> I was suspenting some intermittent network problems, but at the time
> the problem occurs, the SQL server and the problematic server on WAN
> can ping each other without any problem and telnet from the server on
> WAN to the SQL server port 1433 seems to work fine.
> Configuration: All three servers running on Windows Server 2003 SP1,
> SQL Server version is 2000 SP3a.
> Where should we look into ?
> Many thanks in advance,
> Arifi Koseoglu
>

MS Sql Server loosing connection over WAN ..

Hello everyone.
We are experiencing a weird MS Sql Server behavior, and so far I have
not been able to identify the problem.. Any pointers will be deeply
appreciated.
Here is the scenario: we have three servers. One of them is running MS
Sql Server 2000, and the other two are application servers connecting
to the SQL Server. One of them is connecting over LAN, the other over
WAN. Every now and then, the one connecting over WAN becomes unable to
communicate with the SQL server. Even the Query Analyzer is not able
to connect (it cannot even get the list of databases to fill the
combo).
At the same time, the server connecting to SQL over LAN can connect
and function without any problems.
When the SQL server machine is rebooted, the server on WAN is able to
connect again...
I was suspenting some intermittent network problems, but at the time
the problem occurs, the SQL server and the problematic server on WAN
can ping each other without any problem and telnet from the server on
WAN to the SQL server port 1433 seems to work fine.
Configuration: All three servers running on Windows Server 2003 SP1,
SQL Server version is 2000 SP3a.
Where should we look into ?
Many thanks in advance,
Arifi Koseogluhttp://vyaskn.tripod.com/watch_your_timeouts.htm
check it out.
You should run a trace with profiler to capture info what happens in the
database when the problems acure.
Cheers
"arifi" wrote:
> Hello everyone.
> We are experiencing a weird MS Sql Server behavior, and so far I have
> not been able to identify the problem.. Any pointers will be deeply
> appreciated.
> Here is the scenario: we have three servers. One of them is running MS
> Sql Server 2000, and the other two are application servers connecting
> to the SQL Server. One of them is connecting over LAN, the other over
> WAN. Every now and then, the one connecting over WAN becomes unable to
> communicate with the SQL server. Even the Query Analyzer is not able
> to connect (it cannot even get the list of databases to fill the
> combo).
> At the same time, the server connecting to SQL over LAN can connect
> and function without any problems.
> When the SQL server machine is rebooted, the server on WAN is able to
> connect again...
> I was suspenting some intermittent network problems, but at the time
> the problem occurs, the SQL server and the problematic server on WAN
> can ping each other without any problem and telnet from the server on
> WAN to the SQL server port 1433 seems to work fine.
> Configuration: All three servers running on Windows Server 2003 SP1,
> SQL Server version is 2000 SP3a.
> Where should we look into ?
> Many thanks in advance,
> Arifi Koseoglu
>|||Sounds like this is a network issue, not a database issue. There could be a
resource limitation somewhere or something maybe happening on a router or
firewall somewhere that could be causing this.
--
MG
"arifi" wrote:
> Hello everyone.
> We are experiencing a weird MS Sql Server behavior, and so far I have
> not been able to identify the problem.. Any pointers will be deeply
> appreciated.
> Here is the scenario: we have three servers. One of them is running MS
> Sql Server 2000, and the other two are application servers connecting
> to the SQL Server. One of them is connecting over LAN, the other over
> WAN. Every now and then, the one connecting over WAN becomes unable to
> communicate with the SQL server. Even the Query Analyzer is not able
> to connect (it cannot even get the list of databases to fill the
> combo).
> At the same time, the server connecting to SQL over LAN can connect
> and function without any problems.
> When the SQL server machine is rebooted, the server on WAN is able to
> connect again...
> I was suspenting some intermittent network problems, but at the time
> the problem occurs, the SQL server and the problematic server on WAN
> can ping each other without any problem and telnet from the server on
> WAN to the SQL server port 1433 seems to work fine.
> Configuration: All three servers running on Windows Server 2003 SP1,
> SQL Server version is 2000 SP3a.
> Where should we look into ?
> Many thanks in advance,
> Arifi Koseoglu
>

Monday, March 26, 2012

MS SQL server Insert Error [109]

Greetings!

When I run the following SQL statement in Perl, I get an error
stating:
any help/pointers how this can be resolved?

Thanks,
-Murali

SQL note_insert error: [109] [2] [0] "[Microsoft][ODBC SQL Server
Driver][SQL Server]There are more columns in the INSERT statement than
values specified in the VALUES clause. The number of values in the
VALUES clause must match the number of columns specified in the INSERT
statement."

The perl code:

$sql_stmt1 = "select cast(newid () as varbinary(16)) as notes_id
from cc_test";

if($db_ends->Sql($sql_stmt1))
{
$db_ends->Error();
exit(-1);
}

while($db_ends->FetchRow())
{
undef %Data;
%Data = $db_ends->DataHash();
$notes_id = $Data{"notes_id"};
}

# Prepare the columns for insert

my$updated_detail = "$pn . $cc_ver\n";

my $note_columns = "user_note_id, bio_name, related_tbl_name,
related_string_id, related_int_id, note_type_lkp, notes,
internal_flag, revision_number, obsolete_flag";

my $note_values = "cast(" +$notes_Id + "as binary(16)), Null, Null,
Null, $bfn, 0x74942E5A0A04022800415DE63529D4B7, $notes_detail, 0, 0,
0";

$sql_note_insert = "insert into user_note ($note_columns) values
($note_values)";

if($db_ends->Sql($sql_note_insert))Make sure you delimit all strings with single quotes ('). If one of the
current variables (such as $note_details) contains a comma, then you
will have more "values" than "columns".

If this doesn't work, then please post the actual query you are
submitting to SQL-Server.

Hope this helps,
Gert-Jan

Murali Kanaga wrote:
> Greetings!
> When I run the following SQL statement in Perl, I get an error
> stating:
> any help/pointers how this can be resolved?
> Thanks,
> -Murali
> SQL note_insert error: [109] [2] [0] "[Microsoft][ODBC SQL Server
> Driver][SQL Server]There are more columns in the INSERT statement than
> values specified in the VALUES clause. The number of values in the
> VALUES clause must match the number of columns specified in the INSERT
> statement."
> The perl code:
> $sql_stmt1 = "select cast(newid () as varbinary(16)) as notes_id
> from cc_test";
> if($db_ends->Sql($sql_stmt1))
> {
> $db_ends->Error();
> exit(-1);
> }
> while($db_ends->FetchRow())
> {
> undef %Data;
> %Data = $db_ends->DataHash();
> $notes_id = $Data{"notes_id"};
> }
> # Prepare the columns for insert
> my $updated_detail = "$pn . $cc_ver\n";
> my $note_columns = "user_note_id, bio_name, related_tbl_name,
> related_string_id, related_int_id, note_type_lkp, notes,
> internal_flag, revision_number, obsolete_flag";
> my $note_values = "cast(" +$notes_Id + "as binary(16)), Null, Null,
> Null, $bfn, 0x74942E5A0A04022800415DE63529D4B7, $notes_detail, 0, 0,
> 0";
> $sql_note_insert = "insert into user_note ($note_columns) values
> ($note_values)";
> if($db_ends->Sql($sql_note_insert))sql