Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran Fabric, Power BI dan SQL terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniPelayar ini tidak lagi disokong.
Naik taraf kepada Microsoft Edge untuk memanfaatkan ciri, kemas kini keselamatan dan sokongan teknikal yang terkini.
Applies to: ✅ SQL database in Microsoft Fabric
In this tutorial, you learn how to work with SqlPackage in your SQL database in Fabric.
SqlPackage is a CLI providing database portability and database deployments.
.bacpac
) with import/export operations.SqlPackage can also enable easy database deployments of incremental changes to database objects (new columns in tables, alterations to existing stored procedures, etc.).
.dacpac
file containing the definitions of objects in a database, and publish a .dacpac
file to apply that object state to a new or existing database.SqlPackage is available for Windows, macOS, and Linux as a dotnet tool. You can install it using the following command:
dotnet tool install --global Microsoft.SqlPackage
As a global dotnet tool, SqlPackage is available in your terminal as sqlpackage
from any folder.
A .bacpac
is a portable copy of a database, useful for some migration and testing scenarios. You can import that .bacpac
into an empty SQL database.
Nota
A .bacpac
is not a backup or a replacement for backup/restore capabilities. For more information about backups in Fabric SQL database, see Automatic backups in SQL database in Microsoft Fabric and Restore from a backup in SQL database in Microsoft Fabric.
If using a .bacpac
from your Azure SQL Database environment, you might need to alter the source database to meet the Fabric SQL database T-SQL surface area.
Create your new SQL database in Fabric as usual through the Fabric interface.
Copy the connection string from settings.
Use the import command from terminal in the sqlpackage folder. Provide your owner <servername>
and <database_name>
.
sqlpackage /action:import /sourcefile:"C:\DatabaseName.bacpac" /targetconnectionstring:"Data Source=tcp:<server_name>.database.fabric.microsoft.com,1433;Initial Catalog=<database_name>;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;ConnectRetryCount=6;ConnectRetryInterval=10;Authentication=Active Directory Interactive"
sourcefile
value with the .bacpac
name (DatabaseName
) and location
on your local machine.For more information on import, see SqlPackage import.
Exporting a .bacpac
is the reverse operation, where your targetfile
is a .bacpac
and your sourceconnectionstring
can be found in the SQL database settings dialog, as in the previous example. Provide your owner <servername>
and <database_name>
. For example:
sqlpackage.exe /action:export /targetfile:"C:\DatabaseName.bacpac" /sourceconnectionstring:"Data Source=tcp:<server_name>.database.fabric.microsoft.com,1433;Initial Catalog=<database_name>;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;ConnectRetryCount=6;ConnectRetryInterval=10;Authentication=Active Directory Interactive"
For more information on export, see SqlPackage export.
A .dacpac
is a database schema model file, containing definitions for the tables, stored procedures, and other objects in the source database. This file is can be created from an existing database with SqlPackage or from a SQL database project.
SqlPackage is capable of deploying a .dacpac
to a new (empty) database or incrementally updating an existing database to match the desired .dacpac
state.
.dacpac
or sql files from an existing database..dacpac
to a database.The SqlPackage publish and extract syntax is similar to the import/export commands.
Amaran
Using SqlPackage to deploy a SQL project or .dacpac
to SQL database in Fabric is recommended. Deploying a .dacpac
from Visual Studio may be unsuccessful.
To deploy a .dacpac
that was created from Azure SQL Database, SQL Server, or a SQL project targeting a platform other than SQL database in Fabric, append the property /p:AllowIncompatiblePlatform=true
to the SqlPackage publish command.
Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran Fabric, Power BI dan SQL terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniLatihan
Modul
Get started with SQL Database in Microsoft Fabric - Training
Learn how SQL Database in Microsoft Fabric works, the key concepts, and practical examples to help users SQL Database effectively as part of their analytics solutions.
Pensijilan
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Dokumentasi
Fabric SQL database source control integration - Microsoft Fabric
Learn how to work with your SQL database with Fabric's git integration source control.
Restore a database from a backup - Microsoft Fabric
Learn how to restore a database from a backup to a point-in-time in SQL database in Microsoft Fabric
Load data with data pipelines into SQL database - Microsoft Fabric
Learn how to load data with data pipelines into SQL database in Fabric.