microsoft / sql-server-samples

Azure Data SQL Samples - Official Microsoft GitHub Repository containing code samples for SQL Server, Azure SQL, Azure Synapse, and Azure SQL Edge
Other
10.07k stars 8.88k forks source link

Database copy won't be deleted #333

Open candice-chang opened 7 years ago

candice-chang commented 7 years ago

Hi, I set up the ExportSqlDbToStorage job and ExportSqlDbBlobRetention job to be automatically run ever night. Sometime the copy of the database won't be deleted after the entire job was done. It happens several times that 'ExportSqlDbToStorage' job just restarted by itself while copying or exporting and left the copied database in the storage, and then I have to manually delete the database copy by myself. This happens 3-5 time every month. If the job restart, the new created database copy will be deleted successfully after export, since the old copy wasn't in the array anymore, it won't get deleted. I am not sure what cause the job to restart, sometime it will show an error saying 'unable to connect to the server', sometime there is no error or warning. Any ideas? Thanks. 2017-11-15 11_36_28-

--The ExportSqlDbToStorage job is azure-automation-automated-export/AutoExport.ps1 https://github.com/Microsoft/sql-server-samples/blob/master/samples/manage/azure-automation-automated-export/AutoExport.ps1

jodebrui commented 7 years ago

Could you clarify which sample you are using?

From: candice-chang [mailto:notifications@github.com] Sent: Wednesday, November 15, 2017 11:44 AM To: Microsoft/sql-server-samples sql-server-samples@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Microsoft/sql-server-samples] Database copy won't be deleted (#333)

Hi, I set up the ExportSqlDbToStorage job and ExportSqlDbBlobRetention job to be automatically run ever night. Sometime the copy of the database won't be deleted after the entire job was done. It happens several times that 'ExportSqlDbToStorage' job just restarted by itself while copying or exporting and left the copied database in the storage, and then I have to manually delete the database copy by myself. This happens 3-5 time every month. If the job restart, the new created database copy will be deleted successfully after export, since the old copy wasn't in the array anymore, it won't get deleted. I am not sure what cause the job to restart, sometime it will show an error saying 'unable to connect to the server', sometime there is no error or warning. Any ideas? Thanks. [2017-11-15 11_36_28-]https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F27383786%2F32856654-3bce557a-c9fa-11e7-94ec-d016abd30cd0.png&data=02%7C01%7Cjodebrui%40microsoft.com%7Cb7ec6c9e5cf24ff40ea308d52c6138ee%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463718434730633&sdata=VjMLWjzQMMcd%2Brwq%2FjgUXc9ZSgeXYwuY40EqBfPLF2s%3D&reserved=0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fissues%2F333&data=02%7C01%7Cjodebrui%40microsoft.com%7Cb7ec6c9e5cf24ff40ea308d52c6138ee%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463718434730633&sdata=tSPj5L3bD1Ga85sNrbJQv4drrc38cMlpO3OB40h9q68%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMuA9qwcZq7c92KsTPU-AYqGeYMSQlEKks5s2z8BgaJpZM4Qfd0L&data=02%7C01%7Cjodebrui%40microsoft.com%7Cb7ec6c9e5cf24ff40ea308d52c6138ee%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463718434730633&sdata=hrpt%2BjtoO%2BaD4zWADn5e09ldL0n00xc175YESkHTweI%3D&reserved=0.

candice-chang commented 7 years ago

Hi @jodebrui , Sorry for the confusion. The ExportSqlDbToStorage job is azure-automation-automated-export/AutoExport.ps1 https://github.com/Microsoft/sql-server-samples/blob/master/samples/manage/azure-automation-automated-export/AutoExport.ps1 Thanks.

jodebrui commented 7 years ago

Thanks. I’ll have the owner of the sample take a look and get back.

From: candice-chang [mailto:notifications@github.com] Sent: Wednesday, November 15, 2017 3:08 PM To: Microsoft/sql-server-samples sql-server-samples@noreply.github.com Cc: Jos de Bruijn jodebrui@microsoft.com; Mention mention@noreply.github.com Subject: Re: [Microsoft/sql-server-samples] Database copy won't be deleted (#333)

Hi @jodebruihttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjodebrui&data=02%7C01%7Cjodebrui%40microsoft.com%7C14f702b68ba644b75bd308d52c7dbaaa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463840872399766&sdata=SI70oi4DWzBpFusyhsqnjP7jAaeiEf8LQcBGTxRqoVM%3D&reserved=0 , Sorry for the confusion. The ExportSqlDbToStorage job is azure-automation-automated-export/AutoExport.ps1 https://github.com/Microsoft/sql-server-samples/blob/master/samples/manage/azure-automation-automated-export/AutoExport.ps1https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fblob%2Fmaster%2Fsamples%2Fmanage%2Fazure-automation-automated-export%2FAutoExport.ps1&data=02%7C01%7Cjodebrui%40microsoft.com%7C14f702b68ba644b75bd308d52c7dbaaa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463840872399766&sdata=xgg%2BEu23A3HTgO9xzUkpB6jSzy3Q%2BRrkFhBhnX%2B3YR8%3D&reserved=0 Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fissues%2F333%23issuecomment-344759790&data=02%7C01%7Cjodebrui%40microsoft.com%7C14f702b68ba644b75bd308d52c7dbaaa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463840872399766&sdata=bFhTLjiefTYqar5aW3NICSU4wxvstcB%2F5M%2BM70y9jIs%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMuA9nNC6rfR_tYnUnxFqIhwY_wIB0auks5s227UgaJpZM4Qfd0L&data=02%7C01%7Cjodebrui%40microsoft.com%7C14f702b68ba644b75bd308d52c7dbaaa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636463840872399766&sdata=3zW7Cuv%2BNsWTF1DRrZIarcMIvVAfRFrmfEL6T9qE0rA%3D&reserved=0.