Showing posts with label entries. Show all posts
Showing posts with label entries. Show all posts

Wednesday, March 28, 2012

No entries show up in SQL Server Profiler trace

Hi,
I have inherited a SQL Server 2000 machine with 59 databases on it,
several of which I suspect are no longer used.
I am setting up a SQL Profiler trace to show me which databases are
still being accessed, and by which machine/user.
There are 4 other SQL Servers in use here, too, running SQL Server 6.5,
7, 2000 and 2005.
The problem I'm encountering is this:
I start the Profiler trace on SQL Server machine A
>From my local machine's Query Analyzer, I then query a table in one of
the suspect databases on machine A, via a linked server entry in my
local SQL Server instance
None of this query activity against the database is logged in Profiler
on machine A
What am I missing?
Thanks in advance-
Jason
I figured it out. I am now monitoring the event class "Security
Audit->Audit Object Persmission Event", and bringing back the data
columns ObjectName, LoginName, and Hostname to know what's being looked
at, by whom, and from what machine.
JasonReber@.gmail.com wrote:
> Hi,
> I have inherited a SQL Server 2000 machine with 59 databases on it,
> several of which I suspect are no longer used.
> I am setting up a SQL Profiler trace to show me which databases are
> still being accessed, and by which machine/user.
> There are 4 other SQL Servers in use here, too, running SQL Server 6.5,
> 7, 2000 and 2005.
> The problem I'm encountering is this:
> I start the Profiler trace on SQL Server machine A
> the suspect databases on machine A, via a linked server entry in my
> local SQL Server instance
> None of this query activity against the database is logged in Profiler
> on machine A
> What am I missing?
> Thanks in advance-
> Jason

No entries show up in SQL Server Profiler trace

Hi,
I have inherited a SQL Server 2000 machine with 59 databases on it,
several of which I suspect are no longer used.
I am setting up a SQL Profiler trace to show me which databases are
still being accessed, and by which machine/user.
There are 4 other SQL Servers in use here, too, running SQL Server 6.5,
7, 2000 and 2005.
The problem I'm encountering is this:
I start the Profiler trace on SQL Server machine A
>From my local machine's Query Analyzer, I then query a table in one of
the suspect databases on machine A, via a linked server entry in my
local SQL Server instance
None of this query activity against the database is logged in Profiler
on machine A
What am I missing?
Thanks in advance-
JasonI figured it out. I am now monitoring the event class "Security
Audit->Audit Object Persmission Event", and bringing back the data
columns ObjectName, LoginName, and Hostname to know what's being looked
at, by whom, and from what machine.
JasonReber@.gmail.com wrote:
> Hi,
> I have inherited a SQL Server 2000 machine with 59 databases on it,
> several of which I suspect are no longer used.
> I am setting up a SQL Profiler trace to show me which databases are
> still being accessed, and by which machine/user.
> There are 4 other SQL Servers in use here, too, running SQL Server 6.5,
> 7, 2000 and 2005.
> The problem I'm encountering is this:
> I start the Profiler trace on SQL Server machine A
> the suspect databases on machine A, via a linked server entry in my
> local SQL Server instance
> None of this query activity against the database is logged in Profiler
> on machine A
> What am I missing?
> Thanks in advance-
> Jason

No entries show up in SQL Server Profiler trace

Hi,
I have inherited a SQL Server 2000 machine with 59 databases on it,
several of which I suspect are no longer used.
I am setting up a SQL Profiler trace to show me which databases are
still being accessed, and by which machine/user.
There are 4 other SQL Servers in use here, too, running SQL Server 6.5,
7, 2000 and 2005.
The problem I'm encountering is this:
I start the Profiler trace on SQL Server machine A
>From my local machine's Query Analyzer, I then query a table in one of
the suspect databases on machine A, via a linked server entry in my
local SQL Server instance
None of this query activity against the database is logged in Profiler
on machine A
What am I missing?
Thanks in advance-
JasonI figured it out. I am now monitoring the event class "Security
Audit->Audit Object Persmission Event", and bringing back the data
columns ObjectName, LoginName, and Hostname to know what's being looked
at, by whom, and from what machine.
JasonReber@.gmail.com wrote:
> Hi,
> I have inherited a SQL Server 2000 machine with 59 databases on it,
> several of which I suspect are no longer used.
> I am setting up a SQL Profiler trace to show me which databases are
> still being accessed, and by which machine/user.
> There are 4 other SQL Servers in use here, too, running SQL Server 6.5,
> 7, 2000 and 2005.
> The problem I'm encountering is this:
> I start the Profiler trace on SQL Server machine A
> >From my local machine's Query Analyzer, I then query a table in one of
> the suspect databases on machine A, via a linked server entry in my
> local SQL Server instance
> None of this query activity against the database is logged in Profiler
> on machine A
> What am I missing?
> Thanks in advance-
> Jason

No entries in Database Mail log (sysmail_event_log)

Hi. I've reviewed the following webpage http://msdn2.microsoft.com/en-us/library/ms189959.aspx and didn't get the answer I was looking for. (Service Broker is running in msdb.)

Essentially, Database Mail isn't logging entries. Using the following example script:

EXEC msdb.dbo.sp_send_dbmail
@.recipients=N'someone@.somewhere.com',
@.body='Message Body',
@.subject ='Message Subject'

I get the result "Mail queued," and I confirm I receive the email.

However, there are no records in the following tables:

select * from sysmail_event_log
select * from sysmail_faileditems
select * from sysmail_unsentitems

There are records that the send-off was a success:

select * from sysmail_sentitems

Database Mail's "Logging Level" to normally set to Normal. I've changed to Verbose and see no change.

Anyone see something I'm missing?

There should not be any records in

sysmail_event_log
sysmail_faileditems
sysmail_unsentitems

for a sucessfully sent email.

There should be a record in

sysmail_sentitems

for a sucessfully sent email.

Search Books Online for information on

sysmail_event_log
sysmail_faileditems
sysmail_unsentitems

|||I don't know... the other servers log messages in sysmail_event_log such as "Activation successful," "DatabaseMail process is started," and "Mail successfully sent" .|||

Contains one row for each Windows or SQL Server message returned by the Database Mail system. (Message in this context refers to a message such as an error message, not an e-mail message.) As suggested Use sysmail_sentitems when you want to see which messages were successfully sent.

BOL confirms:

When troubleshooting Database Mail, search the sysmail_event_log view for events related to e-mail failures. Some messages, such as the failure of the Database Mail external program, are not associated with specific e-mails. To search for errors related to specific e-mails, look up the mailitem_id of the failed e-mail in the sysmail_faileditems view and then search the sysmail_event_log for messages related to that mailitem_id. When an error is returned from sp_send_dbmail, the e-mail is not submitted to the Database Mail system and the error is not displayed in this view.

When individual account delivery attempts fail, Database Mail holds the error messages during retry attempts until the mail item delivery either succeeds or fails. In case of ultimate success, all of the accumulated errors get logged as separate warnings including the account_id. This can cause warnings to appear, even though the e-mail was sent. In case of ultimate delivery failure, all previous warnings get logged as one error message without an account_id, since all accounts have failed.

No entries in Database Mail log (sysmail_event_log)

Hi. I've reviewed the following webpage http://msdn2.microsoft.com/en-us/library/ms189959.aspx and didn't get the answer I was looking for. (Service Broker is running in msdb.)

Essentially, Database Mail isn't logging entries. Using the following example script:

EXEC msdb.dbo.sp_send_dbmail
@.recipients=N'someone@.somewhere.com',
@.body='Message Body',
@.subject ='Message Subject'

I get the result "Mail queued," and I confirm I receive the email.

However, there are no records in the following tables:

select * from sysmail_event_log
select * from sysmail_faileditems
select * from sysmail_unsentitems

There are records that the send-off was a success:

select * from sysmail_sentitems

Database Mail's "Logging Level" to normally set to Normal. I've changed to Verbose and see no change.

Anyone see something I'm missing?

There should not be any records in

sysmail_event_log
sysmail_faileditems
sysmail_unsentitems

for a sucessfully sent email.

There should be a record in

sysmail_sentitems

for a sucessfully sent email.

Search Books Online for information on

sysmail_event_log
sysmail_faileditems
sysmail_unsentitems

|||I don't know... the other servers log messages in sysmail_event_log such as "Activation successful," "DatabaseMail process is started," and "Mail successfully sent" .|||

Contains one row for each Windows or SQL Server message returned by the Database Mail system. (Message in this context refers to a message such as an error message, not an e-mail message.) As suggested Use sysmail_sentitems when you want to see which messages were successfully sent.

BOL confirms:

When troubleshooting Database Mail, search the sysmail_event_log view for events related to e-mail failures. Some messages, such as the failure of the Database Mail external program, are not associated with specific e-mails. To search for errors related to specific e-mails, look up the mailitem_id of the failed e-mail in the sysmail_faileditems view and then search the sysmail_event_log for messages related to that mailitem_id. When an error is returned from sp_send_dbmail, the e-mail is not submitted to the Database Mail system and the error is not displayed in this view.

When individual account delivery attempts fail, Database Mail holds the error messages during retry attempts until the mail item delivery either succeeds or fails. In case of ultimate success, all of the accumulated errors get logged as separate warnings including the account_id. This can cause warnings to appear, even though the e-mail was sent. In case of ultimate delivery failure, all previous warnings get logged as one error message without an account_id, since all accounts have failed.

sql

Monday, March 26, 2012

No default entries in SQL Server 2000 Service Manager Options

ver: SQL-DMO Version: 8.00.760

I have the option to automatically start SQL Server on startup, but
when it does start up, the SQL Server Service Manager does not have
the green arrow indicating that it is active. When I double-click it
to display the SQL Server Service Manager, it shows the name of the
server, but no services in the drop-down box.

When I start Enterprise Manager I see an instance of MSDE where
someone installed an MSDE application. That is active. But I have to
"connect" to the localhost. The instance name is the name of the MSDE
application. I would like it to connect to the localhost on startup.

Any ideas on how to correct this problem?

Thanks,

RBollinger"R Bolling" <robboll@.hotmail.com> wrote in message
news:6e776aa9.0406192206.1722bcb8@.posting.google.c om...
> ver: SQL-DMO Version: 8.00.760
> I have the option to automatically start SQL Server on startup, but
> when it does start up, the SQL Server Service Manager does not have
> the green arrow indicating that it is active. When I double-click it
> to display the SQL Server Service Manager, it shows the name of the
> server, but no services in the drop-down box.
> When I start Enterprise Manager I see an instance of MSDE where
> someone installed an MSDE application. That is active. But I have to
> "connect" to the localhost. The instance name is the name of the MSDE
> application. I would like it to connect to the localhost on startup.
> Any ideas on how to correct this problem?
> Thanks,
> RBollinger

Check this article:

http://support.microsoft.com/defaul...132&Product=sql

By default, MSDE 2000 SP3a does not allow network connections - check the
installation guide for the DISABLENETWORKPROTOCOLS parameter.

Simon|||Simon, Rob,

I am having the same problem with MSDE2000A (See MSDE 2000 Rel A
doesn't talk) - that includes MSDE 2000 SP3.

The articel that Rob mentioned states that the lack of recognition by
the Service Manager occurs only if network protocol is disabled.
However, I installed the MSDE2000A:
--once with DISABLENETWORKPROTOCOLS =0 (should permit network access)
--and once with this parameter removed which shoudl cause it to
default to disable network protocols. In both cases, the sqlserver
seemed to use TCP/IP. Yet the Service Manager still did not show the
instance.

I'm stumped. I earlier installed a unnamed instance of MSDE 2000 from
an MS Office 2000 CD, The SQL Service Manager worked fine in that
installation. I can't understand why the MSDE 2000A doesn't.

On Sun, 20 Jun 2004 17:06:07 +0200, "Simon Hayes" <sql@.hayes.ch>
wrote:

>Check this article:
>http://support.microsoft.com/defaul...132&Product=sql
>By default, MSDE 2000 SP3a does not allow network connections - check the
>installation guide for the DISABLENETWORKPROTOCOLS parameter.
>Simon

Monday, March 19, 2012

Nice problem: How to combine different columns into a table

It's rather easy to combine resultset from the same table structure...we can either insert the entries or union the results.

But let's say you select different columns from different tables and want to combine them to form a new table, how would you do it (assuming you can't join those tables since they are not related), assuming they all return the same number of rows.

select col1 from table1
go
select col2 from table2
go

Now I want to combine them so table3 is made of col1 and col2.Go into more detail as to what you are trying to do - if I understand what you are attempting to do, how do you guarantee the relationship between col1 and col2, so that when an insert into table3 occurs you have the correct col1 and col2 together ?|||Originally posted by rnealejr
Go into more detail as to what you are trying to do - if I understand what you are attempting to do, how do you guarantee the relationship between col1 and col2, so that when an insert into table3 occurs you have the correct col1 and col2 together ?

I basically go through gathering a list of statistical info for all users.
So say I have 10 users. I do one pass of some rather complex queries to get the data for first column. Then I do another pass for another column. Now I want to combine them all into one table.

There is no need to guarantee the relationship between columns, this is merely for reporting purposes so once combined there will never be row insertion to the table ever.

e.g.

User [dataset 1] [dataset 2] [dataset 3]
1 10 20 2
2 23 30 4

Thanks!|||Originally posted by waspfish
I basically go through gathering a list of statistical info for all users.
So say I have 10 users. I do one pass of some rather complex queries to get the data for first column. Then I do another pass for another column. Now I want to combine them all into one table.

There is no need to guarantee the relationship between columns, this is merely for reporting purposes so once combined there will never be row insertion to the table ever.

e.g.

User [dataset 1] [dataset 2] [dataset 3]
1 10 20 2
2 23 30 4

Thanks!

1. Create an @.table with an identity. Fill that table.
2. Create another @.table with an identity. Fill that with the second table.
3. Query both tables and relate them using their identities.|||you mean something like this >>>

select id, (select count(*) from sysobjects), (select max(id) from sysindexes) from syscolumns