Forum Replies Created

Viewing 15 posts - 136 through 150 (of 1,192 total)

  • RE: SQL Script Generate

    Visual Studio (even just the shell) can do this too. Think it might need SSDT (SQL Server Data Tools) installed.

  • RE: What Kind of DBA Are You?

    I can't see 'Great' on the list? 😛

    But seriously, pretty much all of them, depending on what day of the week it is!

  • RE: Covering date error

    Likely the string isn't directly castable to datetime or date (like the others I'm guessing because we can't see the data).

    Think it'll be based on your OS localisation.

    The convert function...

  • RE: What are your five most common T-SQL commands

    Glad to see I'm not the only one with Morecambe's fingers (all the right notes...)!

    I often use #transient for temp results

    forgot these too:

    SET STATISTICS TIME ON & OFF

    SET STATISTICS IO...

  • RE: What are your five most common T-SQL commands

    DBCC SQLPERF (LOGSPACE)

    select * from sys.dm_exec_requests r cross apply sys.dm_exec_sql_text (r.sql_handle) st

    select * from sys.sql_modules where definition like '%thing of interest%'

    select * from sys.dm_exec_procedure_stats

    Increasingly, ForEach... Invoke-SqlCmd... or gci SQLSERVER:\SQL\... 😉

    But...

  • RE: The Case of the Shrinking CFO, err Database

    MWise (8/17/2015)


    nor permissions

    Great point, missed that one.

  • RE: The Case of the Shrinking CFO, err Database

    Not sure about this...

    If there's less than 10% free on the disk is there even space for a new 13GB datafile?

    No business disruption is specified, but then the solution is...

  • RE: How to copy data from one table on remote server A to remote server B?

    SQLRNNR (8/12/2015)


    Well, if server C can see both A and B, then you can do this a number of ways.

    1. Linked Servers to pull data from A to C, and...

  • RE: Triggers Logging

    This will give you some info on the triggers & aggregated execution stats.

    If you need individual executions then I think you'll need to look at using extended events/server side trace/profiler...

  • RE: Are the posted questions getting worse?

    jasona.work (8/12/2015)


    RG support guy sees e-mail hollers across the room "Hey Steve! Unplug the coffee maker and plug the forum server back in, people've noticed!"

    :hehe:

    FIFY 😉

  • RE: Unique items from an array in order

    Yeah, powershell's full of useful little things like that 🙂

    You can actually combine your two loops into one with another foreach:

    $ScriptPath = "File2", "File1"

    $ServerList = ("ServerB", "ServerC")

    $DB = ("DB1", "DB2")

    $ScriptItems...

  • RE: Unique items from an array in order

    Just this I think:

    $ScriptItems | select Scriptfile -Unique

  • RE: is the "go" keyword necessary in a sproc?

    You can't use go in a sproc. Anything after the first go won't be included in the sproc code.

    It's not a SQL keyword as such, but a batch separator.

  • RE: Delete duplicate rows from ANY table.

    Starting at the top you can not merge the 'second' level to the other client because there is the constraint with the third level. So the second level can not...

  • RE: Temp Db issue

    To elaborate on above - this will remove all data, query plans etc from RAM, so your SQL server will have to reload data from disk into RAM, calculate new...

Viewing 15 posts - 136 through 150 (of 1,192 total)