Forum Replies Created

Viewing 15 posts - 2,401 through 2,415 (of 13,469 total)

  • RE: Delete a column in all tables

    since this is a one off, i would generate the statements, and copy/paste/run like this:

    select

    'ALTER TABLE '

    + quotename(object_name(object_id))

    + ' DROP COLUMN '

    + quotename(name)

    from...

  • RE: DDL Triggers and exec privilege

    most users cannot run this unless you grant it explicitly either: (GRANT VIEW SERVER STATE TO [myDomain\developers]

    )

    SELECT client_net_address

    FROM sys.dm_exec_connections

    WHERE session_id = @@SPID

    is [Developers] a role, or a placehoder for your...

  • RE: Can composite indexes be used as an index on a single field?

    since you said the PartNumber is the first field, then yes; but it also depends on how selective that single column is.

    if there's a lot of common values, SQL...

  • RE: DDL Triggers and exec privilege

    the issue is not the trigger, but the tables/objects the trigger is manipulating.

    for example, if your trigger is inserting into master.dbo.MyAuditTable, you probably want to GRANT INSERT ON master.dbo.MyAuditTable TO...

  • RE: Opinion of use of LINQ

    Welsh to capture the code, for example, i decided the dmv's were not enough; not everything exists in the cache to check for performance issues.

    Instead i started with a ...

  • RE: Opinion of use of LINQ

    at our shop, we use a lot of LINQ; generally, the developers write whatever they want, and if they hit a performance block, then that call gets modified to use...

  • RE: Can't drop index due to FK enforcement

    like the error is telling you, because there are foreign keys in place, in this case you'll need to drop and recreate the foreign keys, i think; you can find...

  • RE: Tranaction Logs on a Test Box

    Andrew in my shop, all databases on development boxes are switched over to simple recovery mode; i don't need a point in time restore on development that log backups would...

  • RE: SEARCHABLE PDF'S

    have you considered adding a full text index on the pdfs themselves? you'd obviously need to modify HOW you search after you have that in place.

    first example i found when...

  • RE: Execute Permission Problem on Stored Procedure

    it's rare that a procedure explicitly names the database while in the same database; i really think it's affecting another database: this snippet from your proc really makes me think...

  • RE: Execute Permission Problem on Stored Procedure

    the procedure deleted from the database [HPApps], which i suspect is NOT the same db thatt proc exists in.

    so if the produdure exists in [LocalDB], the permisisons chain is broken,and...

  • RE: Columns_updated() in a trigger started giving incorrect column after a column has been removed form the table.

    you have to alter your trigger. your staticly written trigger did not change to now match the new results from columns_updated() function

    columns updated uses a map to say which columns...

  • RE: Execute Permission Problem on Stored Procedure

    Chris can you take a look at the specific stored proc that is raising the error?

    ownership chaining is probably disrupted in this specific case.

    you can get that error "The...

  • RE: sql dynaminc and aggregate functions

    another issue is that query is going to use integer division and return incorrect totals

    something in the query needs to be multiplied by 1.0 so that the datatype is expanded...

  • RE: Server-side trace to find SELECT *

    --

    --fix any views that happen to have changes to their underlying tables they query from

    declare c1 cursor for

    select name from sys.views

    open c1

    fetch next from c1 into @viewname

    While @@fetch_status <>...

Viewing 15 posts - 2,401 through 2,415 (of 13,469 total)