Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)

  • RE: logon history

    Thank you for your reply,

    if I run:

    SELECT Top 1000 [LoginRecordID]

    ,[LoginTS]

    ,[LogoutTS]

    ...

  • RE: logon history

    Thank you,

    sorry for my mistake posting the question here.

    De datbase has a table that calls LoginRecords and there I can see when users login and logout.

    So I think I should...

  • RE: logon history

    thak you again for quick update,

    lets for a moment say SQL Auditing has been setup, what then? how can we get this information out of the DB?

    Thanks

  • RE: logon history

    Thank you for the reply,

    In fact I am sure the Database stors information on login and logout to the database, but question is how to get the info for...

  • RE: Window Internal Database

    I find out it is not possible to access the WID from remote location.

  • RE: set nocount on

    Thank you that solve the issue

    I did add the SET NOCOUNT ON; to wrong place

    Thank you again.

  • RE: set nocount on

    you are right I dont want to see the line that says (37 rows affected) in the csv file.

    This the query that I run and it genrate the (37 rows...

  • RE: set nocount on

    Thank you for the replay,

    If I run the query directly with or without the set nocount on I see only this message:

    Command(s) completed successfully.

    but in the csv file I see...

  • RE: Queryquestion

    sure If we run the query in the query windows it give me the result, so this realy streng why now it come up with this error.

    if you like I...

  • RE: Queryquestion

    sorry to comeing back again,

    when run the quey that should select data from the second datbase on the same server get this error:

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'MailProfile',

    @recipients = 'shahin@gmail.com',

    @execute_query_database = databsemrohist,

    @subject...

  • RE: CSV file

    Hi,

    I find a soltion to this question I did add this to the query:

    DECLARE @tab char(1) = CHAR(9)

    @query_result_separator = @tab

    now I get an CSV file with...

  • RE: Queryquestion

    Thank you again,

    I did follow your suggestion and run:

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'test profile',

    @recipients = 'shahin3213@gmail.com',

    @subject = 'Database Mail Test by T-SQL',

    @execute_query_database = tms,

    @body = 'This is a test e-mail sent...

  • RE: Queryquestion

    Thans you so much,

    you are right I did add the

    @execute_query_database = DB name

    now I can run the query and get a mail.

    just one more question IF I may,

    my query has...

  • RE: Queryquestion

    Thank you for your replay,

    I already tried that but when run that get this error:

    Msg 22050, Level 16, State 1, Line 0

    Error formatting query, probably invalid parameters

    Msg 14661, Level 16,...

  • RE: The Importance of Validating Backups

    Thank you all for your detailed information. 🙂 appreciate it.

    Shahin

Viewing 15 posts - 1 through 15 (of 17 total)