Recommendations about deleting large set of rows in MSSQL

I need to delete about 75+ million rows from a table everyday that contains around 3.5 billions of record.

Database recovery mode is simple, I have writen a code that deletes 15.000 rows in a while condition until all 75M records is deleted. (i use batch delete due to log file grow) However, with current deletion speed it looks like it will take at least 5 days, which means that amount of data required to be deleted is multiply faster than my deletion speed.

Basically what i’m trying to do is summarizing (in another table) and deleting data older than 2 months. There is no update operation in that table, only insert and delete.

I have an enterprise edition of MSSQL 2017

Any suggestions will be welcome.

Deleting OpenAL Effects

When calling alDeleteEffects to destroy an effect, is it necessary to first remove it from any auxiliary slots that it may be active in?

I know first removing a buffer from a source is necessary, which makes sense, but I saw no mention of it in the Effects Extension Guide to indicate either way for effects. It seems that effects are more of a state change rather than used actively like a buffer, as any parameter changes require resetting the effect in the slot, so I am leaning towards “no”, but wanted to be sure.

We’re deleting stale AD accounts for a company but owner wants to see the network files of AD users before deciding which accts to delete

We are deleting stale AD accounts for the companies we work for.

I contacted the owner of a particular company to help us determine which AD accounts we can delete. He said he’d first like to see what files the deletion candidates have stored on the network to help decide which accounts are OK to delete.

We have a domain admin account. Is there a way to access AD User files? Is there a PowerShell command (or GUI app) to list the files of each AD user in a clean/presentable format that we could present to the owner?

I think he’s only really concerned with the contents of each user’s Home directories (the directories containing the Documents, Music etc. folders) — and not network shares or shared folders users may happen to have access to — because the Home directories are the only directories risking deletion as a result of deleting their accounts, right?

Deleting multiple items in a shopping cart efficiently

My boss is insistent we need to build functionality to allow users to delete multiple items out of their shopping cart at once (e.g., checkboxes, with a “Select All” button/link, and “Delete” at the top and bottom of pages).

Currently we have the far more typical “Delete” option at the item/product level.

I’ve researched dozens of competitor carts and not one offers delete-multiple-items-at-once functionality. Edit: AmazonSupply does this, but at the expense of line-item delete.

I’d love to be able to push back on this and prove it’s a bad user experience – but honestly the requestor is so adamant about it it’s probably an unwinnable discussion.

Anyway does anyone have examples of good implementations of this functionality? It seems like it’s going to add a lot of clutter and visual noise and overall is an atypical implementation. Our site has some “Save for Later” functionality multi-select might be beneficial for, but overall I’m concerned about implementing it as it doesn’t seem widely done.

Anyway if anyone has good examples of multi-select delete/save in Shopping Carts — or compelling articles why that functionality shouldn’t be used for me to try to beat the requirement back with any help would be appreciated — thanks!

Can’t boot windows after deleting Ubuntu partition?

Linux newb.
A while ago I ran Ubuntu from a usb to test out some stuff. I now need Ubuntu so wanted to install it properly.
On windows 7 I deleted the partition that would’ve contained Ubuntu (only one without nstf) and then tried resizing my C: drive to make space for Ubunutu.
I then had to restart my pc. When I did it loaded to grub rescue. I haven’t been able to figure this out from here.
I got Ubuntu running on the usb again but can’t get the partitioning to work right (I think)
I can’t lose my windows data and want dual boot.
Help please. 🙂

Deleting Windows 10 partition while using Ubuntu 18.04

I installed Ubuntu 18.04 LTS on my machine alongside Windows 10.

I selected the “Install Ubuntu alongside Windows” option when installing, and when I deleted my Windows partition in Ubuntu’s Disk Utility and restarted, I was met with Windows 10’s recovery screen.

I am unable to boot to Ubuntu. Is my Ubuntu partition still there? Booting from the BIOS only leads to a black screen. Any help will be appreciated. Thank you very much.

Deleting over 5000 items SharePoint Online Powershell

I’m trying to delete about a million items from a SharePoint Online Library. I believe the code below (found on the web) batches this to <5000 items but it still fails with error: Error Deleting List Items! Exception calling “ExecuteQuery” with “0” argument(s): “The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.”

Its using CAML but I think its deleting one file at a time? I can’t even delete the library! Any ideas on why ?

#Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"  #Config Parameters $  SiteURL= "https://mysite/sites/subsite" $  ListName="Mylist" $  BatchSize = 500  #Setup Credentials to connect $  Cred = Get-Credential $  Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($  Cred.UserName,$  Cred.Password)  Try {     #Setup the context     $  Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($  SiteURL)     $  Ctx.Credentials = $  Cred      #Get the web and List     $  Web=$  Ctx.Web     $  List=$  web.Lists.GetByTitle($  ListName)     $  Ctx.Load($  List)     $  Ctx.ExecuteQuery()     Write-host "Total Number of Items Found in the List:"$  List.ItemCount      #Define CAML Query     $  Query = New-Object Microsoft.SharePoint.Client.CamlQuery     $  Query.ViewXml = "<View><RowLimit>$  BatchSize</RowLimit></View>"      Do {          #Get items from the list in batches         $  ListItems = $  List.GetItems($  Query)         $  Ctx.Load($  ListItems)         $  Ctx.ExecuteQuery()          #Exit from Loop if No items found         If($  ListItems.count -eq 0) { Break; }          Write-host Deleting $  ($  ListItems.count) Items from the List...          #Loop through each item and delete         ForEach($  Item in $  ListItems)         {             $  List.GetItemById($  Item.Id).DeleteObject()         }         $  Ctx.ExecuteQuery()      } While ($  True)      Write-host -f Green "All Items Deleted!" } Catch {     write-host -f Red "Error Deleting List Items!" $  _.Exception.Message } 

409 conflict error when deleting multiple attachments using PnP js or REST

I am trying to delete multiple attachments from list item as below

private _deleteOneByOneAttachment(ln: string, id: any, file: any):Promise<any>{     let item = sp.web.lists.getByTitle(ln).items.getById(id);     return item.attachmentFiles.getByName(file).delete().then(v => {         return v;     }) as Promise<any>;   } 

I am calling above function in promise.all

    b.Files.forEach(k=>{              delArray.push(this._deleteOneByOneAttachment(this.state.appsUsedByStateList,b.ID,k));                     });  Promise.all(delArray) 

if there 4 attachments to delete then 2 are getting deleted and remaining it is giving conflict error, 409.

What is the right way to delete attachments from list item

Deleting list items with ProcessBatchData using PowerShell

I am trying to delete items in bulk and keep getting this error message:

<Results><Result ID="" Code="-2130575312"> <ErrorText>Invalid file name.  The file name you specified could not be used.  It may be the name of an existing file or directory, or you may not have permission to access the file.</ErrorText></Result> <Result ID="" Code="-2147023673"> <ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x800704c7)</ErrorText></Result> <Result ID="" Code="-2147023673"> 

here is my batch xml:

<?xml version="1.0" encoding="UTF-8"?> <Batch>   <Method>     <SetList>fe8ac4a1-c326-4a89-83ec-0793cdee943e</SetList>     <SetVar Name="ID">1</SetVar>     <SetVar Name="Cmd">Delete</SetVar>   </Method>   <Method>     <SetList>fe8ac4a1-c326-4a89-83ec-0793cdee943e</SetList>     <SetVar Name="ID">3</SetVar>     <SetVar Name="Cmd">Delete</SetVar>   </Method> </Batch> 

I used the code from here: