- Windows: PowerShell 5.0+ (included in Windows 10)
- macOS/Linux: PowerShell Core 6.0+ (Download)
- SQL Server 2012 or higher
- SQL Server Authentication or Windows Authentication
- Network access to SQL Server instances
- SELECT on source tables
- SELECT, INSERT, UPDATE, DELETE on target tables
- VIEW DEFINITION for schema information
# Clone from GitHub
git clone https://github.com/yourusername/SyncRay.git
cd SyncRay
# Or download and extract ZIP-
Copy the example configuration:
cp src/sync-config.example.json src/sync-config.json
-
Edit
src/sync-config.jsonwith your database details:{ "databases": { "source": { "server": "SERVER1\\INSTANCE", "database": "ProductionDB", "auth": "windows" }, "target": { "server": "SERVER2", "database": "TestDB", "auth": "sql", "user": "sa", "password": "your-password" } } }
Run validation to test your configuration:
# Windows
.\src\sync-export.ps1 -From source -Tables NonExistentTable
# macOS/Linux
pwsh src/sync-export.ps1 -From source -Tables NonExistentTableThis will validate your connection without exporting data.
- Use PowerShell or PowerShell ISE
- Windows Authentication works out of the box
- Use backslash for named instances:
SERVER\INSTANCE
- Install PowerShell Core first
- Use
pwshcommand instead ofpowershell - SQL Authentication recommended
- Forward slash for paths:
./src/sync-export.ps1
- Ensure container ports are exposed
- Use container name or IP as server
- SQL Authentication required
- Verify SQL Server is accessible:
Test-NetConnection -ComputerName servername -Port 1433 - Check firewall rules
- Verify SQL Server Browser service for named instances
- Try IP address instead of hostname
- Ensure user has required database permissions
- For Windows Auth, run PowerShell as the appropriate user
- Check SQL Server error logs for detailed messages
If scripts won't run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserAfter successful installation:
- Review Configuration Reference
- Try the Usage Examples
- Set up your table synchronization rules