Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 1,583 total)

  • RE: A Developer's scalar UDF is takeing this query from 3 seconds to over 5 minutes to run

    P Jones (3/27/2012)


    You could have a look at where the original data is coming from - if it's via an SSIS package then put a splitting function into that and...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: A Developer's scalar UDF is takeing this query from 3 seconds to over 5 minutes to run

    UPDATE: I was able to find out why the COUNT was returning 20. Even though there is only one record in the example...because of the CROSS APPLY it is...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: A Developer's scalar UDF is takeing this query from 3 seconds to over 5 minutes to run

    Okay I'm trying out the tally table but am noticing some peculiar behavior (perhaps this is normal)

    Consider this sample row of data:

    tranidctrl-numbertc-numberpos-datetc-cardtrans-codeprod-codeprod-qtyMonthMonthNameYearSystem

    1154842956|847632|431225|'2012-01-01 00:00:00.000'|'0012 '|31|'2;5;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0'|'9.287;11.51;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0'|1|'January'|2012|'PR'

    When I use the functions originally attached...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: How get files space used information in a remote server database

    Try this script, it should work nicely - you can run it as-is replacing the "LinkedServer" name with a real linked server

    IF OBJECT_ID ('tempdb.dbo.#DatabaseSizes') IS NOT NULL

    BEGIN

    DROP TABLE dbo.#DatabaseSizes

    END

    DECLARE @DB...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: A Developer's scalar UDF is takeing this query from 3 seconds to over 5 minutes to run

    CELKO (3/25/2012)


    Remember anything about first normal form? Writing a parser in SQL is like sawing wood with a screwdriver. It is the wrong tool. Do this with a front end...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Attempt to fetch logical page (1:229734) in database 24 failed. It belongs to allocation unit X not to Y.

    Gail, thanks for the article, very informative and appreciated.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Attempt to fetch logical page (1:229734) in database 24 failed. It belongs to allocation unit X not to Y.

    So I was finally above to get a clean CHECKDB and have isolated the source of the problem: There are 3 replicated transactions/records that no longer exist at the subscriber...from...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Attempt to fetch logical page (1:229734) in database 24 failed. It belongs to allocation unit X not to Y.

    I've read that READ COMMITTED SNAPSHOT can put some serious bloat across tempdb as it needs to put everything in there temporarily while a query "does what it needs to...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Attempt to fetch logical page (1:229734) in database 24 failed. It belongs to allocation unit X not to Y.

    Thanks for the input! Regarding the restore....Due to resource restrictions I have all these databases in simple mode as they are pretty much only used for reporting. In the...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Preemptive os pipeops

    If it still appears hung, use processes explorer to kill the actual cmd session...

    Are you using xp_cmdshell???

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Prevent or log Truncate Table commands

    In echoing others, change the sa pwd, Grant only CONNECT/SELECT/SHOWPLAN to the users

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: SQL Server 2008R2 Ent not using all available memory

    This may be a silly point but if you're running this on a 32-bit windows server isn't the max RAM available only going to be 4GB?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: How to find out what is actually in use

    Glad it will help!

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: How to find out what is actually in use

    To aid what everyone else has already said (especially noting that some tables are only used monthly/yearly, etc), depending on how frequently you restart your MSSQL servers you can use/tweak...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Send Mail task

    Please post the the code you have so far...

    Off hand you could try something like:DECLARE @ErrNo int, @ErrMsg nvarchar(256), @Recipients nvarchar(256), @EmailSubjectLine nvarchar(256), @Subject nvarchar(256)

    BEGIN TRY

    --Do something here...

    END TRY

    BEGIN CATCH

    SELECT...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 15 posts - 1,111 through 1,125 (of 1,583 total)