Showing posts with label client. Show all posts
Showing posts with label client. Show all posts

Sunday, March 25, 2012

Cluster install fails on SQL Native client

When I try to install SQL 2k5 Developer on a Windows 2003 SP1 cluster I keep getting an error popping up while trying to install. the error looks like this:

An Installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'

Can someone please tell me what is wrong.

I figure out what the problem was. I uninstall SQL Native client off of both nodes and reinstalled and it got past this problem and installed properly on both nodes as an Active/Active Cluster|||

I suffered with this problem for about 4 hours while doing a simple install on a XP box and on a Win2K box.

Yes, your solution works: Run SQLEXPR.exe, uninstall SQL Native Client, then re-run SQLEXPR.exe.

sqlsql

Monday, March 19, 2012

Clueless client who wants to create a table using reserved words

Hello all,
I have a database that supports two different applications.
For arguments sake I'll call them "intelligent app" and "clueless app"

The client that provided me the schema for the clueless app used reserved words as field names.
The words used are:
value, state, and time

I explained to the client that modifying them could prevent current/future issues.

The client is an "oracle" db (and in my mind should know better but ....) and responded back to me with the following:

BEGIN QUOTE
They are not currently reserved and there is no guarantee they will ever be reserved. In fact, the SQL server line eliminates as many words from the reserved list as they add with new releases. There are other words on the
possible future reserved keyword list that I do not wish to avoid either unless forced to some day, like depth, size, class, zone, level and others.
END QUOTE

Now for the assistance request, where can I find the documented ramifications of using reserved words?
I want to have my documentation (and my ducks lined up) when this clients portion of the app fails.

Any and all assistance is greatly appreciated.

T. Mullins'splain dat one again... Whyfor you have to be prepared when their Data Modeler's choices hit the fan?

SQL Server will gleefully tolerate them, as long as they are properly quoted using [], so what the heck do you care? The developers may revolt when their tools act up, but those column names aren't your choices, so they aren't your problems as far as I can see.

-PatP|||Do a search for "Reserved Keywords" in Books OnLine, and you should be presented with the current list of reserved words. One caution, I did come up with tw lists, one for C++ and one for T-SQL.

A quote from this article reads:
Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, this can be done only using delimited identifiers.

This is pretty much what Pat has said in his post, though.|||Gracias guys !
I knew of the BOL & MSDN info. I was hoping to have examples of apps that have crashed and burned due to poor design. :)
I think I'll wait in the tall grass ......
Regards to all.
tam

Originally posted by MCrowley
Do a search for "Reserved Keywords" in Books OnLine, and you should be presented with the current list of reserved words. One caution, I did come up with tw lists, one for C++ and one for T-SQL.

A quote from this article reads:
Although it is syntactically possible to use SQL Server reserved keywords as identifiers and object names in Transact-SQL scripts, this can be done only using delimited identifiers.

This is pretty much what Pat has said in his post, though.|||Oh, there are fabulous stories that go from the 1970s into the 1990s, but they peter out pretty quickly there. By that point in time, nearly everybody in the compiler/database/toolset community had abandoned the L-R grammer parsers for yacc or its equivalent, which allowed them to quickly and easily make it possible to make a product's entire grammer "quote sensistive". That change allowed the product vendors to make it possible for the user to "un-reserve" words that were otherwise reserved by quoting them somehow.

That change, combined with wider use of code-generators (sometimes by different names, but code generators nonetheless) made it relatively easy to "dodge the bullet" of reserved words.

It can still be a pain in the posterior, but it is no longer a case of Mohammed and the Mountian. Now the developer can work around the reserved-word problem if they choose to do so.

-PatP

Wednesday, March 7, 2012

Closing a conversation later on and Microsoft Service Broker Interface (sample)

In a messaging application, a client sends a message to the server. The server uses Service Broker Interface, and is CLR based. On the server, the message has a life cycle - going throughout multiple transitions until is final (Pending, In Transit, Delivered, TimedOut, Undeliverable). As the server receives the message, it sends back to the client a reply status message of In Transit. It does so using the same message’s conversation. It also saves – along with the message – its conversation handle. The dialog is not closed. After a while, the server may decide that the message has gotten to a final state (Delivered or TimedOut). I would like at that time to send a reply status message (Final State) back to the client and also close the conversation. The conversation handle has been saved by both, client and server. Having the conversation handle available - how do I get back to the client later on?

Thanks,

I don't understand what you mean by 'get back to the client later on'. Do you want to send a message using the conversation handle which was saved earlier? That's simple, you only have to execute the SEND statement with the saved conversation handle (or call Conversation.Send(...) in the ServiceBrokerInterface sample). Note that you cannot send after the conversation has been closed at your endpoint.|||

Yes, indeed, I would like to send a message using the conversation handle thant was saved earlier. This will be done by a different thread. All I have saved is the conversation hanlde and I am thinking to create a Conversation object based on the handle only. Can it be done?

Thanks,

|||I'll have to look it up if the Conversation class has a public constructor. If not, the ServiceBrokerInterface library is free for you to modify :-)|||That's right :). I am thinking about this way: (new Service(server service parameters)).GetConversation (mySavedConversationHandle). Thanks for following up.

Saturday, February 25, 2012

Client-side programming patterns/idioms for SQL Mobile 2005?

Hello,

Where can I get sample code, or a pointer to sample code demonstrating common programming pattern(s) for a client of SQL Mobile 2005 (where the client is also running on the device)?

For eg, with ADO.NET, I'd do something like:



SqlConnection conn = new SqlConnection(connStr);
SqlCommand cmd = conn.CreateCommand();
conn.CommandText = “--...my query…”;
SqlDataReader reader = conn.ExecuteReader();
// loop and process the data

What are the corresponding APIs and calls that I’d use for a SQL Mobile 2005 application using the latest CF.Net 2.0 ADO.Net APIs (or whatever they’re called)? I could only find a couple of articles on MSDN, both applying to SQLCE 2.0 and not SQL Mobile:

[1]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road05222002.asp
[2]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppcdatabase.asp

If this is documented in Books Online, how can I get to it? I couldn’t find it.

Thanks in advance!

-Ravi

The samples are in books on line of SQL Mobile and .NET CF 2
http://www.microsoft.com/sql/editions/sqlmobile/overview.mspx
http://msdn.microsoft.com/mobility/sqlmobile/default.aspx|||Navigating from the above links to get to the information I need is extremely cumbersome. For now, a search on MSDN2 led me to the following page, on which the link [Using Programming Interfaces] is exactly what I was looking for:

http://msdn2.microsoft.com/en-us/library/ms172961

Thanks,
ravi|||

For the benefit of others who may have the same question, I thought I would post some sample code that demonstrates a client connection programming pattern for SQL Mobile clients:


string dbFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/data.sdf";
string connectionString = string.Format("Data Source = {0};", dbFilePath);
using (SqlCeConnection conn = new SqlCeConnection(connectionString)) {
try {
/* open the connection, get a command */
conn.Open();
SqlCeCommand cmd = conn.CreateCommand();

cmd.CommandText = @."CREATE TABLE myTable(i int primary key)";
cmd.ExecuteNonQuery();
}
catch (Exception e) {
string logMessage = e.Message;
/* logging code goes here */
}
finally {
conn.Close();
}
} // end using


Note that this code is intended for a client application running on a device that is attempting to connect to a SQL Mobile database on the same device.

|||

Ravi Subramanian wrote:


Note that this code is intended for a client application running on a device that is attempting to connect to a SQL Mobile database on the same device.

Can you actually connect to a SQL Mobile db on another device? I thought it always had to be on the same device as your app.
Can anyone confirm this?|||SQL Mobile Client app and the DB should be on the same device except in the following scenarios:
1) SQL Server 2005 Management Studio (running on Desktop) can be used to connect to a SQL Mobile DB on the device
2) VS 2005 Management Studio (running on Desktop) can be used to connect to a SQL Mobile DB on the device

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Friday, February 24, 2012

Client-server simple question

In SQL 2000, if I'm running Query Analyzer on a client machine, and do
something like
Select * Into NewTable from OldTable
the data records don't all come from the server to my client machine and go
back to the server, do they? Doesn't all the data movement actually take
place ON the server?
The only reason I ask is that during this operation, the LAN icon "light"
in the system tray is solidly lit up, while it's not usually that way (it
usually blinks on and off). Maybe that's just status communication to QA,
but the icon is lit completely solid during this operation.
Thanks.
David WalkerThe data should not be zooming back and forth across the LAN.
What is probably being sent is the clock updates to the QA.
Rick Sawtell
MCT, MCSD, MCDBA|||"Rick Sawtell" <quickening@.msn.com> wrote in news:OYnpflb#EHA.3368
@.TK2MSFTNGP15.phx.gbl:

> The data should not be zooming back and forth across the LAN.
> What is probably being sent is the clock updates to the QA.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OK, thanks. That's what I hoped. The "light" being on solid is strange
for clock updates to the QA, but ... thanks.
David Walker

Client-server simple question

In SQL 2000, if I'm running Query Analyzer on a client machine, and do
something like
Select * Into NewTable from OldTable
the data records don't all come from the server to my client machine and go
back to the server, do they? Doesn't all the data movement actually take
place ON the server?
The only reason I ask is that during this operation, the LAN icon "light"
in the system tray is solidly lit up, while it's not usually that way (it
usually blinks on and off). Maybe that's just status communication to QA,
but the icon is lit completely solid during this operation.
Thanks.
David Walker
The data should not be zooming back and forth across the LAN.
What is probably being sent is the clock updates to the QA.
Rick Sawtell
MCT, MCSD, MCDBA
|||"Rick Sawtell" <quickening@.msn.com> wrote in news:OYnpflb#EHA.3368
@.TK2MSFTNGP15.phx.gbl:

> The data should not be zooming back and forth across the LAN.
> What is probably being sent is the clock updates to the QA.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OK, thanks. That's what I hoped. The "light" being on solid is strange
for clock updates to the QA, but ... thanks.
David Walker

Client-server simple question

In SQL 2000, if I'm running Query Analyzer on a client machine, and do
something like
Select * Into NewTable from OldTable
the data records don't all come from the server to my client machine and go
back to the server, do they? Doesn't all the data movement actually take
place ON the server?
The only reason I ask is that during this operation, the LAN icon "light"
in the system tray is solidly lit up, while it's not usually that way (it
usually blinks on and off). Maybe that's just status communication to QA,
but the icon is lit completely solid during this operation.
Thanks.
David WalkerThe data should not be zooming back and forth across the LAN.
What is probably being sent is the clock updates to the QA.
Rick Sawtell
MCT, MCSD, MCDBA|||"Rick Sawtell" <quickening@.msn.com> wrote in news:OYnpflb#EHA.3368
@.TK2MSFTNGP15.phx.gbl:
> The data should not be zooming back and forth across the LAN.
> What is probably being sent is the clock updates to the QA.
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
OK, thanks. That's what I hoped. The "light" being on solid is strange
for clock updates to the QA, but ... thanks.
David Walker

Clients not installing

Getting this error...
SMS Client Configuration Manager cannot connect to the machine
"ComputerName". The operating system reported error 1314: A required
privilege is not held by the client.
Possible cause: The client is not accessible.
Solution: Verify that the client is connected to the network and that the
SMS Service account or (if specified) the SMS Client Remote Installation
account have the required privileges, as specified in the SMS documentation.
Does the account I specified in Connection Accounts need to have local admin
perms? How can I double check?
Jason
Crap wrong group...sorry.
"JasonMeyer" <jason.meyer@.nospam.isd623.org> wrote in message
news:euwoiFFPFHA.3072@.TK2MSFTNGP09.phx.gbl...
> Getting this error...
> SMS Client Configuration Manager cannot connect to the machine
> "ComputerName". The operating system reported error 1314: A required
> privilege is not held by the client.
> Possible cause: The client is not accessible.
> Solution: Verify that the client is connected to the network and that the
> SMS Service account or (if specified) the SMS Client Remote Installation
> account have the required privileges, as specified in the SMS
> documentation.
> Does the account I specified in Connection Accounts need to have local
> admin perms? How can I double check?
> Jason
>

client/server processing

I'm going through a set of MS e-learning classes and am confused about where the processing occurs. In general, I thought that all the processing occurred on the Server once the client made a request. This e-learning confuses me as it says that the processing is spread out between the client and the server. What is the correct answer?

thx,

Kat

I'll try to answer your question with some examples. If there still seems to be a conflict with the e-learning, you might have to give some context.

If you think about a SQL query, your statement would be the most correct. The client sends the query to the server. The server interprets the query and returns the results to the client. Turning the statement into a result set could be considered the "processing" and that was done on the server. In practice, something more must be done with the result set for it to be useful. This could be as simple as formatting the result set into a grid or text representation. All that work is done on the client.

Another example could be a web page. The browser makes a request to the Web server, which might in turn make a request to a database server. The query would be handled as above with the Web server playing the role of the database server's client. The Web server formats the results into HTML which is returned to the browser. The browser is still responsible for interpreting the HTML and displaying it properly.

To sum up, in a client/server architecture the processing is spread between the client and server with each piece doing the part that it is most suited for.

Hope that helps.

|||

Thank you, it is making more sense. I am speaking specifically about SQL Server procressing. How do I know what processing is done by the SQL Server itself and the workstation which runs an sql query, starts off a stored procedure, runs a batch statement, does transaction processing, or runs OLAP as examples?

thx,

Kat

|||

In terms of Sql Server, the processing is all done on the server. The client only has to format results.

Consider Query Analyzer. You enter a T-Sql query and request that it be executed. Query Analyzer sends the text you typed in to the Server. So, checking for proper syntax, parsing, optimization, data retrieval, sorting all is done on the server. Query Analyzer gets results back, much as a .Net application would.

A stored procedure is exactly the same. The code to define the stored procedure is sent to the server. It is parsed and pre-compiled and stored. When a request is made to execute the stored procedure, that text is sent to the server. It is checked for proper syntax, etc. and the stored procedure executes completely on the server. Any results are sent back.

The only time that processing is done on the client is when DataSets are used. But, the data must first be retrieved from the Server. It is fairly clear when the data has been put into the DataSet. Once there, actions such as making relations between datatables and defining computed columns is on the client.

The DataAdapter might be a little confusing, but all it does is use the queries assigned to it to make repeated database requests.

Another area that can cause confusion is optimistic concurrency. In this case the client and the server work together. Optimistic Concurrency works by including old values in the query that does updates or deletions. The database server does not know what is going on. It just knows that there was a query that effected no rows. The client uses that information to infer that the record was changed behind the scenes.

As far as I know, OLAP uses standard SQL queries so it is done on the server.

One way to get a feel for these things is to look at the low-level API.

client/server performance problems

We have 1000 users on a client/server CRM application that we've written in
house. Recently we started experiencing performance problems at the top of
each hour, it lasts for about 30 seconds. I have run several traces using
these events:
lock: acquired,
lock: deadlock,
rpc: completed,
sql: stmtcompleted
Each trace runs from 10 till the hour until 10 after the hour. I've dumped
them out to tables so I could query them for the top 200 records by cpu,
duration, reads and writes. I then query them by each minute of starttime to
find the worst queries. I have fixed a lot of bad queries over the past
couple of weeks but still users are complaining. We are runnings Sql Server
2000 sp3a on a clustered Win2k SP4. I dont know the hardware config for the
server but our I'm told it has a lot of cpu and at I think 8GB of memory. I
am not a dba, I am a developer but I cant understand why I'm not solving the
problem. The queries that I've fixed are running much faster, but still the
problem persists.
Am I not using the right events in SQL Profiler? Is it possible that we're
really having some sort of network issue at that time? I would use Perfmon
but that doesnt tell me much.
Any help is appreciated,
Doug
My guess is you have a scheduled job that runs on the hour each hour. It
could also be related to checkpoints but they rarely follow such an exact
cycle. You can see these with the SQL counter CHeckpoin Pages per second.
You should monitor for CPU, Disks etc as well. See if these help:
http://www.microsoft.com/sql/techinf...perftuning.asp
Performance WP's
http://www.swynk.com/friends/vandenberg/perfmonitor.asp Perfmon counters
http://www.sql-server-performance.co...ance_audit.asp
Hardware Performance CheckList
http://www.sql-server-performance.co...mance_tips.asp
SQL 2000 Performance tuning tips
http://www.support.microsoft.com/?id=q224587 Troubleshooting App
Performance
http://msdn.microsoft.com/library/de...rfmon_24u1.asp
Disk Monitoring
Andrew J. Kelly SQL MVP
"Doug Stiers" <doug@.nospam.com> wrote in message
news:%23t7lrXYCFHA.3120@.TK2MSFTNGP12.phx.gbl...
> We have 1000 users on a client/server CRM application that we've written
> in
> house. Recently we started experiencing performance problems at the top of
> each hour, it lasts for about 30 seconds. I have run several traces using
> these events:
> lock: acquired,
> lock: deadlock,
> rpc: completed,
> sql: stmtcompleted
> Each trace runs from 10 till the hour until 10 after the hour. I've dumped
> them out to tables so I could query them for the top 200 records by cpu,
> duration, reads and writes. I then query them by each minute of starttime
> to
> find the worst queries. I have fixed a lot of bad queries over the past
> couple of weeks but still users are complaining. We are runnings Sql
> Server
> 2000 sp3a on a clustered Win2k SP4. I dont know the hardware config for
> the
> server but our I'm told it has a lot of cpu and at I think 8GB of memory.
> I
> am not a dba, I am a developer but I cant understand why I'm not solving
> the
> problem. The queries that I've fixed are running much faster, but still
> the
> problem persists.
> Am I not using the right events in SQL Profiler? Is it possible that we're
> really having some sort of network issue at that time? I would use Perfmon
> but that doesnt tell me much.
> Any help is appreciated,
> Doug
>

client/server performance problems

We have 1000 users on a client/server CRM application that we've written in
house. Recently we started experiencing performance problems at the top of
each hour, it lasts for about 30 seconds. I have run several traces using
these events:
lock: acquired,
lock: deadlock,
rpc: completed,
sql: stmtcompleted
Each trace runs from 10 till the hour until 10 after the hour. I've dumped
them out to tables so I could query them for the top 200 records by cpu,
duration, reads and writes. I then query them by each minute of starttime to
find the worst queries. I have fixed a lot of bad queries over the past
couple of weeks but still users are complaining. We are runnings Sql Server
2000 sp3a on a clustered Win2k SP4. I dont know the hardware config for the
server but our I'm told it has a lot of cpu and at I think 8GB of memory. I
am not a dba, I am a developer but I cant understand why I'm not solving the
problem. The queries that I've fixed are running much faster, but still the
problem persists.
Am I not using the right events in SQL Profiler? Is it possible that we're
really having some sort of network issue at that time? I would use Perfmon
but that doesnt tell me much.
Any help is appreciated,
DougMy guess is you have a scheduled job that runs on the hour each hour. It
could also be related to checkpoints but they rarely follow such an exact
cycle. You can see these with the SQL counter CHeckpoin Pages per second.
You should monitor for CPU, Disks etc as well. See if these help:
http://www.microsoft.com/sql/techinfo/administration/2000/perftuning.asp
Performance WP's
http://www.swynk.com/friends/vandenberg/perfmonitor.asp Perfmon counters
http://www.sql-server-performance.com/sql_server_performance_audit.asp
Hardware Performance CheckList
http://www.sql-server-performance.com/best_sql_server_performance_tips.asp
SQL 2000 Performance tuning tips
http://www.support.microsoft.com/?id=q224587 Troubleshooting App
Performance
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_perfmon_24u1.asp
Disk Monitoring
Andrew J. Kelly SQL MVP
"Doug Stiers" <doug@.nospam.com> wrote in message
news:%23t7lrXYCFHA.3120@.TK2MSFTNGP12.phx.gbl...
> We have 1000 users on a client/server CRM application that we've written
> in
> house. Recently we started experiencing performance problems at the top of
> each hour, it lasts for about 30 seconds. I have run several traces using
> these events:
> lock: acquired,
> lock: deadlock,
> rpc: completed,
> sql: stmtcompleted
> Each trace runs from 10 till the hour until 10 after the hour. I've dumped
> them out to tables so I could query them for the top 200 records by cpu,
> duration, reads and writes. I then query them by each minute of starttime
> to
> find the worst queries. I have fixed a lot of bad queries over the past
> couple of weeks but still users are complaining. We are runnings Sql
> Server
> 2000 sp3a on a clustered Win2k SP4. I dont know the hardware config for
> the
> server but our I'm told it has a lot of cpu and at I think 8GB of memory.
> I
> am not a dba, I am a developer but I cant understand why I'm not solving
> the
> problem. The queries that I've fixed are running much faster, but still
> the
> problem persists.
> Am I not using the right events in SQL Profiler? Is it possible that we're
> really having some sort of network issue at that time? I would use Perfmon
> but that doesnt tell me much.
> Any help is appreciated,
> Doug
>

client/server performance problems

We have 1000 users on a client/server CRM application that we've written in
house. Recently we started experiencing performance problems at the top of
each hour, it lasts for about 30 seconds. I have run several traces using
these events:
lock: acquired,
lock: deadlock,
rpc: completed,
sql: stmtcompleted
Each trace runs from 10 till the hour until 10 after the hour. I've dumped
them out to tables so I could query them for the top 200 records by cpu,
duration, reads and writes. I then query them by each minute of starttime to
find the worst queries. I have fixed a lot of bad queries over the past
couple of weeks but still users are complaining. We are runnings Sql Server
2000 sp3a on a clustered Win2k SP4. I dont know the hardware config for the
server but our I'm told it has a lot of cpu and at I think 8GB of memory. I
am not a dba, I am a developer but I cant understand why I'm not solving the
problem. The queries that I've fixed are running much faster, but still the
problem persists.
Am I not using the right events in SQL Profiler? Is it possible that we're
really having some sort of network issue at that time? I would use Perfmon
but that doesnt tell me much.
Any help is appreciated,
DougMy guess is you have a scheduled job that runs on the hour each hour. It
could also be related to checkpoints but they rarely follow such an exact
cycle. You can see these with the SQL counter CHeckpoin Pages per second.
You should monitor for CPU, Disks etc as well. See if these help:
http://www.microsoft.com/sql/techin.../perftuning.asp
Performance WP's
http://www.swynk.com/friends/vandenberg/perfmonitor.asp Perfmon counters
http://www.sql-server-performance.c...mance_audit.asp
Hardware Performance CheckList
http://www.sql-server-performance.c...rmance_tips.asp
SQL 2000 Performance tuning tips
http://www.support.microsoft.com/?id=q224587 Troubleshooting App
Performance
http://msdn.microsoft.com/library/d.../>
on_24u1.asp
Disk Monitoring
Andrew J. Kelly SQL MVP
"Doug Stiers" <doug@.nospam.com> wrote in message
news:%23t7lrXYCFHA.3120@.TK2MSFTNGP12.phx.gbl...
> We have 1000 users on a client/server CRM application that we've written
> in
> house. Recently we started experiencing performance problems at the top of
> each hour, it lasts for about 30 seconds. I have run several traces using
> these events:
> lock: acquired,
> lock: deadlock,
> rpc: completed,
> sql: stmtcompleted
> Each trace runs from 10 till the hour until 10 after the hour. I've dumped
> them out to tables so I could query them for the top 200 records by cpu,
> duration, reads and writes. I then query them by each minute of starttime
> to
> find the worst queries. I have fixed a lot of bad queries over the past
> couple of weeks but still users are complaining. We are runnings Sql
> Server
> 2000 sp3a on a clustered Win2k SP4. I dont know the hardware config for
> the
> server but our I'm told it has a lot of cpu and at I think 8GB of memory.
> I
> am not a dba, I am a developer but I cant understand why I'm not solving
> the
> problem. The queries that I've fixed are running much faster, but still
> the
> problem persists.
> Am I not using the right events in SQL Profiler? Is it possible that we're
> really having some sort of network issue at that time? I would use Perfmon
> but that doesnt tell me much.
> Any help is appreciated,
> Doug
>

client/server ODBC problem

I have an application on:

W2K client
Sql 2000 + No SP
MS ODBC V3.8
C++

The application, running on the client, connects to SQL server for many simultaneous queries involving select, insert and update. Application creats a thread for each query. Each thread connects to the sql server via ODBC using sqlconnect.

However I find that the individual thread do not close properly and stay open even after sqldisconnect has been issued on the client. At one point I have over 1200 threads on client application trying simultaneously to connect to the server and the sqlserver is holding with 276 threads open.

I do not understand why the ODBC connection stays open even after sqldisconnect is issued. I have even tried disabling connection pooling, to no effect. The performance is very poor.

How can I issue a large number of queries to same sql server via ODBC while guaranteeing performance?Enable connection pooling... What you are fighting (the pooling) is almost certainly exactly what you need. It will drastically reduce the number of connections (spids) used by your application, as well as reducing the latency and memory usage of your client application.

-PatP|||Enable connection pooling... What you are fighting (the pooling) is almost certainly exactly what you need. It will drastically reduce the number of connections (spids) used by your application, as well as reducing the latency and memory usage of your client application.

-PatP
Hi Pat,
Have you come across this problem before ?
Are you aware of a solution that I can implement to get round this problem?
I would greatly appreciate your input.
Best Regards,

Frank.

Client/Server Connection

Hi ;

I m trying to create Merge Replication. I was able to create the
replication on the same machine, however my aim is to use client
machine and do all the neessary work on the client machine and then
synchronize to the server. Thus, I have installed client version of SQL
2000, I connected to the database server, the thing is when I go off
line I lose connection. Is there any way to create the subscription in
to the client machine as an off line user then synchronize it ?Or DO I
have create my shopshot on the client machine?
If someone can help me I would really appreciate

Regards
AsI think the problem is with how you are connecting to the server.
Instead of using the network name when you register the server, use
<local> or '.' Your subscription must be created on the server.

client/server application using Access as front end

Hi, i have this Access database with data entry forms. Now
i want to move the data to SQL server and keep the entry
system in Access. I tried to create a Access project which
is linked with SQL server. the access project is just like
a local application, i could make any changes on data and
even the design of the database, which is not i have in
mind. I could set up the startup form but it's really easy
to bypass it. What should i do, Access project or ADO
programming? please help!
"ming" <anonymous@.discussions.microsoft.com> wrote in message
news:2056f01c45955$9629f1c0$a301280a@.phx.gbl...
> Hi, i have this Access database with data entry forms. Now
> i want to move the data to SQL server and keep the entry
> system in Access. I tried to create a Access project which
> is linked with SQL server. the access project is just like
> a local application, i could make any changes on data and
> even the design of the database, which is not i have in
> mind. I could set up the startup form but it's really easy
> to bypass it. What should i do, Access project or ADO
> programming? please help!
Go for the programming! It is the only way to scale an Access front end/SQL
Server back end to more than 1 user <g>.
If you are going to dig into this programming, an excellent book on this
subject, loaded with code samples:
Microsoft Access Developer's Guide to SQL Server
by Mary Chipman, Andy Baron
ISBN: 0672319446
Steve
|||Access project is a quick (and easy?) way to create clients.
You can remove the standard Access menus from your your client so that users
cannot easily change your design. Access has about everything when it comes
to security
If you have some experience with access databases you can benefit from this
when you create an access application working with sql server. You can
create your forms by using wizards in access. For more sophisticated
functions you can write ADO calls from Access (in VBA) to SQL Server, for
instance to let the client call stored procedures on the sql server.
Regards
Tore
"ming" <anonymous@.discussions.microsoft.com> wrote in message
news:2056f01c45955$9629f1c0$a301280a@.phx.gbl...
> Hi, i have this Access database with data entry forms. Now
> i want to move the data to SQL server and keep the entry
> system in Access. I tried to create a Access project which
> is linked with SQL server. the access project is just like
> a local application, i could make any changes on data and
> even the design of the database, which is not i have in
> mind. I could set up the startup form but it's really easy
> to bypass it. What should i do, Access project or ADO
> programming? please help!

client.exe

Hi
I'd like to find client.exe tool to simulate SQL load.
I have technet & MSDN subscription but can't find it. Where can I download
it ?
Also what tools can I use for SQL load simulation instead client.exe ?
I am not sure what client.exe is, but I have a list of load testing tools
at: http://vyaskn.tripod.com/analyzing_profiler_output.htm
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Jan" <jedec@.email.si> wrote in message
news:e54YW$9TFHA.3280@.TK2MSFTNGP09.phx.gbl...
Hi
I'd like to find client.exe tool to simulate SQL load.
I have technet & MSDN subscription but can't find it. Where can I download
it ?
Also what tools can I use for SQL load simulation instead client.exe ?

Client Web Browser & Remote SQL Script Error?

Hello all,

I know that this is a long shot, but I have a problem which someone
reading this group *may* just be able to shed some light on.

We have a new internal personnel planner/attendance system in place. It
uses a web interface to allow members of staff to select their site
location for any week, request leave and record absences.

The server-side scripting is composed of VB/ASP and Javascript which
ultimately queries & writes to an MS SQL Server 2000 database via an
ODBC connection between webserver (IIS6.0).

Here is the problem and I *know* that it sounds unlikely/impossible but
we carried out exhaustive tests.

-> I open a web browser on my local PC (XP Pro SP2)
-> Login to the web-based planning system
-> Update information
-> Submit Changes

At this point I get a script error:

--error message--

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
near ')'.

/staff/wfp/Whereabouts/writeAbsence_v2_5.asp, line 108

------

Which is fair enough as it probably points to a problem with the SQL
statement being passed by the .asp page.

***BUT*** I _only_ get this message when I access the page via a browser
from certain PCs!

I have tried 3 browsers: MSIE6, Firefox1.5, Opera8.5.

I have obviously ensured that it isn't any kind of browser caching issue.

I have no issues using scripted-based web pages in general from the PC
in question.

I have checked the regional settings to ensure that I am using a
standard character set.

I *can* submit database changes via web browsers from most other PCs on
our network, without incurring the error message.

Even when I get the error message, the values are written to the db and
the information is updated.

The other PCs from which I am experiencing the same difficulty are
servers running Win2000 & Win2003 respectively.

Is there any kind of OS/User Profile setting which would mean that
scripts running on a remote webserver would fall over when trying to
perform an SQL write?

Could it be some kind of character encoding issue, which means that the
parameters that are received by the .asp script and then written via the
SQL statement are mangled in any way?

I can't see that there is any kind of local setting that would influence
whether remote scripts would or would not cause an error such as this.

If anyone has any ideas, has encountered anything similar or can shed
light on a system-specific setting or feature that may cause this,
please post your thoughts.

Yours Gratefully

GuyIf the server-side code path is identical, I suggest you focus on the client
browser settings. My guess is that you have client-side script that doesn't
execute under certain configurations so data isn't posted back as expected.
This causes your server-side script to generate an invalid SQL statement
like 'INSERT INTO MyTable VALUES()' and results in the error you describe.

There are other clues in your post that you aren't following Best Practices
so you might want to revisit the items below.

Rather than ODBC, consider using the OLE DB provider directly. For Windows
Authentication:

Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;Integrated
Security=SSPI"

For SQL Authentication:

Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;User
Id=MyLogin;Password=myPassword1"

Consider using parameterized SQL Statements rather than build SQL statement
strings. This is more secure, provides better performance and eliminates
the need to double-up embedded quotes and format dates. For example:

myCommand.CommandText = "INSERT INTO MyTable VALUES(?)"
Set myIntegerParameter = myCommand.CreateParameter( _
"@.MyIntegerParameter", 3, 1)
myCommand.Parameters.Append myIntegerParameter
myIntegerParameter.Value = Request("UserValue")

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Guy Debord" <laugh@.life.org> wrote in message
news:tyDIf.45673$Rw6.23215@.newsfe7-gui.ntli.net...
> Hello all,
> I know that this is a long shot, but I have a problem which someone
> reading this group *may* just be able to shed some light on.
> We have a new internal personnel planner/attendance system in place. It
> uses a web interface to allow members of staff to select their site
> location for any week, request leave and record absences.
> The server-side scripting is composed of VB/ASP and Javascript which
> ultimately queries & writes to an MS SQL Server 2000 database via an
> ODBC connection between webserver (IIS6.0).
> Here is the problem and I *know* that it sounds unlikely/impossible but
> we carried out exhaustive tests.
> -> I open a web browser on my local PC (XP Pro SP2)
> -> Login to the web-based planning system
> -> Update information
> -> Submit Changes
> At this point I get a script error:
> --error message--
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
> near ')'.
> /staff/wfp/Whereabouts/writeAbsence_v2_5.asp, line 108
> ------
> Which is fair enough as it probably points to a problem with the SQL
> statement being passed by the .asp page.
> ***BUT*** I _only_ get this message when I access the page via a browser
> from certain PCs!
> I have tried 3 browsers: MSIE6, Firefox1.5, Opera8.5.
> I have obviously ensured that it isn't any kind of browser caching issue.
> I have no issues using scripted-based web pages in general from the PC
> in question.
> I have checked the regional settings to ensure that I am using a
> standard character set.
> I *can* submit database changes via web browsers from most other PCs on
> our network, without incurring the error message.
> Even when I get the error message, the values are written to the db and
> the information is updated.
> The other PCs from which I am experiencing the same difficulty are
> servers running Win2000 & Win2003 respectively.
> Is there any kind of OS/User Profile setting which would mean that
> scripts running on a remote webserver would fall over when trying to
> perform an SQL write?
> Could it be some kind of character encoding issue, which means that the
> parameters that are received by the .asp script and then written via the
> SQL statement are mangled in any way?
> I can't see that there is any kind of local setting that would influence
> whether remote scripts would or would not cause an error such as this.
> If anyone has any ideas, has encountered anything similar or can shed
> light on a system-specific setting or feature that may cause this,
> please post your thoughts.
> Yours Gratefully
> Guy|||Dan,

Thanks for taking the time to offer up your suggestions.

Using parameterized SQL statements looks like it may well help to
eliminate some of the errors which are easy to make using lengthy
statement strings.

Thanks for the tip.

The OLE DB versus ODBC issue is one that I have one that I will address.

As for the the client-side script suggestion, I'll dig deep and let you
know if I can find any likely suspects.

Thanks again,

Guy|||Guy Debord (laugh@.life.org) writes:
> At this point I get a script error:
> --error message--
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
> near ')'.
> /staff/wfp/Whereabouts/writeAbsence_v2_5.asp, line 108

I've seen plenty of those pages on the web!

> ***BUT*** I _only_ get this message when I access the page via a browser
> from certain PCs!

Well, rather than looking at the PCs, look at the SQL instead. Set up a
trace with Profiler, and see what is being sent to SQL Server. Include
the error events and StmtStarting.

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

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Client viewing KPI Browser and cube browser

Hi guys

I am just wondering, i know that within VS the developer has access to the KPI Browser and cube browser. How do i give access to the KPI Browser to a business user and allow them to play with the cube browser (without giving them VS Smile ). I know that Reporting services can hook onto the cubes and create reports from that but that’s not quite the same, as I would have to create a report that looks like one that is already available in VS.

I read a little bit here http://office.microsoft.com/en-us/sharepointserver/HA101742051033.aspx which says that sharepoint might be able to access the KPI data and display it but if this is the case does it look the same as it does in VS? Also if i don’t have sharepoint this doesn't help me all that much.

Also i know that a business user has access to the report builder but i have not seen anything in it yet that looks like the cube browser. The closest it comes is the matrix view, which i wouldn't have thought was exactly the same.

Thanks for the help

Anthony

Have you considered end-user tools like Excel 2007 and Proclarity - these can connect to cube KPI's, and are better suited to business users? The latest versions of some other AS 2005 client tools also support KPI's.

Client Utility syntax

Client utility asks for the Server Alias name, and the server name.
If the computer-name is Location1, and the SQL-Server instance
name = BOB, and say the ip-adress is 1.2.3.4
Then,
Server Alias Name would = Location1\BOB
Server Name would = 1.2.3.4\BOB
Is this correct?
Yes!
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Robert A. DiFrancesco" wrote:

> Client utility asks for the Server Alias name, and the server name.
> If the computer-name is Location1, and the SQL-Server instance
> name = BOB, and say the ip-adress is 1.2.3.4
> Then,
> Server Alias Name would = Location1\BOB
> Server Name would = 1.2.3.4\BOB
> Is this correct?
>
>
|||I am having trouble connecting:
server doesn't exist or access denied
ConnectionOpen (connect() )
I can connect via XP remote desktop to the public ip 207.x.x.x .
In doing so and checking tcp/ip properties, I see that the setting is NOT to
obtain an IP automatically, rather it is "use this ip address". And the
local address is 192.x.x.x
How does this effect my connection setup?
thank you,
bob
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:9F58DE4A-569D-4561-8252-DABFDE6AFC99@.microsoft.com...[vbcol=seagreen]
> Yes!
> --
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
>
> "Robert A. DiFrancesco" wrote:
instance[vbcol=seagreen]
Location1\BOB[vbcol=seagreen]

Client utilities for MSDE

Hi,

I heard from a guy that the client utilities (Enterprice Manager and Query Analyser) that are on the Sql Server 2000 CD can be fetched separatly from Microsoft and that they can be deployed with MSDE to a potential customer.

Is that correct?

And if it is, where can I obtain those client apps?

TIA

OhlywohlyNope. You can't get the client utilities for free (legally), and deploy it to a customer.

http://msdn.microsoft.com/sql/downloads/tools/default.aspx

That's what you're limited to.|||You absolutely cannot deploy the Client Tools with MSDE to a customer! The whole point of MSDE is that it's an engine and your application should supply the means necessary to manage it.

If the client already owns a version of SQL Server then they may legally use the Client Tools to manage MSDE.

Unfortunately the Client Tools are not available for purchase separately. You might consider a set of 3rd party tools.

Terri
Disclaimer: I am not a lawyer nor a licensing expert