Forum Replies Created

Viewing 15 posts - 6,826 through 6,840 (of 13,459 total)

  • RE: Large Comment Blocks Causing Issues

    well i found a post stating the obvious: adding debug stuff like PRINT statements would slow down a proc, and forgetting to sue using SET NOCOUNT ON to avoid extra...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Large Comment Blocks Causing Issues

    David Paskiet (9/2/2011)


    As I remember the article, that is the root of the problem. Due to the large block, the compiler/execution plan cant do it's thing properly. so...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Large Comment Blocks Causing Issues

    can you get an execution plans of the same proc with and without the huge comment blocks? that would be where i'd look first, i think...there's GOt to be ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Large Comment Blocks Causing Issues

    comments are ignored by SQL server completely...it's much more likely that because you edited the procedure, it was recompiled,a nd the recompilation made a better plan, which executes faster than...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can you Update Multiple Views in one go?

    paul88 (9/2/2011)


    Cheers Lowell, that allowed me to do it a good bit quicker than manually changing each one, thanks

    glad i could help!

    you can try to get fancy, and do something...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Please help analyzing MS SQL Database Logfile(s)

    erkan.erbil (9/2/2011)


    On 08/31/2011 between 13:00 - 14:00 o clock on PROD Servicemanager DB data in Tables XXXXXXM1 / XXXXXXM2 were deleted. We don't know how and by whom.

    Appserver Logs showed...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: how rollback works in sql server?

    just to confirm and expand on what Howard said...

    as soon as you change the ansi setting shown in my screenshot below, and in a new window...

    if you perform some updates...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can you Update Multiple Views in one go?

    you'll have to script each view out and issue teh ALTER VIEW statement for each;

    but you can use the metadata to find them and script them out from there:

    select *...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SQL to return only rows that aren't distinct

    by are not distinct you mean duplicates?

    you can use row_number() function or group by...having count(*) > 1

    SELECT * FROM

    (select row_number() over (partition by ColumnList Order By ColumnList) AS RW,

    ColumnList...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: DB_Owner cannot insert

    jimmycjen (9/1/2011)


    Lowell,

    When I ran the (first) SQL statement in a specific database, for some reason, it doesn't show all the users.

    that might be normal, if domain users get their access...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: DB_Owner cannot insert

    well, it's one thing to *think* he ahs db_owner, and another one to check.

    run these queries in the database in question:

    select

    userz.name,

    userz.type_desc,

    decripz.name as _member_of_this_role

    from sys.database_principals userz

    inner join sys.database_role_members rolez

    on...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Need t-sql script to backup a sql 2005 sp2 database with compression

    Express12 (9/1/2011)


    Need t-sql script to backup a sql 2005 sp2 database with compression.

    This is not working on SQL 2005:

    BACKUP DATABASE myDatabase TO DISK = 'C:\BackupFolder\myDatabase.BAK' WITH COMPRESSION

    compression was...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: DB_Owner cannot insert

    is there a trigger on the table that is inserting into an audit table somewhere? maybe it's permissions on the Triggers Audit table that the user has no permissions for.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: 2 Indexes in same columns, but the column order is different - Whats the difference?

    the order of the columns are important.

    i hate the pseudocode of col1,col2, so lets switch to a little more detailsed example.

    suppose you have an index like this:

    CREATE INDEX IX_OrdersTable ON...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: database mail error

    i'd say the issue's what you put for the mail server value..."could not connect to mail server." to me says that the url, say "mail.yourdomain.com is actually something else.

    it seems...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 6,826 through 6,840 (of 13,459 total)