Viewing 15 posts - 16 through 30 (of 32 total)
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
August 30, 2010 at 11:55 am
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
August 30, 2010 at 9:13 am
That does look like the result of a lost argument between a dba and a business user 😀
MCITP SQL Server 2005/2008 DBA/DBD
August 30, 2010 at 8:06 am
Try
EXEC DB2.dbo.Test @DB = CAST(SELECT DB_NAME() AS SYSNAME);
MCITP SQL Server 2005/2008 DBA/DBD
August 30, 2010 at 7:43 am
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
August 29, 2010 at 1:33 pm
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
August 29, 2010 at 12:47 pm
Jeff Moden (8/28/2010)
Brian O'Leary (8/28/2010)
TryWHERE [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
August 28, 2010 at 1:43 pm
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
August 28, 2010 at 1:39 pm
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
August 28, 2010 at 10:26 am
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
August 28, 2010 at 8:27 am
Hi Preethi
Please could you post the DDL of the tables involved?
MCITP SQL Server 2005/2008 DBA/DBD
August 28, 2010 at 7:27 am
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
August 28, 2010 at 7:18 am
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
August 28, 2010 at 4:58 am
Viewing 15 posts - 16 through 30 (of 32 total)