Forum Replies Created

Viewing 15 posts - 2,296 through 2,310 (of 49,552 total)

  • RE: Assign result of dynamic sql to variable

    Your string literal need to be NVarchar, not Varchar.

    @query shouldn't be in quotes, you want the executesql to execute the contents of that variable, not to try and execute the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    Grant Fritchey (9/30/2016)


    However, I do all my demos against AdventureWorks (and moving towards WideWorldImporters, or, as I call it, World War I, WWI) and my scripts and presentations are all...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Assign result of dynamic sql to variable

    Your string literals need to be NVarchar, not Varchar, so N'string contents' rather than just 'string contents'

    Also, @query1 shouldn't be in quotes, you want the executesql to execute the contents...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Log Chains

    Mike Scalise (9/30/2016)


    Are you suggesting then that there's no easy way to shrink this log back to its initial size?

    No.

    I said that an active VLF can't be moved. To...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Log Chains

    Log backups *and* additional write activity on the DB such that the active VLF wraps around. You can't move VLFs, and you can't ever make the one that's active and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL Server 2014 can't use more than 32GB RAM?

    ils_83 (9/29/2016)


    hmm i thought OS RAM requirements only around 4GB, that's why i only give 6GB

    The minimum RAM requirement for installing the OS is 4GB. Windows needs memory to manage...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL fragmentation question

    The general guideline is to ignore tables under 1000 pages. Fragmentation only affects large range scans from disk, not general operations against pages in the buffer pool.

    Make sure you're doing...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: GRANT User Permissions to Create, Drop Alter all Objects is a schema

    For 2, try a google search for database permissions

    For 3, try a google search for fixed server roles and database permissions

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: GRANT User Permissions to Create, Drop Alter all Objects is a schema

    You grant ALTER on the schema, then the required CREATE permissions at the DB level, make sure the user has NO permissions to the dbo schema, doesn't have DB_Owner, doesn't...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Assign result of dynamic sql to variable

    You can pass parameters to and from sp_executesql. See: https://msdn.microsoft.com/en-us/library/ms188001.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: GRANT User Permissions to Create, Drop Alter all Objects is a schema

    Cool, so you have a working GRANT statement for the schema, based on the permissions listed there?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: GRANT User Permissions to Create, Drop Alter all Objects is a schema

    Welsh Corgi (9/29/2016)


    GRANT ALTER PROCEDURE TO CCUser;

    I have the same problem with DROP PROCEDURE.

    Have you even bothered to read the linked page?

    The page that lists EXACTLY what are valid...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: GRANT User Permissions to Create, Drop Alter all Objects is a schema

    Phil Parkin (9/28/2016)


    See link.

    And, after you're read that, tell me whether 'CREATE PROCEDURE', 'ALTER PROCEDURE', 'DROP TABLE', etc are valid permissions to be granted on a schema.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: GRANT User Permissions to Create, Drop Alter all Objects is a schema

    What's the error?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: What is the best way to use LIKE in my situation

    Oh, and don't select *, specify just what columns you need from the PADQ table

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 2,296 through 2,310 (of 49,552 total)