Forum Replies Created

Viewing 15 posts - 5,236 through 5,250 (of 7,614 total)

  • RE: Database restore leaves the database with no dbo

    real.forte 18467 (4/2/2015)


    Well,

    The account I perform my restore from is dbcreator and the restore operation itself works well. It is just that it leaves the database with no dbo,...

  • RE: Database restore leaves the database with no dbo

    You don't have to be a full sysadmin, necessarily, but you do need the proper authority/permissions.

    The dbcreator role should handle the restore.

    You'd need to be db_owner to issue...

  • RE: Database restore leaves the database with no dbo

    Immediately after every restore of that db, run this command:

    EXEC sp_change_users_login 'UPDATE_ONE', 'nSpekUser', 'nSpekUser'

  • RE: Converting getdate

    djj (4/2/2015)

    If you have a VARCHAR I would suggest converting to a date format of some sort before compare.

    A bad idea. Not necessary and could potentially force...

  • RE: Problem with creating a Index on a temp table

    GilaMonster (4/2/2015)


    ScottPletcher (4/2/2015)


    You can't name the indexes yourself unless you insure they're unique. It's a pain, but using dynamic SQL you can do it.

    That's the case for constraints, not...

  • RE: Problem with creating a Index on a temp table

    dwilliscp (4/1/2015)


    I have not run across a problem.. yet.. but does this problem also cover indexes on temp tables? Thus is there any issue with me doing the following?

    CREATE TABLE...

  • RE: Converting getdate

    Use 'YYYYMMDD', since that format always works correctly in SQL Server; YYYY-MM-DD doesn't work correctly if the local settings are for dmy instead of mdy.

    WHERE table_column = CONVERT(varchar(8), GETDATE(), 112)

    Never...

  • RE: Index alignment in partitioning

    What's critical is to get the best clustering. If, to do that, you need to change the PK to match the clustering key, then you really need to do...

  • RE: Deadlock involving query against sys.tables

    Sioban Krzywicki (4/1/2015)


    ScottPletcher (4/1/2015)


    You can try to get SQL to make the ALTER the task that SQL kills if a deadlock occurs, but I've found it's not 100% effective.

    SET DEADLOCK_PRIORITY...

  • RE: Index alignment in partitioning

    Matthew Darwin (4/1/2015)


    ScottPletcher (4/1/2015)


    All excellent points.

    Keep in mind though:

    1) You can leave the PK solely on the SmsID column and still cluster the table by ( date, id...

  • RE: Index alignment in partitioning

    Matthew Darwin (4/1/2015)


    Yes, that's the clustering choice I would have made; in fact I would have made that the pk. However, this is already in existence and has been...

  • RE: Deadlock involving query against sys.tables

    You can try to get SQL to make the ALTER the task that SQL kills if a deadlock occurs, but I've found it's not 100% effective.

    SET DEADLOCK_PRIORITY -8

    ALTER INDEX ALL...

  • RE: Index alignment in partitioning

    Cluster the original table on ( CreatedDate, SmsId ), in that order, not vice-versa.

    Once you get the best clustering key, you're likely not to need partitioning yet. And, if...

  • RE: T-SQL Help...probably pretty simple but I'm tired :)

    I've seen it cause errors, although it's somewhat obscure, a combination of things, including linked servers, IIRC. Perhaps it's been fixed, but I don't intend to risk job failures...

  • RE: T-SQL Help...probably pretty simple but I'm tired :)

    CELKO (3/31/2015)


    use lowercase only for data type names in SQL Server

    .

    No. The human eye reads certain words as a single unit called a bouma. The keywords in programming...

Viewing 15 posts - 5,236 through 5,250 (of 7,614 total)