Forum Replies Created

Viewing 15 posts - 106 through 120 (of 522 total)

  • RE: Logging Permission Denied Errors in SQL 2005

    You can try event notification and listen on the event EXCEPTION. In your handling SP, filter out the exceptions you don't need, and send email etc.

     

  • RE: Converting integer to datetime

    You need to minus 2 days on the converted datetime value. We had this issue before. We had a C++ clients sends datetime in float format.

    The reason is that in...

  • RE: which is better and fast Inner Join Or Where Clouse ? and Why??

    The the first and the last queries are valid. The other 2 do not have valid syntax ( you can not use inner join without ON clause)

    The first one is...

  • RE: Why the following problem arise in Table Variable case...Expert Must See this problem.

    Another benifit of table vairable is that there is no tran log for actions on table variable. When you rollback a transaction, the data in a table variable is still...

  • RE: Model database not owned by dbo SQL Server 2005

    Database owner must be a login (e.g. sa etc). dbo is a predefined database user in db_owner role.  By default dbo maps to the schema dbo.

  • RE: row_number() help!

    The problem I guess is that the table Stock_Subjects has many to 1 relation to the table Stock.

    Since you are not using any columns from that table, you can take...

  • RE: How to find the owner of the table in MSSQL 2005?

    In 2005, an object's owner is schema owner by default. It can be changed to other principals by "ALTER AUTHORIZATION", in this case, the principal_id will not be null i the sys.objects table. To...

  • RE: dbmail 2005

    db mail uses Service broker. Something wrong in the configuration related with SBS. Did you enable the service borker for the database?

  • RE: Partitioning Table - is this a bug???

    Not quite sure about your testing process.  When you create a table without partitioning (no PS), you can only associate one file group to the table. You mean the data...

  • RE: "FOR XML EXPLICIT" query Works on SQL 2000 but same does not work on 2005 issues

     

    Change tUser.id  to NULL.

    SELECT

                1                                                                      AS        TAG,

                            NULL                                                    AS        PARENT,

                            [TEST:mailboxaddress]     AS [mailbox!1!mailbox-name!element],

                            [TEST:status]                               AS [mailbox!1!mailbox-status!element],

                            NULL                                                    AS [user!2!title!element],

                            NULL                                                    AS [user!2!firstname!xml],

                            NULL                                                    AS [user!2!lastname!xml],

                            NULL                                                    AS [user!2!login!element],

                           

  • RE: Query plan on different instances

    Can update the statistics on both server and check the plan again?

    If the scan causes big perfromance issue, maybe just use index hint WITH(OPTION(indexName) for SQL server to use that...

  • RE: Finding Long Running Queries

    For long running queries, you can filter by the duration. Watch the RPC:Complete event and Set duration to, say 2 minutes.

    It's not safe to filter by SPID becuase client side may...

  • RE: OPen xml

    Yes, you can do this by OPENXML. The following is a sample to select just the first Customer's order:

    DECLARE @idoc int

    DECLARE @doc varchar(1000)

    SET @doc ='

    <ROOT>

    <Customer CustomerID="VINET" ContactName="Paul Henriot">

       <Order CustomerID="VINET"...

  • RE: xp_regread error

    Check what you get when you run:

    EXEC master..xp_regread N'HKEY_LOCAL_MACHINE',N'Software\Microsoft\OLAP Server\CurrentVersion'

    If the value for KeyExist is 1, the error means the key "CurrentVersion" does not have the subkey "csdVersion" defined.

    You can...

  • RE: Opening XML file from SQL Server 2005

    Yes, it's possible. You can use OPENROWSET to load any file into database. For xml file, the following is an example:

     SET NOCOUNT

Viewing 15 posts - 106 through 120 (of 522 total)