{"id":20244808,"url":"https://github.com/emergentsoftware/sql-server-database-delete-data-or-drop-objects","last_synced_at":"2026-03-19T14:50:19.076Z","repository":{"id":110143520,"uuid":"440897783","full_name":"EmergentSoftware/SQL-Server-Database-Delete-Data-or-Drop-Objects","owner":"EmergentSoftware","description":"This script allows the deletion of SQL Server table data without worrying about constraints by deleting in a specific table order. The script also allows you to delete any or all the SQL Server objects like tables, views, stored procedures, functions, user data types, sequences, and synonyms.","archived":false,"fork":false,"pushed_at":"2023-05-24T16:27:49.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-22T14:10:44.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmergentSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-22T15:12:28.000Z","updated_at":"2023-11-29T03:05:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf3a9b02-cb64-4c27-ad2a-c4cd3bf0fa0b","html_url":"https://github.com/EmergentSoftware/SQL-Server-Database-Delete-Data-or-Drop-Objects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EmergentSoftware/SQL-Server-Database-Delete-Data-or-Drop-Objects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergentSoftware%2FSQL-Server-Database-Delete-Data-or-Drop-Objects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergentSoftware%2FSQL-Server-Database-Delete-Data-or-Drop-Objects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergentSoftware%2FSQL-Server-Database-Delete-Data-or-Drop-Objects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergentSoftware%2FSQL-Server-Database-Delete-Data-or-Drop-Objects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmergentSoftware","download_url":"https://codeload.github.com/EmergentSoftware/SQL-Server-Database-Delete-Data-or-Drop-Objects/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergentSoftware%2FSQL-Server-Database-Delete-Data-or-Drop-Objects/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29013097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T12:48:30.580Z","status":"ssl_error","status_checked_at":"2026-02-02T12:46:38.384Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T09:17:30.527Z","updated_at":"2026-02-02T14:36:12.786Z","avatar_url":"https://github.com/EmergentSoftware.png","language":"TSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL-Server-Database-Delete-Data-or-Drop-Objects\n## Description\nThis script allows the deletion of SQL Server table data without worrying about constraints by deleting in a specific table order. The script also allows you to delete any or all the SQL Server objects like tables, views, stored procedures, functions, user data types, sequences, and synonyms.\n\n## Usage:\nUse the changeable variables to either delete table data or drop database objects.\n\n### Deleting Table Data\nTo delete all the rows in all the database tables set the variable `@DeleteData = 1`.\nIf you also want to reset all the identity columns so the next inserted row is 1, set the variable `@ReseedTableIdentity = 1`.\n\n### Dropping/Deleting Database Objects\nEach database object you might want to drop has its own variable. These variables names start with \"@Drop\" like `@DropTables`. So if you want to drop all the database tables you would set the variable `@DropTables = 1`.\n\n## Notes:\nThere is no need to set `@DeleteData = 1` if you are also setting @DropTables = 1. It will be extra unneeded work.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femergentsoftware%2Fsql-server-database-delete-data-or-drop-objects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femergentsoftware%2Fsql-server-database-delete-data-or-drop-objects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femergentsoftware%2Fsql-server-database-delete-data-or-drop-objects/lists"}