Forum Replies Created

Viewing 15 posts - 16 through 30 (of 32 total)

  • RE: Can you determine the DB an SP was called from?

    Oops that wasn't supposed to get posted, I've been playing around with various ways of writing it but I have to concede the rest of the world is right, you...

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: SQL Instance checkings.

    Hi Gareth

    What's your overall objective with this script?

    If you simply want to monitor database and log file useage from a central location there are a number of things you could...

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: Questionable SELECT Statement Length - Maybe Funny For Some of You

    That does look like the result of a lost argument between a dba and a business user 😀

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: Can you determine the DB an SP was called from?

    Try

    EXEC DB2.dbo.Test @DB = CAST(SELECT DB_NAME() AS SYSNAME);

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: Can a SP invoke a thread to call another function

    Hi Anand

    You are approaching this in the wrong way using SQL. As mentioned by Lutz, you need to approach this using set based logic rather than row based.

    There...

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: Can you determine the DB an SP was called from?

    You could add a parameter to the sproc and pass the db name into it. This would of course need to be recorded somewhere.

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: sql

    Jeff Moden (8/28/2010)


    Brian O'Leary (8/28/2010)


    Try

    WHERE [Timestamp] >= '2010-08-28 00:00:00.000' and [Timestamp] <= '2010-08-28 23:59:59.999';

    Hi Brian,

    That's not the recommended way to do things because 1)... 23:59:59.999 rounds UP to the next...

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: 8KB page size

    It appears I also made a mistake, I totally misunderstood the initial question.

    I'm not going to go back over Jeff Moden's answer it's correct. However if you would like analyse...

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: How to get the machine name when executing a stored procedure via a front end application

    You might be better off simply returning the result set to your application and then generating the file with that rather than have SQL Server push the file out to...

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: 8KB page size

    The last row inserted causes SQL Server to allocate a new 8K page for your table, this means your table now has two 8K pages therefore its size is 16K....

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: sql

    I forgot to add, I believe the nvarchar(max) is roughly 2GB

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: sql

    Try

    WHERE [Timestamp] >= '2010-08-28 00:00:00.000' and [Timestamp] <= '2010-08-28 23:59:59.999';

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: getting the sum

    Hi Preethi

    Please could you post the DDL of the tables involved?

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: Can a SP invoke a thread to call another function

    Hi Anand.

    What is your analysis function (AnalysisProduct()) doing with each row? What, if any, other tables are accessed?

    MCITP SQL Server 2005/2008 DBA/DBD

  • RE: Running SQL Script - Make certain text mandatory

    I'm assuming at present this script resides somewhere on a file system as a .sql script file and is manually executed after each restore.

    You could add the following code prior...

    MCITP SQL Server 2005/2008 DBA/DBD

Viewing 15 posts - 16 through 30 (of 32 total)