Viewing 15 posts - 46,816 through 46,830 (of 49,552 total)
Oberion (4/18/2008)
lastly, it ain't my job to baby sit developers or review all their code. I have other projects and bigger fish to fry.
Sorry, but I can not agree...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 7:58 am
I'm not sure I follow.
Do you want the procedure to run at midnight? If so, you need a SQL job
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 6:27 am
A logon trigger is server wide. I'm not sure if at the point of login you can see what database the user is going to connect to. You'll have to...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 6:15 am
View should be sufficient.
You'll be needing both CASE (the the not empty string) and ISNULL (for the NULLS)
Something like this (partial query only )
SELECT ...,
CASE WHEN ISNULL(CUST_NAME_RU,'') = '' THEN...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 3:35 am
I can't see your hard drive. Image url - file:///h:/sql.bmp
Attach a jpg to your post.
SQL agent is installed and is running. Are you sysadmin on that server?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 1:58 am
Are the queries written optimally?
Do you have appropriate indexes?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 12:46 am
If the trace is still running, yuo won't be able to open the file. You'll have to stop the trace, or pause it and copy the trace file elsewhere, to...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 12:40 am
What's the error you're getting?
I've never used Visual studio's database projects, so I can't be much help.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 21, 2008 at 12:37 am
Jim Russell (4/18/2008)
But I'm hard to convince, and I see it as a huge flaw that a db server can be so vulnerable.
I don't see it as a vulnerability....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 8:06 am
Move the subquery into the from clause and treat it as a derived table.
Something like
SELECT
[year],
...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 6:46 am
I did.
DECLARE @sSQL NVARCHAR(100), @rowcount INT
SET @sSQL = 'select * from sysobjects'
EXEC sp_executesql @sSQL
SELECT @rowcount = @@ROWCOUNT
PRINT '@rowcount = ' + CAST(@rowcount AS VARCHAR(4))
Output in the messages tab -
(118...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 6:15 am
What you're getting back from sp_executesql that way is the return value. Traditionally that's 0 if there was no error, otherwise it's the error code. But that depends on the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 5:58 am
Please create a new thread for your question.
Thanks
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 5:53 am
Jim Russell (4/18/2008)
That's the chauvinistic IT department high priest answer!I don't care about the job title of the author of the problematic query, I just want to limit the impact.
If...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 5:51 am
Limit permissions so that users can't write ad-hoc code.
Code reviews for all code written by the developers
Training
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 18, 2008 at 5:27 am
Viewing 15 posts - 46,816 through 46,830 (of 49,552 total)