{"id":16567283,"url":"https://github.com/chadbaldwin/workloadtools-bootstrap","last_synced_at":"2026-02-10T10:34:35.286Z","repository":{"id":133322683,"uuid":"507133940","full_name":"chadbaldwin/WorkloadTools-Bootstrap","owner":"chadbaldwin","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-21T15:22:20.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-03T08:41:37.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chadbaldwin.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-06-24T20:17:44.000Z","updated_at":"2024-05-17T22:47:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"20356a4b-7a0f-4e91-ab92-59b64b130b12","html_url":"https://github.com/chadbaldwin/WorkloadTools-Bootstrap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chadbaldwin/WorkloadTools-Bootstrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FWorkloadTools-Bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FWorkloadTools-Bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FWorkloadTools-Bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FWorkloadTools-Bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chadbaldwin","download_url":"https://codeload.github.com/chadbaldwin/WorkloadTools-Bootstrap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chadbaldwin%2FWorkloadTools-Bootstrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29297208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T09:11:24.369Z","status":"ssl_error","status_checked_at":"2026-02-10T09:10:47.789Z","response_time":65,"last_error":"SSL_read: 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-10-11T21:06:12.099Z","updated_at":"2026-02-10T10:34:35.247Z","avatar_url":"https://github.com/chadbaldwin.png","language":"Dockerfile","readme":"# Getting Started\n\nThe goal of this solution is to set up a working demonstration of [spaghettidba's WorkloadTools](https://github.com/spaghettidba/WorkloadTools) in action, specifically realtime replay between two SQL Server instances.\n\nTo make this as simple as possible, we're going to use Docker, Docker Compose and Dockerfiles's.\n\nAll of the commands listed are assumed to be run at the root of this repository\n\n----\n\n## Installing WorkLoadTools\n\n```pwsh\n### Create a new downloads directory to store downloaded files in (this directory is already ignored in the repository)\nNew-Item -Name downloads -ItemType Directory -Force\n\n### Download the installer from GitHub referencing the latest (as of this writing) release:\niwr -Uri 'https://github.com/spaghettidba/WorkloadTools/releases/download/v1.5.17/WorkloadTools_x64.exe' -OutFile '.\\downloads\\WorkloadTools_x64.exe'\n\n### Install WorkloadTools\n.\\downloads\\WorkloadTools_x64.exe /install /passive /norestart\n\n### Add WorkloadTools to your path variable\n[Environment]::SetEnvironmentVariable(\"PATH\", $Env:Path + ';C:\\Program Files\\WorkloadTools', [EnvironmentVariableTarget]::Machine)\n```\n\n----\n\n## Setting up the environment in Docker\n\nFirst, build the Docker image, which uses the SQL Server on Linux image, and loads the WideWorldImporters databsae backup so it can be restored.\n\nBuild the image using:\n\n```plaintext\ndocker build -t wwisql .\\docker\\\n```\n\nIt will take a minute or two for it to download the dependencies and build the image.\n\nNow we've got an image ready to go. When used, It will spin up an instance of SQL Server and automatically restore the WideWorldImporters database.\n\nIn order to set up realtime replay, we need to get two instances running...One to be our \"source\" instance where WorkLoadTools will record the events from, and one to be our \"target\" instance for WorkLoadTools to replay the events back to.\n\nBe careful running this locally, as it can easily suck up RAM if you're not careful. I've configured the docker-compose file to limit the containers to 2GB of RAM...but other underlying processes may try to steal more than that.\n\nStart up the environment using:\n\n```plaintext\ndocker-compose up -d --remove-orphans\n```\n\nThis will create two separate instances of SQL Server. Both are accessible locally:\n\n* Username: `sa`\n* Password: `yourStrong(!)Password`\n* Source: `localhost:1433` (default port)\n* Target: `localhost:2433`\n  * Just a note, if you are trying to specify a non-default port within a connection string, or in SSMS, make sure you specify it using a comma like this `localhost,2433`. Don't let that one bite you, cause it will.\n\nWait a few mintues for the instances to spin up and restore the databases. You can log into them using SSMS and run some simple queries against the `WideWorldImporters` database to make sure it's all up and running.\n\n----\n\n## Setting up realtime replay\n\nOnce it's ready, it's time to start replaying events. WorkloadTools makes this extremely easy. You configure a .json file with the source and target(s), and it's as simple as this:\n\n```plaintext\nSqlWorkload -F .\\sqlworkload\\SqlWorkload_RealtimeReplay.json\n```\n\nThat's it. As long as you don't see any error messages up to this point, SqlWorkload should be syncing events in realtime from the source instance on port 1433 to the target instance on port 2433.\n\nTry running some simple queries just to see them syncing over.\n\n----\n\n## Mocking activity using SQLQueryStress\n\nThe WideWorldImporters database has various stored procedures that can be used to generate data for the database. However, I found that when trying to run the suggested proc from Microsoft (`DataLoadSimulation.PopulateDataToCurrentDate`), I found that SqlWorkload sat, waited, recorded events...but did not replay them until I stopped the execution of the stored procedure.\n\n\u003e ##TODO - Need to look into the other DataLoadSimulation stored procedures to see if any could be used directly to help mock events on the Source instance. And/Or if we need to run them via SQLQueryStress\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadbaldwin%2Fworkloadtools-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchadbaldwin%2Fworkloadtools-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchadbaldwin%2Fworkloadtools-bootstrap/lists"}