mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
[SQLDB-Migration] Collation Validation (#21572)
Adding collation validation in target database selection page. collecting source database info including state, size, collation etc in the step 1 (select databases to assess and migrate) comparing source database collation and target database collation in target selection page. image
This commit is contained in:
@@ -53,7 +53,7 @@ const query_databases_with_size = `
|
||||
FROM sys.master_files with (nolock)
|
||||
GROUP BY database_id
|
||||
)
|
||||
SELECT name, state_desc AS state, db_size.size
|
||||
SELECT name, state_desc AS state, db_size.size, collation_name
|
||||
FROM sys.databases with (nolock) LEFT JOIN db_size ON sys.databases.database_id = db_size.database_id
|
||||
WHERE sys.databases.state = 0
|
||||
`;
|
||||
@@ -88,6 +88,13 @@ export interface TableInfo {
|
||||
selectedForMigration: boolean;
|
||||
}
|
||||
|
||||
export interface SourceDatabaseInfo {
|
||||
databaseName: string;
|
||||
databaseCollation: string;
|
||||
databaseState: number;
|
||||
databaseSizeInMB: string;
|
||||
}
|
||||
|
||||
export interface TargetDatabaseInfo {
|
||||
serverName: string;
|
||||
serverCollation: string;
|
||||
@@ -331,6 +338,7 @@ export async function getDatabasesList(connectionProfile: azdata.connection.Conn
|
||||
name: getSqlString(row[0]),
|
||||
state: getSqlString(row[1]),
|
||||
sizeInMB: getSqlString(row[2]),
|
||||
collation: getSqlString(row[3])
|
||||
}
|
||||
};
|
||||
}) ?? [];
|
||||
|
||||
Reference in New Issue
Block a user