Forum Replies Created

Viewing 15 posts - 571 through 585 (of 1,315 total)

  • RE: Table ownership

    Is it possible that you changed the table ownership to an orphaned user?  I don't know if sp_changeobjectowner checks for this.

    Try running "sp_change_users_login @Action = 'Report' "

  • RE: Getting a Secondary LogShipdatabase out of Read Only Mode

    If you have a copy of a log-shipped secondary database that you want to make writable, use RESTORE..WITH RECOVERY.

    RESTORE DATABASE database WITH RECOVERY

  • RE: Application Roles

    Our application is batch oriented, so the connection time and network traffic is miniscule compared to the work performed.  In a transactional application, web application, or something else involving frequent...

  • RE: Application Roles

    What overhead?  In my testing I only saw it require one retry at most.

    I coded it with no retry limit, if there was a serious issue it would be an...

  • RE: Application Roles

    After posting I noticed you were using VB6.  I may be a little rusty, but I think this is what it would look like.

    Dim nRetries as Integer

    nRetries = 5

    Do

        On...

  • RE: Application Roles

    Switching off pooling is drastic.  The first tip is to add something unique, such as an ApplicationName attribute, to the connection string so the app role connections won't be pooled...

  • RE: The Best Thing?

    The best use I've run across (related to SQL Server) is to pass a complex data structure as a procedure argument. 

  • RE: Join with where clause?

    The left join means it will return at least one copy of every row from the left-hand table.  The first ON clause has "A.A = 1", so the first row...

  • RE: Join with where clause?

    Using a CASE function (not statement) in the SELECT clause has no effect on the joins.

  • RE: locking down public and guest accounts

    At a minimum, the user must have access to their default database.  If you don't want them to see anything in master, create an empty database and make it their...

  • RE: Windows Account versus SQL Server Account

    Windows authentication is almost always preferred to SQL authentication.  It is more secure, and means less work for the DBA maintaining logins.  If a limited group of users are allowed...

  • RE: Date Subtraction

    Yeah, both are equivalent: they are both syntax errors.

    How about: DATEDIFF(DAY, @startdate, @enddate)

  • RE: HUGE transaction Logs

    If you're going to run a full backup after the reindexing, you might speed it up (and prevent log file growth) by switching to simple recovery mode during the optimization.

    Regular...

  • RE: Script to get distinct data

    Using a simple GROUP BY and MIN may give result records where each aggregate field returns a value from a different source record.  This may not be acceptable.

    If the records have...

  • RE: cannot delete user login

    This sounds like an orphaned user.  If the database was restored from another server with the same SQL login, the user is in the database sysusers table with an SID...

Viewing 15 posts - 571 through 585 (of 1,315 total)