Forum Replies Created

Viewing 15 posts - 856 through 870 (of 1,219 total)

  • RE: Strange Duration numbers for a server-side trace

    bukester (8/16/2013)


    2) Similarly - If I add up SP:StmtCompleted for a give proc. I would expect SP:Completed to equal all of the statements. Its the sum of all the parts.

    Not...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Clear cache after big job?

    Boris Pazin (8/16/2013)


    In short, there are nightly jobs which contains a lot of SQL code. Those queries are not used on website, visitors use other queries. I am worrying that...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: To Use OPENROWSET by SQL user without sysadmin role

    I would guess that if you goto Object Explorer -> Security -> Linked Servers -> Providers -> IBMDA400 and right-click and select properties, you will find that Disallow adhoc access...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Sp to create SQL job

    But now you have changed the stored procedure, so there is no dynamic SQL, and you should have to use quotestring. What I had in mind was:

    EXEC msdb.dbo.sp_add_job @job_name=N''' +...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Mapping Dissimilar Data

    Yes, it is common to have such columns, but you need to take precuations to have them filled in. Commonly, a column called modifytime would have a default of getdate()...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Problems explaining deadlock chain

    READ_COMMITTED_SNAPSHOT is an excellent idea, but it will not apply in this case, as UPDLOCK implies REPEATABLE READ.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Can we make use of user without login..

    Yes, you can say:

    CREATE USER Nisse WITHOUT LOGIN

    Like any good feature, this has a multitude of use cases. Here are a few:

    1) You don't want to grant end users direct...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Need Urgent help to convert nVarchar to Numeric in SQL

    dhananjay.nagarkar (8/15/2013)


    I was confused between CAST and CONVERT which one to use finally I ended up using CAST.

    If you can explain in simple words the difference to me would be...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Design question

    As you are only thinking aloud, it is difficult to know where to butt in, as information you have given is likely to be incomplete.

    But if you are on Enterprise...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Remove Duplicates

    Note sure that I understand. You talk about deleting duplicate rows, and in that case the solution would be:

    ;WITH numbered AS (

    SELECT row_number() OVER (PARTITION BY Name,...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Sp to create SQL job

    I don't see any highlighting?

    But I do see a syntax error. This is your stored procedure:

    create procedure dbo.CreateBackupAgentJob @DatabasenameInput varchar(100) = null as

    declare @JobCode varchar(max)

    declare @thisserver nvarchar(100)

    select @thisserver = (select...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: I can not connect to a data base in a linked server

    Any particular reason you expect this to work in the first place?

    From where I sit, I can only encourage you to check that

    1) You have spelled the database name correctly.

    2)...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Put 4 tables in 1 table.. HOW to do that?

    How about reading the error message? It says that there is no column name for column 1. So you need to add one. Since there an operator (COLLATE) the column...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Start/Stop/Restart options are desabled on SQL 2012 in SSMS

    Try starting SSMS by right-clicking and select Run as Administrator.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • RE: Help with sql statement

    So here is the answer you did not expect: in a relational database a table is supposed to model a unique entity, and each column is supposed to model a...

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 15 posts - 856 through 870 (of 1,219 total)