### Restore and Build Project Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/CONTRIBUTING.md Use these commands to restore dependencies and build the solution. Ensure the .NET SDK is installed. ```bash dotnet restore SqlDataBridge.sln dotnet build SqlDataBridge.sln ``` -------------------------------- ### Export and Import SQL Server Data Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Quickstart example demonstrating how to export data from a SQL Server database to a SQLite file and then import it into another SQL Server instance. Ensure target tables exist and are empty before importing. ```csharp using Zachtbeer.SqlDataBridge; var packagePath = "database.sqlite"; await SqlDataBridge.ExportAsync(sourceSqlServerConnectionString, packagePath); await SqlDataBridge.ImportAsync(packagePath, targetSqlServerConnectionString); ``` -------------------------------- ### Install SqlDataBridge Package Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Use this command to add the SqlDataBridge NuGet package to your .NET project. Drop the `--prerelease` flag when the stable release is available. ```bash dotnet add package Zachtbeer.SqlDataBridge --prerelease ``` -------------------------------- ### Manage NuGet Cache Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/RELEASE.md Clear all local NuGet caches. This is useful before installing a newly built package to ensure you are testing the correct version. ```bash dotnet nuget locals all --clear ``` -------------------------------- ### Export Data and Get Summary Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Export a subset of data from SQL Server and receive a summary of the operation, including the number of rows and tables exported. The result is an SQLite file. ```csharp var result = await SqlDataBridge.ExportAsync(sourceSqlServerConnectionString, "billing-repro.sqlite"); Console.WriteLine($"Exported {result.RowCount} rows from {result.TableCount} tables."); // Exported 48,213 rows from 7 tables. ``` -------------------------------- ### Configure and Run Sample Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.Sample/README.md Set connection strings for source and target SQL Server instances, and the package path, using environment variables before running the sample project. ```bash export ZSB_SOURCE_SQLSERVER="Server=localhost;Database=SourceDb;User Id=sa;Password=...;TrustServerCertificate=True" export ZSB_TARGET_SQLSERVER="Server=localhost;Database=TargetDb;User Id=sa;Password=...;TrustServerCertificate=True" export ZSB_PACKAGE_PATH="package.sqlite" dotnet run --project samples/SqlDataBridge.Sample/SqlDataBridge.Sample.csproj ``` -------------------------------- ### Build and Test Project Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/RELEASE.md Restore dependencies, build the project in Release configuration, and run tests. Ensure no-restore is used for build after initial restore. ```bash dotnet restore SqlDataBridge.sln dotnet build SqlDataBridge.sln --configuration Release --no-restore dotnet test SqlDataBridge.sln --configuration Release --no-build ``` -------------------------------- ### Set Environment Variables and Run Workflow Sample Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.WorkflowSample/README.md Configure connection strings for source and target SQL Server instances, and specify the package path using environment variables before running the workflow sample. Ensure the target SQL Server tables exist and are empty prior to import. ```bash export ZSB_SOURCE_SQLSERVER="Server=localhost;Database=SourceDb;User Id=sa;Password=...;TrustServerCertificate=True" export ZSB_TARGET_SQLSERVER="Server=localhost;Database=TargetDb;User Id=sa;Password=...;TrustServerCertificate=True" export ZSB_PACKAGE_PATH="workflow-sample.sqlite" dotnet run --project samples/SqlDataBridge.WorkflowSample/SqlDataBridge.WorkflowSample.csproj ``` -------------------------------- ### Run Full Test Suite Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/CONTRIBUTING.md Execute all tests in the solution. This command runs the complete test suite, including integration and unit tests. ```bash dotnet test SqlDataBridge.sln ``` -------------------------------- ### Enable Dacpac Deployment of Users and Permissions Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Configure Dacpac deployment to include users, logins, permissions, and role membership. Opt in only when the target environment should receive these security objects from the dacpac. ```csharp var options = new ImportOptions { SchemaDeploymentMode = SchemaDeploymentMode.DeployDacpac, DacpacDeploymentOptions = new DacpacDeploymentOptions { DeployUsers = true, DeployPermissions = true, DeployRoleMembership = true } }; ``` -------------------------------- ### Generate API Metadata with DocFX Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/api/index.md Use these commands to restore the DocFX tool and then run it to generate API metadata based on your configuration. ```bash dotnet tool restore dotnet tool run docfx metadata docfx.json ``` -------------------------------- ### Verify Build Provenance with GitHub CLI Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Use this command to verify the signed build provenance attestation for a release build. Ensure you have downloaded the package, provenance bundle, and SBOM from the GitHub release. ```bash gh attestation verify .nupkg \ --repo zachtbeer-labs/sqldatabridge \ --bundle provenance.intoto.jsonl ``` -------------------------------- ### Pack NuGet Package Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/RELEASE.md Restore tools, generate metadata, and pack the project into a NuGet package with specific version information. The output directory is set to 'release-packages'. ```bash dotnet tool restore dotnet tool run docfx metadata docfx.json dotnet pack src/SqlDataBridge/SqlDataBridge.csproj --configuration Release --no-build --output release-packages /p:Version=1.0.0 /p:PackageVersion=1.0.0 /p:InformationalVersion=1.0.0 ``` -------------------------------- ### Run Fuzzing Tests Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/CONTRIBUTING.md Execute fuzzing tests to check for robustness against randomized input. No Docker or SQL Server is required for these tests. ```bash dotnet test tests/SqlDataBridge.Fuzzing/SqlDataBridge.Fuzzing.csproj ``` -------------------------------- ### ImportOptions Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/API.md `ImportOptions` configures table selection, import filters, batching, progress, timeouts, data table naming, and optional dacpac behavior. ```APIDOC ## ImportOptions ### Description Configures options for importing data, including table selection, filters, batching, and timeouts. ### Usage Instantiate `ImportOptions` to customize the import process. ``` -------------------------------- ### View SQLite Tables Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md List all tables within an exported SQLite database file using the `sqlite3` command-line tool. ```text $ sqlite3 billing-repro.sqlite ".tables" zsb_columns zsb_export_runs zsb_table_stats zsb_data_dbo__customers zsb_exclusions zsb_import_plan zsb_tables zsb_data_dbo__invoices zsb_warnings zsb_schema_packages zsb_data_dbo__orders ``` -------------------------------- ### Configure Dacpac Deployment Options Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Adjust DacpacDeploymentOptions such as AllowIncompatiblePlatform to false to prevent deployment on incompatible platforms. DacpacDeploymentOptions are initialized to defaults, so fields can be adjusted directly. ```csharp importOptions.DacpacDeploymentOptions.AllowIncompatiblePlatform = false; ``` -------------------------------- ### Preflight check before importing data Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Validate the integrity and compatibility of a data package before importing it into a target SQL Server. ```csharp var preflight = await new SqlDataBridgeImporter().PreflightAsync("support-snapshot.sqlite", targetSqlServerConnectionString); if (!preflight.IsValid) { foreach (var error in preflight.Errors) { Console.Error.WriteLine(error); } } ``` -------------------------------- ### SQL Server Connection String with TrustServerCertificate Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md For local and containerized SQL Server instances, set `TrustServerCertificate=True` in your development connection strings. Use production-appropriate certificate validation for real deployments. ```text Server=localhost;Database=MyDb;User Id=sa;Password=...;TrustServerCertificate=True ``` -------------------------------- ### ExportOptions Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/API.md `ExportOptions` configures table selection, export filters, batching, progress, timeouts, data table naming, and optional dacpac behavior. ```APIDOC ## ExportOptions ### Description Configures options for exporting data, including table selection, filters, batching, and naming conventions. ### Properties - **DataTablePrefix** (string) - Controls the prefix used for exported SQLite data tables. Defaults to `zsb_data`. Can be set to `null` or an empty string to omit the prefix. - **Tables** (TableSelection) - Configures how source table names are selected, supporting exact names and wildcards (`*`). Can be set to include (`Only`) or exclude (`AllExcept`, default) patterns. ``` -------------------------------- ### Enable Dacpac Deployment on Import Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Set the SchemaDeploymentMode to DeployDacpac to opt into dacpac deployment before import. This ensures that the captured schema is deployed to the target. ```csharp var importOptions = ImportOptions.Default; importOptions.SchemaDeploymentMode = SchemaDeploymentMode.DeployDacpac; ``` -------------------------------- ### SqlDataBridge Static Helpers Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/API.md `SqlDataBridge` provides static `ExportAsync` and `ImportAsync` helpers for simple, direct calls. ```APIDOC ## SqlDataBridge.ExportAsync ### Description Provides a simple, direct method to export SQL Server table data. ### Usage Call `SqlDataBridge.ExportAsync` with appropriate parameters for a straightforward export operation. ``` ```APIDOC ## SqlDataBridge.ImportAsync ### Description Provides a simple, direct method to import a data package into SQL Server. ### Usage Call `SqlDataBridge.ImportAsync` with appropriate parameters for a straightforward import operation. ``` -------------------------------- ### SqlException Detail Format Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md For each SqlException in the chain, individual SqlErrors are dumped on two indented lines, providing detailed error information. ```text SqlError Number= Class= State= Line= Procedure='

' Source='' Message: ``` -------------------------------- ### Enable Overwriting Existing Packages During Export Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Configure ExportOptions to allow replacement of existing SQLite package files. Set OverwriteExistingPackage to true to enable this behavior. This is useful when you want to ensure the latest data is exported to a new package. ```csharp var options = ExportOptions.Default; options.OverwriteExistingPackage = true; ``` -------------------------------- ### Tune Batching Options for Large Tables Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Configure batching parameters for exporting large or wide tables to optimize performance and memory usage. Size-aware batching is enabled by default. ```csharp var options = ExportOptions.Default; options.BatchSize = 1_000; options.LargeTableThresholdBytes = 50L * 1024 * 1024; options.LargeTableBatchSize = 250; options.MaxBatchBytes = 4L * 1024 * 1024; ``` -------------------------------- ### Read manifest from a data package Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Access metadata and row counts for tables within a SqlDataBridge data package (SQLite file). ```csharp var manifest = await new DataPackageReader().ReadManifestAsync("support-snapshot.sqlite"); foreach (var table in manifest.Tables) { Console.WriteLine($"{table.FullName}: {table.ExportedRowCount} rows"); } ``` -------------------------------- ### Run Unit Tests Directly Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/CONTRIBUTING.md Run only the unit tests if Docker is unavailable or if you need to isolate unit test execution. This bypasses integration tests that require Docker. ```bash dotnet test tests/SqlDataBridge.Tests/SqlDataBridge.Tests.csproj ``` -------------------------------- ### DataPackageReader Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/API.md `DataPackageReader` reads package manifests without importing rows. ```APIDOC ## DataPackageReader ### Description Reads package manifests without importing rows. ### Usage Instantiate `DataPackageReader` to access manifest information from a data package. ``` -------------------------------- ### Combine global and per-table WHERE clauses Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Stack global WHERE clauses with specific WHERE clauses for individual tables to achieve precise data filtering. ```csharp var options = ExportOptions.Default; options.GlobalWhereClauses = [ new GlobalWhereClause("TenantId", "TenantId = 123") ]; options.PerTableWhereClauses = [ new PerTableWhereClause("dbo.Orders", "Status = 'Open'") ]; var result = await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "tenant-snapshot.sqlite", options); ``` -------------------------------- ### Section Banner Format Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md Progress is delimited by section banners. Use these to parse top-level progress. ```text === [

] === ``` -------------------------------- ### Apply global WHERE clauses for filtering Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Filter rows across all selected tables by applying global WHERE predicates based on column names. ```csharp var options = ExportOptions.Default; options.GlobalWhereClauses = [ new GlobalWhereClause("TenantId", "TenantId = 123"), new GlobalWhereClause("Active", "Active = 1") ]; var result = await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "tenant-snapshot.sqlite", options); ``` -------------------------------- ### Customize SQLite data table prefix Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Set a custom prefix for SQLite data tables to adhere to local naming conventions. Defaults to `zsb_data`. ```csharp var options = ExportOptions.Default; options.DataTablePrefix = "support_data"; var result = await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "support-snapshot.sqlite", options); ``` -------------------------------- ### Export SQL Server Data with Progress Reporting Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Export specific SQL Server tables to a SQLite file, reporting progress during the operation. Configure table selection, command timeout, and progress callbacks. ```csharp var progress = new Progress(p => { Console.WriteLine($"{p.Kind}: {p.TableName} {p.RowsProcessed}/{p.TotalRows}"); }); var options = ExportOptions.Default; options.TableSelection = ExportTableSelectionMode.Only; options.Tables = ["dbo.Payloads"]; options.CommandTimeout = 120; options.Progress = progress; await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "large-table.sqlite", options); ``` -------------------------------- ### Allow Incompatible Dacpac Platform Deployment Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Configure Dacpac deployment to allow deployment between incompatible source and target platforms. By default, DacFx platform checks are stricter than practical SQL Server deployment needs. ```csharp var options = new ImportOptions { SchemaDeploymentMode = SchemaDeploymentMode.DeployDacpac, DacpacDeploymentOptions = new DacpacDeploymentOptions { AllowIncompatiblePlatform = false } }; ``` -------------------------------- ### Enable Dacpac Model Verification Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Set DacpacCaptureOptions.VerifyExtraction to true to validate the extracted model at capture time. This will fail early on genuinely broken references, preventing the capture of functional-but-imperfect legacy schema. ```csharp exportOptions.DacpacCaptureOptions.VerifyExtraction = true; ``` -------------------------------- ### Read Data Package Manifest Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Read the manifest from a data package (SQLite file) without importing it. This allows inspection of metadata like row counts and table schemas. ```csharp var manifest = await new DataPackageReader().ReadManifestAsync("billing-repro.sqlite"); foreach (var table in manifest.Tables) Console.WriteLine($"{table.FullName}: {table.ExportedRowCount} rows"); // dbo.Customers: 1,204 rows // dbo.Invoices: 18,755 rows // dbo.Orders: 22,109 rows ``` -------------------------------- ### Importing necessary namespace Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md This snippet shows the required using directive for accessing the Models namespace in SqlDataBridge. ```csharp using Zachtbeer.SqlDataBridge.Models; ``` -------------------------------- ### Known Section Names Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md Lists the known section names in their normal order of appearance during a deployment. ```text parse → fixture → container → server → target → options → script (optional) → deploy → verify → done ``` -------------------------------- ### Export specific tables to SQLite Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Configure ExportOptions to include only specific tables for reproducing issues. Supports exact names and wildcards. ```csharp var options = ExportOptions.Default; options.TableSelection = ExportTableSelectionMode.Only; options.Tables = [ "dbo.Customers", "dbo.Invoices", "dbo.InvoiceLineItems" ]; var result = await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "billing-repro.sqlite", options); ``` -------------------------------- ### Enable Dacpac Verification for Early Error Detection Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Enable Dacpac verification to fail exports early on broken references. This option is off by default to allow functional but imperfect legacy schema captures. ```csharp var exportOptions = ExportOptions.Default; exportOptions.SchemaCaptureMode = SchemaCaptureMode.Dacpac; exportOptions.DacpacCaptureOptions.VerifyExtraction = true; // fail export early on broken refs ``` -------------------------------- ### Configure Dacpac Schema Scope Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md To capture only the tables selected by the export plan, set DacpacCaptureOptions.SchemaScope to DacpacSchemaScope.SelectedExportTables. This limits the schema capture to specific tables. ```csharp exportOptions.DacpacCaptureOptions.SchemaScope = DacpacSchemaScope.SelectedExportTables; ``` -------------------------------- ### Export excluding specific table patterns Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Use the `Tables` property with wildcard patterns to exclude tables. By default, `TableSelection` is `AllExcept`. ```csharp var options = ExportOptions.Default; options.Tables = ["*.zz*"]; var result = await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "without-staging.sqlite", options); ``` -------------------------------- ### SqlDataBridgeImporter Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/API.md `SqlDataBridgeImporter` validates and imports a data package into SQL Server. ```APIDOC ## SqlDataBridgeImporter ### Description Validates and imports a data package into SQL Server. ### Usage This class provides methods for importing data. Refer to specific method documentation for details on parameters and return values. ``` -------------------------------- ### Enable Dacpac Schema Capture Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Set the SchemaCaptureMode to Dacpac to include schema in the SQLite file. This is useful when you need to export the full source database schema. ```csharp var exportOptions = ExportOptions.Default; exportOptions.SchemaCaptureMode = SchemaCaptureMode.Dacpac; ``` -------------------------------- ### DacFx Smoking-Gun Block - None Found Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md This block appears inside the 'script' section when DacFx is not scripting a SET CONTAINMENT prerequisite. ```text --- smoking-gun lines (CONTAINMENT / contained database / Msg 12824) --- (none found — DacFx is not scripting a SET CONTAINMENT prerequisite for this config) --- end smoking-gun lines --- ``` -------------------------------- ### Exception Chain Format Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md Exceptions are printed to stderr, with each exception in the chain formatted per this structure. ```text [] : ``` -------------------------------- ### Msg 12824 Hash-Rule Banner Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md This banner is appended to stderr if any SqlError.Number == 12824 is detected, indicating a specific configuration issue. ```text ################################################################## # Msg 12824 'contained database authentication' detected in chain. # DacFx scripted SET CONTAINMENT = PARTIAL despite the configured # AdaptAzureSourceForOnPremTarget setting. Re-run with --dump-script # --no-deploy to inspect which model element drove that decision. ################################################################## ``` -------------------------------- ### Query SQLite Data Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Query specific data from a table within an exported SQLite database file using the `sqlite3` command-line tool. ```text $ sqlite3 billing-repro.sqlite "SELECT CustomerId, Name FROM zsb_data_dbo__customers LIMIT 3;" 1|Northwind Traders 2|Contoso Ltd 3|Fabrikam, Inc. ``` -------------------------------- ### Control Temporal Table Versioning During Import Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Configure `SuspendTemporalSystemVersioning` in `ImportOptions` to manage how SqlDataBridge handles system-versioned temporal tables. The default is `true`, which automatically suspends and resumes versioning to allow data loading. ```csharp var options = ImportOptions.Default; options.SuspendTemporalSystemVersioning = false; // leave at the default `true` to import temporal tables ``` -------------------------------- ### Failure Section Banner Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md The banner emitted when a deployment fails, indicating the time taken before failure. ```text === [FAILURE after s] === ``` -------------------------------- ### Increase Fuzzing Iterations Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/CONTRIBUTING.md Increase the number of iterations for fuzz tests locally by setting the FUZZ_MAXTEST environment variable. This allows for more thorough testing. ```bash FUZZ_MAXTEST=3000 dotnet test tests/SqlDataBridge.Fuzzing/SqlDataBridge.Fuzzing.csproj ``` -------------------------------- ### Exclude Unsupported Columns During Export Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Use ExportOptions to specify columns with unsupported SQL Server types that should be excluded from the export. This prevents export failures due to incompatible data. ```csharp var options = new ExportOptions { ExcludeColumns = [ "dbo.Payloads.PayloadVariant" ] }; ``` -------------------------------- ### Disable Dacpac Data Loss Blocking Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Configure Dacpac deployment to not block on possible data loss. Use this when the risk of data loss is acceptable. ```csharp var options = ImportOptions.Default; options.SchemaDeploymentMode = SchemaDeploymentMode.DeployDacpac; options.DacpacDeploymentOptions.BlockOnPossibleDataLoss = false; ``` -------------------------------- ### DacFx Smoking-Gun Block - Found Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md This block appears inside the 'script' section when DacFx is scripting a SET CONTAINMENT prerequisite, showing the verbatim script lines. ```text --- smoking-gun lines (CONTAINMENT / contained database / Msg 12824) --- L: L: <…> --- end smoking-gun lines --- ``` -------------------------------- ### Disable Temporal Data Consistency Check Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Set `TemporalDataConsistencyCheck` to `false` in `ImportOptions` to skip validation of temporal table data consistency. This can be used if re-enabling system versioning fails, but it may lead to incorrect `AS OF` query results. ```csharp var options = ImportOptions.Default; options.TemporalDataConsistencyCheck = false; ``` -------------------------------- ### DacFx Script Message Prefix Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/samples/SqlDataBridge.DeployRepro/README.md Lines emitted by DacFx during script generation are prefixed with this format. These appear only within the 'script' section. ```text [dacfx-script] : ``` -------------------------------- ### SqlDataBridgeExporter Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/API.md `SqlDataBridgeExporter` is used to export SQL Server table data into a local data package. ```APIDOC ## SqlDataBridgeExporter ### Description Exports SQL Server table data into a local data package. ### Usage This class provides methods for exporting data. Refer to specific method documentation for details on parameters and return values. ``` -------------------------------- ### Exclude Columns During Export Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/docs/TROUBLESHOOTING.md Use `ExcludeColumns` in `ExportOptions` to specify columns that should not be included in the export. This is useful when the target table schema differs from the source. ```csharp var options = new ExportOptions { ExcludeColumns = ["dbo.Customers.LegacyCode"] }; ``` -------------------------------- ### Export excluding sensitive columns Source: https://github.com/zachtbeer-labs/sqldatabridge/blob/main/README.md Specify columns to exclude from the export using fully qualified names (schema.table.column). Useful for sensitive data. ```csharp var options = ExportOptions.Default; options.TableSelection = ExportTableSelectionMode.Only; options.Tables = ["dbo.Payloads", "dbo.SupportCases"]; options.ExcludeColumns = [ "dbo.Payloads.RawXml", "dbo.SupportCases.InternalNotes" ]; var result = await new SqlDataBridgeExporter().ExportAsync( sourceSqlServerConnectionString, "support-snapshot.sqlite", options); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.