2023-12-30 21:40:27 +00:00
# SQL Dump Splitter
## Overview
2023-12-30 21:51:58 +00:00
This project offers tools to split a large SQL dump file into individual files for each database. It includes both a Python script and a Windows batch file to accommodate different user preferences and environments. The tools are designed to efficiently process SQL dumps, identify different databases, and create separate SQL files for each database.
2023-12-30 21:40:27 +00:00
## Features
2023-12-30 21:51:58 +00:00
- **Multiple Script Options**: Python script for versatility and a Windows batch file for ease of use in Windows environments.
2023-12-30 21:40:27 +00:00
- **Database Identification**: Automatically detects different databases within a SQL dump.
- **File Creation**: Generates separate SQL files for each database.
2023-12-30 21:51:58 +00:00
- **User-Friendly**: Easy to use, catering to both Python and non-Python users.
2023-12-30 21:40:27 +00:00
## Getting Started
### Prerequisites
2023-12-30 21:51:58 +00:00
- Python 3.x (for the Python script)
- Windows OS (for the batch file)
2023-12-30 21:40:27 +00:00
### Installation
2023-12-30 21:51:58 +00:00
No additional installation is required for running these scripts, as they use standard libraries and Windows commands.
2023-12-30 21:40:27 +00:00
### Usage
2023-12-30 21:51:58 +00:00
#### Using the Python Script
1. Place the SQL dump file in the same directory as the script or specify the file path.
2. Run the script using Python:
2023-12-30 21:40:27 +00:00
```bash
python sql_dump_splitter.py
2023-12-30 21:51:58 +00:00
```
2023-12-30 22:27:20 +00:00
#### Using the Batch File
2023-12-30 21:51:58 +00:00
Ensure the SQL dump file is in the same directory as the batch file.
Simply double-click the batch file or run it in a command prompt:
```bash
sql_dump_splitter.bat
```
Both scripts will create separate SQL files for each database in the dump.
2023-12-30 21:40:27 +00:00
### Contributing
Contributions to the SQL Dump Splitter are welcome! Feel free to fork the repository and submit pull requests.
2023-12-30 22:26:07 +00:00
### Acknowledgements
Part of these scripts may have been created using LLMs such as ChatGPT or Google's Bard.