Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Store SQL version in Image table

Aperta
#136 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
powershell, sql
Ambito
databases

Direzione di ricerca

Inizia tracciando il record Image e i comandi New-DcnImage, New-DcnClone, Get-DcnImage e Remove-DcnImage. Verifica come viene ottenuta e memorizzata la versione di SQL Server, quindi definisci il controllo di compatibilità prima della clonazione. Il lavoro è completato quando vengono restituite le versioni delle immagini, le destinazioni meno recenti non supportate vengono rifiutate prima della creazione di un clone e viene coperto il comportamento richiesto per il filtraggio delle versioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement waiting for answer

Is your feature request related to a problem? Please describe.
We have to support SQL 2012 up to 2019. unfortunately, backups aren't backwards compatible so if we generate an Image using SQL 2019 we can't create a Clone of that Image on SQL 2012. The issue we face is due to users trying to create clones for the wrong version of SQL.

Currently, if you tried the above it would create a Clone VHD, and attempt to mount the database, but fail with the below error:
WARNING: [17:50:02][Mount-DbaDatabase] Failure | The database 'SQL2019Db' cannot be opened because it is version 904. This server supports version 852 and earlier. A downgrade path is not supported.
This still creates a clone that has no database.

Describe the solution you'd like
The solution would be to modify the New-DcnImage command to store the SQL version which generated the image when creating the image record. This would allow users to check the SQL version before cloning. We would also modify the New-DcnClone command to check if the user is creating a clone against the same or newer SQL version. this prevents a clone from being made if the SQL instance version doesn't support the version required.

This solution would return the SQL version in the Get-DcnImage command. It would be nice if we could pass in a SQL version into Get-DcnImage and Remove-DcnImage commands, which only returns/removes images with the same version. It may also be an idea to provide a flag to say whether the version can be lower.

Describe alternatives you've considered
I did consider just modifying the New-DcnClone command to check that the SQL instance version is the same or newer than the image, but this would require a clone to be made before checking the version are compatible.

Latest version of dbaclone as of writing
0.10.45

Lingua principale
PowerShell
Stelle
144
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dataplat/dbaclone

Tutte le issue di dataplat/dbaclone

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.