csom – Is there an operation that changes the GUID of a SharePoint list to another value?

I have a CSOM application that I can use to access SharePoint lists.

I have edited a list https://mysharepoint.shareoint.local/sites/sc123/MyList with a GUID: 263FE49C-7FB3-4247-93CD-4AAB9770EF97

A few days later, the same list suddenly has a different GUID 7F1BA68C-8D94-48D7-BF97-AC5C6FF0665A.

I'm tracking list changes using the Change API, but I'm unlikely to be handling this particular event.

Are there operations where SharePoint lists can occur that change the GUID of a list?

What would be the Change API event that would cause this?

Powershell – You cannot call a method for an expression with zero value under: $ File = $ Web.GetFile ([Guid]$ Result.Id)

I asked AllDocs Table with powershell and can see GUID values ​​from Id, SiteId and WebId, But I get errors: You cannot call a method on Null valued expression at this line below: $File = $Web.GetFile((Guid)$Result.Id)

$Query = "SELECT * from AllDocs where SetupPath like '"+$SetupFile+"'"
$QueryResults = @(Run-SQLScript -SQLServer $Server -SQLDatabase $Database -SQLQuery $Query | select Id, SiteId, WebId)

write-host $QueryResults.Id -foregroundcolor green  // I can see GUID
write-host $QueryResults.SiteId -foregroundcolor green // I can See GUID
write-host $QueryResults.WebId -foregroundcolor green // I can see GUID

#Iterate through results
foreach ($Result in $QueryResults)
    if($Result.Id -ne $Null)
        $Site = Get-SPSite -Limit all | where { $_.Id -eq $Result.SiteId }
        $Web = $Site | Get-SPWeb -Limit all | where { $_.Id -eq $Result.WebId }       

        #Get the URL of the file which is referring the feature
        $File = $Web.GetFile((Guid)$Result.Id)   // Error on this line
        write-host "$($web.URL)/$($File.Url)" -foregroundcolor green


What is wrong?

boot – How can I physically see my GUID partition table (gpt) with hexdump?

The partition table cannot be in one partition because it describes where partitions are are. Instead, it's in a fixed location outside of partitions and usually doesn't have a file representation. You said you previously looked at the "master boot record" of the hard drive – you have to use the same method to look at the GPT.

The MBR is in the 1st sector of the hard disk (LBA 0); Even GPT hard drives still have a "protective" MBR in this area. (The first 440 bytes of the MBR are used to store the start code, but the remaining 72 bytes contain partition entries, so you actually looked at them a Partition table already.)

Likewise the GPT starts on the 2nd sector of the hard disk (LBA 1) and continues for 33 sectors or so. (The minimum required is 16 KiB, ignoring the header itself. This already fits 128 entries, so longer GPTs are probably rare.)

The following tools can be particularly useful on Linux:

# head -c 512 /dev/sda | hexdump -C
# dd if=/dev/sda bs=512 skip=1 count=32 | hexdump -C
# xfs_io -r -c "pread -v 512 16384" /dev/nvme0n1

Note that the exact location of the primary GPT depends on the logical sector size of the disk. Most disks use 512 byte sectors. However, if it is a "4K-native" data carrier, the GPT also starts at byte 4096 and not at byte 512. Adjust the commands accordingly. (You will know that you found it when the dates start with EFI PART in ASCII.)

C # – Get an application's GUID programmatically

Fascinated by the events that were recorded here (too Here and here) I saw the inherent benefit in having a program specific GUID available. The SO answers that were correct seemed somewhat closely linked and detailed. So I started making my own for use. Looking for a criticism of the idea itself as well as maintainability, performance etc. Improvements are welcome.

public static class AssemblyExtensions
    /// The  for the entry assembly lazily gotten as a  if it exists,
    ///  otherwise.
    private static readonly Lazy _MyGuid = new Lazy(() => Assembly.GetEntryAssembly().GetGuid());

    /// Lazily gets the  for the entry assembly as a  if it exists,
    ///  otherwise.
    /// The  for the entry assembly as a  if it exists,
    ///  otherwise.
    public static Guid GetMyGuid() => _MyGuid.Value;

    /// Gets the  for the given assembly as a  if it exists,
    ///  otherwise.
    /// The assembly.
    /// The  for the given assembly as a  if it exists,
    ///  otherwise.
    public static Guid GetGuid(this Assembly assembly) => Guid.TryParse(
        ((GuidAttribute)assembly?.GetCustomAttributes(typeof(GuidAttribute), false).SingleOrDefault())?.Value,
        out Guid guid) ? guid : Guid.Empty;

Partitioning – SQL Server partition. How would the division of the range work with Guid?

My database contains a very large table and a GUID column named Group_Id. This group_Id has a fairly even division of data, and it would be beneficial to partition the table after that column.

I've created the partition function and the partition scheme, and each time you add a new group to the table, split the area to the new Group_Id. Usually, this process is fast. However, I've noticed that partitioning the partitions while using the table (I'm doing jobs that do many reads / writes at once) takes a LONG of time. How can I speed up the SPLIT RANGE operation?

I know that conventional wisdom says I should increase ints and split the new int-ID correctly. Would this solve my problem?

What happens when I split up? I thought since all Guids live on one edge in the partition, it would not need to move any data, it just needs to insert the new area

Get the GUID of a document with REST

Check if this is the GUID you are looking for.

This example uses the ID property, but every fetch should work.


Returned JSON (GUID is in metadata section)

    "odata.metadata": "https://yourServer/sites/yourSite/_api/$metadata#SP.ListData.Shared_x0020_DocumentsItems/@Element&$select=id",
    "odata.type": "SP.Data.Shared_x0020_DocumentsItem",
    "odata.id": "9b85f08e-1484-43f0-be5d-83861ca77415",
    "odata.etag": ""22"",
    "odata.editLink": "Web/Lists(guid'c8612335-fb7e-4edf-bf1d-b9186a8b987b')/Items(1)",
    "Id": 1,
    "ID": 1

First EF-Concurrency-Token with Guid

I'm trying to use a Guid as a concurrency token, but every time I try to insert a record, there is an exception that the null value can not be added.

Generated SQL and exception message:

Failed executing DbCommand (4ms) (Parameters=(@p0='?' (DbType = Guid), @p1='?' (Size = 10) (DbType = AnsiString), @p2='?' (Size = 150) (DbType = AnsiString)), CommandType='Text', CommandTimeout='30')
INSERT INTO (Application) ((Id), (Code), (Name))
VALUES (@p0, @p1, @p2);
SELECT (Version)
FROM (AspNetApplication)
WHERE @@ROWCOUNT = 1 AND (Id) = @p0; System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Version', table 'MyCompany.dbo.Application'; column does not allow nulls. INSERT fails.
public class Application
        public Guid Id { get; set; }

        public string Name { get; set; }

        public string Code { get; set; }

        // A concurrency token for use with the optimistic concurrency checking
        public Guid Version { get; set; }

With the Model Builder:

builder.Property(c => c.Version)

Basically, I need advice on what I'm doing wrong.