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

Wednesday, March 28, 2012

How to save performance counters values to SQL Server database tab

I am monitoring sql server and windows performance counters.
My computer has "Microsoft windows XP professional". I am monitoring sql
servers (2000 (sp3 and sp4) and 2005) running on windows NT 4 and 5.2.
For historical analysis I want to store the values of various counters in
sql server database(table). I have created a a DSN for the sql server 2005
installed on my PC for data repository. Still I can save counter values as
report(.tsv) ot web (.html). I want to save the values to SQL server TABLE.
hOW DO i DO THAT'
--
ontario, canadaI am using microsoft management console 2.0 version 5.1.
--
ontario, canada
"db" wrote:
> I am monitoring sql server and windows performance counters.
> My computer has "Microsoft windows XP professional". I am monitoring sql
> servers (2000 (sp3 and sp4) and 2005) running on windows NT 4 and 5.2.
> For historical analysis I want to store the values of various counters in
> sql server database(table). I have created a a DSN for the sql server 2005
> installed on my PC for data repository. Still I can save counter values as
> report(.tsv) ot web (.html). I want to save the values to SQL server TABLE.
> hOW DO i DO THAT'
> --
> ontario, canada|||db
How about?
SELECT * FROM sys.dm_os_performance_counters
WHERE counter_name = 'Total Server Memory (KB)'
OR counter_name = 'Target Server Memory (KB)';
SELECT * FROM sys.dm_os_performance_counters
WHERE counter_name = 'Page life expectancy'
AND object_name = 'SQLServer:Buffer Manager';
"db" <db@.discussions.microsoft.com> wrote in message
news:F027E65B-CADE-41AE-97E2-DD3079D42481@.microsoft.com...
> I am monitoring sql server and windows performance counters.
> My computer has "Microsoft windows XP professional". I am monitoring sql
> servers (2000 (sp3 and sp4) and 2005) running on windows NT 4 and 5.2.
> For historical analysis I want to store the values of various counters in
> sql server database(table). I have created a a DSN for the sql server 2005
> installed on my PC for data repository. Still I can save counter values as
> report(.tsv) ot web (.html). I want to save the values to SQL server
> TABLE.
> hOW DO i DO THAT'
> --
> ontario, canada|||Thanks Uri. Two questions:
1. It works for SQL server 2005 by in sql server 2000 I am getting this
error message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'sys.dm_os_performance_counters'.
2. Parameter like sql Server: Buffer Manager (Buffer cache hit ratio) has a
value 3310 by this select statement. I was expecting something like (99%).
3. Many counters that available through MMC are not present in this table.
Should I be looking at some other tables.
--
ontario, canada
"Uri Dimant" wrote:
> db
> How about?
> SELECT * FROM sys.dm_os_performance_counters
> WHERE counter_name = 'Total Server Memory (KB)'
> OR counter_name = 'Target Server Memory (KB)';
> SELECT * FROM sys.dm_os_performance_counters
> WHERE counter_name = 'Page life expectancy'
> AND object_name = 'SQLServer:Buffer Manager';
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:F027E65B-CADE-41AE-97E2-DD3079D42481@.microsoft.com...
> >
> > I am monitoring sql server and windows performance counters.
> >
> > My computer has "Microsoft windows XP professional". I am monitoring sql
> > servers (2000 (sp3 and sp4) and 2005) running on windows NT 4 and 5.2.
> >
> > For historical analysis I want to store the values of various counters in
> > sql server database(table). I have created a a DSN for the sql server 2005
> > installed on my PC for data repository. Still I can save counter values as
> > report(.tsv) ot web (.html). I want to save the values to SQL server
> > TABLE.
> > hOW DO i DO THAT'
> >
> > --
> > ontario, canada
>
>|||1. Table in sql server 2000 looks like "sysperfinfo".
4. I need to append everyday all the counter values to the table with a
field for datetime at which counter values were captured.
ontario, canada
"db" wrote:
> Thanks Uri. Two questions:
> 1. It works for SQL server 2005 by in sql server 2000 I am getting this
> error message:
> Msg 208, Level 16, State 1, Line 1
> Invalid object name 'sys.dm_os_performance_counters'.
> 2. Parameter like sql Server: Buffer Manager (Buffer cache hit ratio) has a
> value 3310 by this select statement. I was expecting something like (99%).
> 3. Many counters that available through MMC are not present in this table.
> Should I be looking at some other tables.
> --
> ontario, canada
>
> "Uri Dimant" wrote:
> > db
> > How about?
> > SELECT * FROM sys.dm_os_performance_counters
> >
> > WHERE counter_name = 'Total Server Memory (KB)'
> >
> > OR counter_name = 'Target Server Memory (KB)';
> >
> > SELECT * FROM sys.dm_os_performance_counters
> >
> > WHERE counter_name = 'Page life expectancy'
> >
> > AND object_name = 'SQLServer:Buffer Manager';
> >
> >
> > "db" <db@.discussions.microsoft.com> wrote in message
> > news:F027E65B-CADE-41AE-97E2-DD3079D42481@.microsoft.com...
> > >
> > > I am monitoring sql server and windows performance counters.
> > >
> > > My computer has "Microsoft windows XP professional". I am monitoring sql
> > > servers (2000 (sp3 and sp4) and 2005) running on windows NT 4 and 5.2.
> > >
> > > For historical analysis I want to store the values of various counters in
> > > sql server database(table). I have created a a DSN for the sql server 2005
> > > installed on my PC for data repository. Still I can save counter values as
> > > report(.tsv) ot web (.html). I want to save the values to SQL server
> > > TABLE.
> > > hOW DO i DO THAT'
> > >
> > > --
> > > ontario, canada
> >
> >
> >|||I was able to save it in sql server table through MMC perfmon in the way i
want to do it.
--
ontario, canada
"db" wrote:
> 1. Table in sql server 2000 looks like "sysperfinfo".
> 4. I need to append everyday all the counter values to the table with a
> field for datetime at which counter values were captured.
> ontario, canada
>
> "db" wrote:
> > Thanks Uri. Two questions:
> >
> > 1. It works for SQL server 2005 by in sql server 2000 I am getting this
> > error message:
> >
> > Msg 208, Level 16, State 1, Line 1
> > Invalid object name 'sys.dm_os_performance_counters'.
> >
> > 2. Parameter like sql Server: Buffer Manager (Buffer cache hit ratio) has a
> > value 3310 by this select statement. I was expecting something like (99%).
> >
> > 3. Many counters that available through MMC are not present in this table.
> > Should I be looking at some other tables.
> >
> > --
> > ontario, canada
> >
> >
> > "Uri Dimant" wrote:
> >
> > > db
> > > How about?
> > > SELECT * FROM sys.dm_os_performance_counters
> > >
> > > WHERE counter_name = 'Total Server Memory (KB)'
> > >
> > > OR counter_name = 'Target Server Memory (KB)';
> > >
> > > SELECT * FROM sys.dm_os_performance_counters
> > >
> > > WHERE counter_name = 'Page life expectancy'
> > >
> > > AND object_name = 'SQLServer:Buffer Manager';
> > >
> > >
> > > "db" <db@.discussions.microsoft.com> wrote in message
> > > news:F027E65B-CADE-41AE-97E2-DD3079D42481@.microsoft.com...
> > > >
> > > > I am monitoring sql server and windows performance counters.
> > > >
> > > > My computer has "Microsoft windows XP professional". I am monitoring sql
> > > > servers (2000 (sp3 and sp4) and 2005) running on windows NT 4 and 5.2.
> > > >
> > > > For historical analysis I want to store the values of various counters in
> > > > sql server database(table). I have created a a DSN for the sql server 2005
> > > > installed on my PC for data repository. Still I can save counter values as
> > > > report(.tsv) ot web (.html). I want to save the values to SQL server
> > > > TABLE.
> > > > hOW DO i DO THAT'
> > > >
> > > > --
> > > > ontario, canada
> > >
> > >
> > >sql

Friday, March 9, 2012

how to retrive the names of sql servers running in a network through an vb6 application

I want to retrive the names of sql servers running in a network through an vb6 application .

I found a API which list out the SQL server names in the network , but I am able to connect only to the main

SQL server in the network and for other instances it gives error " DBNETLIB] Connection Open () SQL server doesn?ˉt exist or access denied"

Can anyone help me?

Thanks

Goldie

hy dear

i am also woking in scenario, can you plz tell me which API you are using...

|||You can write a WMI script to read the registry. Instance names can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL/InstalledInstances key

Friday, February 24, 2012

how to retreive data depends on another data ...

my application will add and delete and update records in db

my problem is when to update and delete ..

I have two dropdownboxes one to retreive servers and one to retreive dbs in the server ...

SqlDataAdapter daa =

new SqlDataAdapter("SELECT * FROM DB_tbl"+","+"Servers_tbl where Servers_tbl.Server_Name == '"+ DropDownList4.SelectedValue +"' ", sqlConnection1 );

this is the structure of each table >>

servers_tbl : SRV_ID,Server_name

DB_teb : DB_ID,SRV_ID,DB_name

the dropdown box retreive just the names ... so what is the base of where part of the command

hint : the DB_tbl does not have the server name but has the sever id

Hi Adorer,

Based on my understanding, you need to know when to issue a data bind on the dropdownlist which displays db names.

I think you can handle the SelectedIndexChanged event of the Server DropDownList to fill the db names.

You can use 2 SqlDataSources and use a ControlParameter to achieve this. Also, make sure you have set AutoPostback property to true.

HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!