--
You received this message because you are subscribed to the Google Groups "Sakai Production" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-production+unsubscribe@apereo.org.
To post to this group, send email to sakai-pr...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-production/.
Dear Mr. Qinsheng,THanks for quick response basically we deleted worksites from the front end but we want to remove sakai sites through hard delete via sql query. Do you have work site sql query for removing worksites in sakai.If you have please share i will be thankful.Thanks & Regards,DanishOn Tue, Mar 13, 2018 at 7:57 PM, Qinsheng Zhu <qs...@umich.edu> wrote:Danish,I think your remove uses DELETE. That won't reduce the datafile's size. If you know which tables the deletes are done, run the following SQLs and reduce the sizes the tables take first:alter table table_name enable row movement;alter table table_name shrink space;alter table table_name disable row movement;That will reset the high water mark of the tables and reduce the sizes of the tables take. After that, you should be able to resize the datafile or shrink the sizes of the tablespaces.You can rebuild the indexes online and make sure no performance issues.Hope that helps.Drew
On Tue, Mar 13, 2018 at 10:42 AM, Danish Khan <amdk...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.
--
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-producti...@apereo.org.
To post to this group, send email to sakai-pr...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-production/.
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+...@apereo.org.
--
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-production+unsubscribe@apereo.org.
To post to this group, send email to sakai-pr...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-production/.
--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+unsubscribe@apereo.org.
Hi Danish,
You can delete the rows which are not present in content_resource table:
select * from content_resource_body_binary
crb where not exists (select * from content_resource cr
where crb.resource_id=cr.resource_id); |
After checking everything and ensuring you will not lose anything, proceed with the delete of the rows.
I suggest moving the files to the disk, using the
"conver...@org.sakaiproject.content.api.ContentHostingService=true"
property, then delete all the contents of the "content_resource_body_binary"
table. This performs much better.
More info here https://jira.sakaiproject.org/browse/SAK-18389
Regards
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+...@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.
-- ----------------------------------------------- Miguel Pellicer CTO at EDF Website: https://www.edf.global LinkedIn: https://www.linkedin.com/in/mpellicer-edf Office Phone: +34 - 96 381 35 75 Requesting a meeting: https://calendly.com/mpellicer -----------------------------------------------
Hi Danish,
You can delete the rows which are not present in content_resource table:
select * from content_resource_body_binary crb where not exists (select * from content_resource cr where crb.resource_id=cr.resource_id);
After checking everything and ensuring you will not lose anything, proceed with the delete of the rows.
I suggest moving the files to the disk, using the "convertToFile@org.sakaiproject.content.api.ContentHostingService=true" property, then delete all the contents of the "content_resource_body_binary" table. This performs much better.
-- ----------------------------------------------- Miguel Pellicer CTO at EDF Website: https://www.edf.global
Dear Mr. Miguel,I really appreciated your response. We tried its remove data but it removes only "/group/006ad029-dc69-4913-964f-2f8419eaa9b9/3rd June plan.pptx" but its not deleting "/attachment/0065c2e3-2246-4520-a268-1a0dc0abc46b/Announcements/a175242b-8db3-4b94-be5f-d053d50feb40/QUIZ-2 on LMS.xlsx"I hope you understand this.Please help how can we remove other content also from " content_resource_body_binary ".Thanks & Regards,
Danish
On Fri, May 4, 2018 at 12:29 PM, Miguel Pellicer <mpellicer@entornosdeformacion.com> wrote:
Hi Danish,
You can delete the rows which are not present in content_resource table:
select * from content_resource_body_binary crb where not exists (select * from content_resource cr where crb.resource_id=cr.resource_id);
After checking everything and ensuring you will not lose anything, proceed with the delete of the rows.
I suggest moving the files to the disk, using the "conver...@org.sakaiproject.content.api.ContentHostingService=true" property, then delete all the contents of the "content_resource_body_binary" table. This performs much better.
select * from content_resource_body_binary crb where not exists (select * from content_resource cr where crb.resource_id=cr.resource_id); |
Hey Danish, you asked a question about delete rows from the "content_resource_body_binary" to free up some GB of space, I provided you examples and the correct documentation.
I think you're mixing stuff right now, because now you're talking about remove rows from "content_resource". Maybe you could identify the files from a particular site in the "content_resource" using a query like this:
SELECT * FROM sakaimaster.content_resource
where in_collection like '%SITE_ID%'; |
Deleting the content is dangerous and is up to you, these files
are referenced in other Sakai tables like assignment's
attachments, be careful if you don't want to have a bad day :S
Regards
Yeah, I trust you, the hard-delete operation may not clean the entire contents of the site, the contributors of the feature may clarify more what removes and what not.
https://jira.sakaiproject.org/browse/SAK-26217
The Jira says "In the future, this feature may be extended to also purge database content from tools." so probably the contents of the site in the several tool tables should be purged separately, same with attachments in the content_resource tables.
Regards