Forum Replies Created

Viewing 15 posts - 1,201 through 1,215 (of 5,841 total)

  • RE: Adding an Identity column as Primary Key

    I would say your Azure database is under powered (as is almost ALWAYS the case). But as someone else said, fastest will be to make a new table (with NO...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Handling xml data and formatting into separate table

    First and by FAR the most important let me say that this should be done OUTSIDE of SQL Server (unless you are going to be using the set in another...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Restore help needed for 1.5 TB database.

    Ross McMicken (4/1/2016)


    Hugo Kornelis (3/31/2016)


    Chitown (3/31/2016)


    Hugo Kornelis (3/31/2016)


    1200 logical files? That is a lot!

    I recommend using this opportunity as a test case to check how long the restore will take....

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: How do I Avoid Deadlocks?

    See SET DEADLOCK_PRIORITY (https://msdn.microsoft.com/en-us/library/ms186736.aspx) and use that for your batch processes. Set them HIGH and you should be good. This could be easier than setting LOW for all of your...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Update trigger

    If all columns are "important" for updating your who/when columns then you don't need to check for them. You simply update the fields joining to INSERTED without a WHERE clause....

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Restore help needed for 1.5 TB database.

    Chitown (3/31/2016)


    That's a good start.

    Now what if someone accidentally forgets to add a WHERE clause to "DELETE FROM OrderData"?

    I will personally kick his/her butt :-). Since it's prod, no one...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: String manipulation options

    CLR is by far the best way to do this, at least until SQL 2016 is released. You can use Delimited8KSplit found here on SSC.com to do this, although the...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: BCP - Need to output only 1 row per file.

    Since bcp is a command-line tool and I'm old school, I would use DOS scripting for this. Works fine, lasts a long time. 🙂 If you have xp_cmdshell enabled on...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: BCP - Need to output only 1 row per file.

    Just write a SELECT TOP 1 ... query and use that to drive bcp:

    https://msdn.microsoft.com/en-us/library/ms162802.aspx

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Restore help needed for 1.5 TB database.

    This is the third time I have mentioned this this week, but you must make sure your non-production environments have Instant File Initialization enabled. Otherwise your restore will zero out...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Non cursor based looping within a script.

    Your post doesn't make sense as written. Nothing you have explains any need to iterate. So, what, EXACTLY, are you doing with this output:

    SELECT @user-id = UID, @RefID = RefID...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Restore Time on SQL Server 2016

    I would also check if you have enabled Instant File Initialization on the restore machine. Without it, your server will zero out every bit of every byte of the entire...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Confused about Alwayson Availablity group

    But as far as I know WSFC required a shared storage.

    That is a false statement, as Grant has already said. A Failover Cluster requires shared storage.

    I REALLY caution you...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Log Shipping - different domains

    Personally in such situations (and others, such as too many databases on the same server) I simply construct my own processes for backup file migration and processing.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: user defined function causing error

    Lets see real code please, not pseudo code.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 1,201 through 1,215 (of 5,841 total)