Forum Replies Created

Viewing 15 posts - 16 through 30 (of 116 total)

  • RE: Umlauts in my TSQL script are turning to "?" when called from a powershell script

    Thanks, good call .... but

    EXEC xp_cmdshell 'sqlcmd -S "<ServerName>" -i "C:\Temp\mysqlfile.sql"'

    results

    select StringValue from dbo.PowershellTest

    StringValue

    Gültig

    running sqlcmd direct from the cmd window gives the same results

  • RE: Whats going on Query window?

    I got a lucky guess on this, Choose three from five, two are successfull, three are unsuccessfull

  • RE: Right Anti Semi Join Vs Left outer join

    You are absolutly correct Gail.

    In the example I've posted that is a significant difference.

    In the proc that I'm tuning the duration is 50 minutes and the difference is less signficant.

    On...

  • RE: Right Anti Semi Join Vs Left outer join

    Thank you very much for your answer Gail.

    ( I've got no idea what recursion looks like in an exection plan, I 'll go away and build one :-))

  • RE: Right Anti Semi Join Vs Left outer join

    Just to clarify, I thought the sub select would perform badly because it references the outer select and some kind of recursion would happen.

  • RE: Output message from invoke-sqlcmd required

    Solved 😀

    I changed the verbose to -verbose *>

    invoke-sqlcmd -inputfile "C:\Temp\mysqlfile.sql" -serverinstance "ServerInstance" -database "Tempdb" -verbose *> C:\Temp\ReleaseLog.txt

    now my ReleaseLog.TXT hold all the information

    Der Datenbankkontext wurde auf 'tempdb' geändert.

    invoke-sqlcmd :...

  • RE: Output message from invoke-sqlcmd required

    Thanks Gary.

  • RE: SP in Rollback

    Wow thanks for the really quick answer.

    This is a production server.

    I can go for a reboot out of office hours, but need to get it cleared by onhigh ( we...

  • RE: Failed job incomplete error message

    You may be able to get some additional information out of the sys tables

    DECLARE @ScheduledJobName sysname

    SET @ScheduledJobName = 'your Scheduled Job Name'

    SELECT SQL_message_id,messages.text,sql_severity,message

    FROM msdb.dbo.sysjobhistory

    JOIN msdb.dbo.sysjobs

    ON sysjobhistory.Job_id = sysjobs.Job_id

    JOIN sys.messages...

  • RE: SQL Job Schedule Question

    If your monthly job starts to run before the weekly job is scheduled to run, you could add a step to disable the weekly job

    DECLARE @JobName sysname

    SET @JobName = 'Your...

  • RE: Create Database

    Am I reading this right?

    FOR ATTACH

    FOR ATTACH [ WITH < attach_database_option > ]

    Specifies that the database is created by attaching an existing set of operating system files. There must...

  • RE: Conversion failed when converting varchar to int

    ramadesai108

    Depending on how you generate the values for the @EmpID, it may be worth looking at declaring it as a table and populating it with a select statement.

    Then you could...

  • RE: Date Only from Date and Time

    @Lynn

    I absolutely agree,

    but (there had to be one didn't there 🙂 )

    The OP did ask about how to concatenating the values back

  • RE: Date Only from Date and Time

    SET DATEFORMAT dmy;

    GO

    SELECT

    [Getdate] = GETDATE()

    ,[Year] = DATEPART ( yy , GETDATE() )

    ,[Month] = DATEPART ( mm , GETDATE() )

    ,[Day] = DATEPART ( dd , GETDATE() )

    ,[and back again] =...

  • RE: calculate the change in multiple values over time

    sample data

    CREATE TABLE #Table([RecordDate] DATETIME , [LogicalName] sysname, [SizeMB] INT );

    go

    INSERT INTO #Table([RecordDate], [LogicalName], [SizeMB])

    SELECT '2010.01.01 10:20:000','msdb', 10 UNION ALL

    SELECT '2010.01.01 10:20:000', 'anotherdb', 300 UNION ALL

    SELECT...

Viewing 15 posts - 16 through 30 (of 116 total)