Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Friday, March 23, 2012

Performance problems when using multiple SqlConnection objects?

Hello,

I am planning to use three databases on the local SQL Server. DB1 will be for App1, DB2 for App2, and DB3 will hold tables, that both, App1 and App2 need to access.

Obviously, I need in App1 and App2 at least two SqlConnection and SqlCommand objects, one that access their respective databases, and one that will access DB3.

Will this result in a worse performance? (The using of two SqlConnection objects in one aspx page as example, and switching them)

Should I for better performance get rid of DB3 and add the tables there to DB1 and DB2 ? (Thus multiplying data, but, if the performance will be much better, it will be fine with me)

I would be thankful for any advices.

Hello my friend,

Try and use the same database where possible. By using the same database, and therefore the same connection string, the built-in connection pooling will work and therefore conserve resources for you.

Kind regards

Scotty

|||Thanks|||

ask_Scotty:

Hello my friend,

Try and use the same database where possible. By using the same database, and therefore the same connection string, the built-in connection pooling will work and therefore conserve resources for you.

Kind regards

Scotty

Thanks again, but, the more I am thinking about this and your advice, the more confused I am.

The Databases are all on the same machine and on the same instance. Will pooling stop working, or be inefficent, if I use a second SqlConnection object with anohter connection string in a aspx page? In the source code, I usualy close connections immediately, the two will not be open at the same time.

I am still somewhat unsure what to do.

|||

Hello again my friend,

Connecting to different databases, if necessary, from your web pages should be fine. If you can restrict the number of times you need to connect, this would be better. To understand what I mean, read up on page caching and especially data caching in ASP.NET applications. Basically, data caching involves connecting to the database on the first request for the data and then caching it to service subsequent requests as opposed to connecting to the database each time. Caching methods and strategies form a huge subject but one worth getting into.

Kind regards

Scotty

Tuesday, March 20, 2012

Performance Problem

I was getting the performance monitor objects for SQL server for my producti
on server and I was monitoring them perfectly. But after I've restarted my S
QL Server Service I don't know I'm not getting performance monitor objects f
or SQL server in my perform
ance monitor.
I need to monitor again. Can someone help me in this regard
Regards,
SunilHi,
Verify that MSSQL Server service is started. If it is not started then start
the service and wait for a 10 minutes and then try opening the performance
monitor counters.
Note:
I just tried before doing this post.
Thanks
Hari
MCDBA
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:062BFE35-989F-49CD-9BC3-4FBE9F36A9FC@.microsoft.com...
> I was getting the performance monitor objects for SQL server for my
production server and I was monitoring them perfectly. But after I've
restarted my SQL Server Service I don't know I'm not getting performance
monitor objects for SQL server in my performance monitor.
>
> I need to monitor again. Can someone help me in this regard
>
> Regards,
> Sunil

Monday, March 12, 2012

Performance Problem

I was getting the performance monitor objects for SQL server for my production server and I was monitoring them perfectly. But after I've restarted my SQL Server Service I don't know I'm not getting performance monitor objects for SQL server in my perform
ance monitor.
I need to monitor again. Can someone help me in this regard
Regards,
Sunil
Hi,
Verify that MSSQL Server service is started. If it is not started then start
the service and wait for a 10 minutes and then try opening the performance
monitor counters.
Note:
I just tried before doing this post.
Thanks
Hari
MCDBA
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:062BFE35-989F-49CD-9BC3-4FBE9F36A9FC@.microsoft.com...
> I was getting the performance monitor objects for SQL server for my
production server and I was monitoring them perfectly. But after I've
restarted my SQL Server Service I don't know I'm not getting performance
monitor objects for SQL server in my performance monitor.
>
> I need to monitor again. Can someone help me in this regard
>
> Regards,
> Sunil

Performance Problem

I was getting the performance monitor objects for SQL server for my production server and I was monitoring them perfectly. But after I've restarted my SQL Server Service I don't know I'm not getting performance monitor objects for SQL server in my performance monitor
I need to monitor again. Can someone help me in this regar
Regards
SunilHi,
Verify that MSSQL Server service is started. If it is not started then start
the service and wait for a 10 minutes and then try opening the performance
monitor counters.
Note:
I just tried before doing this post.
Thanks
Hari
MCDBA
"Sunil" <anonymous@.discussions.microsoft.com> wrote in message
news:062BFE35-989F-49CD-9BC3-4FBE9F36A9FC@.microsoft.com...
> I was getting the performance monitor objects for SQL server for my
production server and I was monitoring them perfectly. But after I've
restarted my SQL Server Service I don't know I'm not getting performance
monitor objects for SQL server in my performance monitor.
>
> I need to monitor again. Can someone help me in this regard
>
> Regards,
> Sunil

Saturday, February 25, 2012

performance objects for SQLServer disappeared

Using SS2000. I have been several performance monitor counters for SQLServer.
When I tried to start the counters this morning, I received this error:
The database_size log or alert has not started.
When I tried to look at the counter, under performance object there are no
objects for SQLServer.
Does anyone know why or how these could disappear? SQL Server is still
running on the box.
Thanks,
Dan D.
Have a look at this:
http://support.microsoft.com/default...&Product=sql2k
Andrew J. Kelly SQL MVP
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:68581C5F-771A-47D6-8B75-180D4B23D5AF@.microsoft.com...
> Using SS2000. I have been several performance monitor counters for
SQLServer.
> When I tried to start the counters this morning, I received this error:
> The database_size log or alert has not started.
> When I tried to look at the counter, under performance object there are no
> objects for SQLServer.
> Does anyone know why or how these could disappear? SQL Server is still
> running on the box.
> Thanks,
> --
> Dan D.
|||Thanks Andrew. That looks like it may be it.
"Andrew J. Kelly" wrote:

> Have a look at this:
> http://support.microsoft.com/default...&Product=sql2k
> --
> Andrew J. Kelly SQL MVP
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:68581C5F-771A-47D6-8B75-180D4B23D5AF@.microsoft.com...
> SQLServer.
>
>

performance objects for SQLServer disappeared

Using SS2000. I have been several performance monitor counters for SQLServer.
When I tried to start the counters this morning, I received this error:
The database_size log or alert has not started.
When I tried to look at the counter, under performance object there are no
objects for SQLServer.
Does anyone know why or how these could disappear? SQL Server is still
running on the box.
Thanks,
--
Dan D.Have a look at this:
http://support.microsoft.com/default.aspx?scid=kb;en-us;812915&Product=sql2k
--
Andrew J. Kelly SQL MVP
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:68581C5F-771A-47D6-8B75-180D4B23D5AF@.microsoft.com...
> Using SS2000. I have been several performance monitor counters for
SQLServer.
> When I tried to start the counters this morning, I received this error:
> The database_size log or alert has not started.
> When I tried to look at the counter, under performance object there are no
> objects for SQLServer.
> Does anyone know why or how these could disappear? SQL Server is still
> running on the box.
> Thanks,
> --
> Dan D.