Erland Sommarskog

My feedback

  1. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  2. 4 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  3. 8 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog supported this idea  · 
    An error occurred while saving the comment
    Erland Sommarskog commented  · 

    Here is a repro for the bug:
    CREATE TABLE TM5ProjectProperty_history (id int NOT NULL,
    property varchar(40) NOT NULL,
    value sql_variant NULL,
    SysStartTime datetime2(0) NOT NULL,
    SysEndTime datetime2(0) NOT NULL,
    )

    CREATE TABLE TM5ProjectProperty (id int NOT NULL,
    property varchar(40) NOT NULL,
    value sql_variant NULL,
    SysStartTime datetime2(0) GENERATED ALWAYS AS ROW START NOT NULL,
    SysEndTime datetime2(0) GENERATED ALWAYS AS ROW END NOT NULL,
    PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime),
    CONSTRAINT pk_TM5ProjectProperty PRIMARY KEY (id, property)
    )
    WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.TM5ProjectProperty_history))

    CREATE CLUSTERED INDEX history_table_ix ON TM5ProjectProperty_history(SysStartTime, SysEndTime)
    CREATE INDEX pk_ix ON TM5ProjectProperty_history (id, property, SysStartTime, SysEndTime)
    go

    CREATE TABLE #prop (id int NOT NULL, property varchar(40) NOT NULL, value sql_variant NULL, PRIMARY KEY (id, property))
    INSERT #prop(id, property, value)
    SELECT /* TOP (10) */ object_id, name, system_type_id
    FROM sys.columns
    go
    MERGE TM5ProjectProperty a
    USING #prop p ON p.id = a.id AND a.property = p.property
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (id, property, value)
    VALUES (p.id, p.property, p.value)
    WHEN MATCHED AND a.value <> p.value THEN
    UPDATE
    SET a.value = p.value
    ;

    go
    ALTER TABLE TM5ProjectProperty SET (SYSTEM_VERSIONING = OFF)
    DROP TABLE TM5ProjectProperty
    DROP TABLE TM5ProjectProperty_history
    DROP TABLE #prop

  4. 551 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    27 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 72

    <=-=Mar 10 2016 11:26AM=-=>

    It’s a shame that this was submitted as just a “suggestion”. It should actually be listed as a “bug” because there’s only a comparatively small set of use cases where enumeration of the result set of elements is not important.

    <=-=Mar 11 2016 12:47PM=-=>

    I agree that an order column is required; one example use case is where two lists are passed in, and ordinal positions in one list correspond to positions in the other.

    <=-=Mar 11 2016 3:12PM=-=>

    Please see the related suggestion: STRING_SPLIT needs “RemoveEmptyEntries” option, like String.Split in .NET ( https://connect.microsoft.com/SQLServer/feedback/details/2462002/ ).

    <=-=Mar 12 2016 12:02PM=-=>

    This kind of function is primarily needed for de-serializing previously serialized arrays of values of any type format-able as text.
    I therefore recommend to have the result set of this function work excellent with this use-case.

    With de-serialized arrays there is a need to…

    Erland Sommarskog supported this idea  · 
  5. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  6. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Setup + Deployment  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  7. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  8. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  9. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  10. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Erland Sommarskog commented  · 

    It could be argued that the call could be wrapped in an EXECUTE AS statement and REVERT. However, an error may occur during execution of the procedure, so that the REVERT statement is not executed, which can lead to confusion if you don't observe that you are the impersonated user.

    Erland Sommarskog supported this idea  · 
  11. 262 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    17 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog supported this idea  · 
  12. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  13. 131 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    8 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog supported this idea  · 
  14. 6 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  15. 1 vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  16. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog supported this idea  · 
  17. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 1

    <=-=Mar 25 2016 6:11AM=-=>

    Due to a Connet layout bug I’m repeating the text here:

    Restoring a database restores the log files to their original size. This can take a long time if the production logs are big.

    When restoring a prod database to a staging or development instance we usually do not care about the log chain at all. The RESTORE command should have an option RESET_LOG = ON that causes RESTORE to not restore logs at all. Instead, a 1MB empty log file would be created and the database switched to the SIMPLE recovery model.

    Erland Sommarskog supported this idea  · 
  18. 90 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  SQL Server » Suggestions  ·  Flag idea as inappropriate…  ·  Admin →

    Upvotes: 60

    <=-=Mar 29 2017 11:32PM=-=>

    Just wanted to add that both Oracle and DB2 seem to support this feature:

    http://docs.oracle.com/database/122/SQLRF/LAG.htm#SQLRF00652
    https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1513.htm

    Cheers,
    Itzik

    <=-=Apr 16 2017 10:08PM=-=>

    That last IBM link was for Informix!

    The DB2 link is https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0023461.html

    <=-=Jul 4 2017 3:30AM=-=>

    Thanks for reporting this request.
    It is in our backlog, and we have planned to do something like this, but we cannot confirm when it would be completed.

    Jovan

    <=-=Jul 10 2017 11:54AM=-=>

    Thanks, Jovan; good to hear.

    Erland Sommarskog supported this idea  · 
  19. 2 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
  20. 3 votes
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Server » Bugs  ·  Flag idea as inappropriate…  ·  Admin →
    Erland Sommarskog shared this idea  · 
← Previous 1 3 4 5 6

Feedback and Knowledge Base