Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Tuesday, March 20, 2012

[strange] date format issue: 2 servers, one query, 2 different results.

I'm running 2 WIN2K SP4 servers with MSSQL Server (v 7.00.1077). Both NT servers seems to have the same setup. I use the ADODB object to connect to MSSQL via OLE DB and notice that the following query generates an error on one server, not the other:

SELECT DATA FROM TABLE_1 WHERE ((TRANSACTION_DATE >='13/11/2003') AND (TRANSACTIONS_DATE <='20/11/2003')) [dates are DD/MM/YYYY]

Query on server_1:
- using OLE DB: correct
- using ODBC: correct
- using Query Analyzer: error <The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value>

On server_2:
- using OLE DB: error <The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value>
- using ODBC: correct
- using Query Analyzer: error <The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value>

Both servers have MDAC 2.8 RTM installed and a <select @.@.language> returns <us_english> via query analyzer and <franais> via ODBC.

I'd like to setup Server 2 so that queries can be executed the same as on server 1.

Any ideas are welcomed!There's a problem with 20/11/2003 in us_english format. Default is: MDY, so it's reading 20th as month, which is why you're getting that error.

Here's an article I found: http://members.lycos.nl/digispy/C2/P56/C2P56A1806.htm

G'luck!
Meera|||Possible there is something to do with locale settings of windows, check the "Region Options" in Control Panel for both servers.|||I'd say the languages are different...and accordingingly each date format is different

Di SELECT * FROM master..syslanguages

I think English is the only one that mdy|||(D/M/Y is a French date format).

I just had to set <French> to user's default language instead of <US_ENGLISH>. This means ODBC settings override the default SQL Server settings as OLE DB uses the default SQL Server setting.sql

Sunday, March 11, 2012

[REPL] server config for distributor server?

We are going to have two SQL 2000 Servers with a SQL 2005 distributor server that will handle 1 way transactional replication. What kind of server should I ask IT to spec out that would satisfy an installation such as this?

Our production DB is 30GB and we are replication about 60% of the data to another server.rack mountable
dual processor with hyperthreading
100 GB RAID (disk space is not that important, but might as well make it RAID)
16 GB Memory (from what I understand memory is the most important attribute)

any other suggestions...?

Tuesday, March 6, 2012

[Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID X) was deadloc

My company recently upgraded from SQL 7 to SQL 2000. We also updated
our application servers from Windows NT to Windows 2003. Now when we
get the error [Microsoft][ODBC SQL Server Driver][SQL
Server]Transaction (Process ID X) was deadlocked, the part that comes
next "on {unprintable" shows up as unprintable characters. The rest of
the error message seems fine. Only the part between the braces is
garbage. Does anyone have any suggestions as to why this is? It
seems to be happening from both C++ and Java apps. We are using ODBC
with the C++ apps and JDBC with the Java apps.
Thanks.
-Jeff-Hi
You may want to run SQL profiler to see what is being sent to the server,
and look at the query plans to see if you are missing indexes or statistics.
You may need to change the order of the SQL in your code/stored procedures
and if you have carried over any hints from the SQL 7 upgrade you may want
to evaluate if they are still necessary.
For ways ways to find blocking check out
http://support.microsoft.com/kb/271509/EN-US/ and general tips on
http://www.sql-server-performance.com/
John
"kludge" <jeff.schuler@.53.com> wrote in message
news:1130515027.782023.128220@.g43g2000cwa.googlegroups.com...
> My company recently upgraded from SQL 7 to SQL 2000. We also updated
> our application servers from Windows NT to Windows 2003. Now when we
> get the error [Microsoft][ODBC SQL Server Driver][SQL
> Server]Transaction (Process ID X) was deadlocked, the part that comes
> next "on {unprintable" shows up as unprintable characters. The rest of
> the error message seems fine. Only the part between the braces is
> garbage. Does anyone have any suggestions as to why this is? It
> seems to be happening from both C++ and Java apps. We are using ODBC
> with the C++ apps and JDBC with the Java apps.
> Thanks.
> -Jeff-
>

Saturday, February 25, 2012

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name on Linked Server

Hi Folks,
I'm having a strange situation here between 2 Linked MS SQL 2K servers.
One of the servers died recently and I rebuilt it.
All seems to be working fine, except that when I create views that access tables on the other (linked) server, I can not modify any data, because I get the [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name server.database.dbo.TableName error.
The View does work fine otherwise, ie displays the data in it, I just can't modify.
The Linked Servers are done with the sa user between these 2 servers.

Any ideas what could be causing this error?
Thanks!-- bump --
no one ideas on this?|||I'm also having problems with this - mine is in relation to a labeler printer, it is present in my ODBC and the test is successful. However, when I go to print I get the following error: [microsoft][ODBC SQL Server Driver][SQL SERVER] Invalid object name 'table name' ODBC -- call failed

I can't seem to see what the problem is as my project server works from this client.

Saturday, February 11, 2012

@@serverName returns wrong name

I have 2 different SQL 2000 servers that had name changes after SQL was
installed. The first is returning the wrong name when I run "@.@.serverName".
The other is returning "null" when I run this query.
Can anyone tell me what the impact on applications is of changing these
names to what they should be?
tia
jjHi
Just rename the SQL Server as per:
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Use:
SELECT SERVERPROPERTY('ServerName')
David Portas
SQL Server MVP
--
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Hi,
Stop ur sql services and restart the services u will get the real
error.
from
Doller

@@serverName returns wrong name

I have 2 different SQL 2000 servers that had name changes after SQL was
installed. The first is returning the wrong name when I run "@.@.serverName".
The other is returning "null" when I run this query.
Can anyone tell me what the impact on applications is of changing these
names to what they should be?
tia
jj
Hi
Just rename the SQL Server as per:
http://msdn.microsoft.com/library/de...stall_5r8f.asp
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>
|||Use:
SELECT SERVERPROPERTY('ServerName')
David Portas
SQL Server MVP
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>
|||Hi,
Stop ur sql services and restart the services u will get the real
error.
from
Doller

@@serverName returns wrong name

I have 2 different SQL 2000 servers that had name changes after SQL was
installed. The first is returning the wrong name when I run "@.@.serverName".
The other is returning "null" when I run this query.
Can anyone tell me what the impact on applications is of changing these
names to what they should be?
tia
jjHi
Just rename the SQL Server as per:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/instsql/in_afterinstall_5r8f.asp
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Use:
SELECT SERVERPROPERTY('ServerName')
--
David Portas
SQL Server MVP
--
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:unGp3y5wFHA.1168@.TK2MSFTNGP15.phx.gbl...
>I have 2 different SQL 2000 servers that had name changes after SQL was
>installed. The first is returning the wrong name when I run "@.@.serverName".
>The other is returning "null" when I run this query.
> Can anyone tell me what the impact on applications is of changing these
> names to what they should be?
>
> tia
> jj
>|||Hi,
Stop ur sql services and restart the services u will get the real
error.
from
Doller

Thursday, February 9, 2012

@@servername

If anybody can explain why for one of my SQL Server2000 servers the statement select @.@.servername returns NULL instead of name?
ThanksThe BOL is incomplete about this subject. Try this microsoft article (http://support.microsoft.com/default.aspx?scid=kb;en-us;303774)

Good luck
Hope this helped|||I'd use:EXECUTE sp_addserver 'desiredServerName', 'LOCAL'-PatP