Bonjour,
Comment restaurer la base sous un autre nom en SQL SERVER 2000?
D'avance merci.
Bonjour,
Comment restaurer la base sous un autre nom en SQL SERVER 2000?
D'avance merci.
A +
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 RESTORE DATABASE UnAutreNom FROM DISK = '???'
Frédéric Brouard - SQLpro - ARCHITECTE DE DONNÉES - expert SGBDR et langage SQL
Le site sur les SGBD relationnels et le langage SQL: http://sqlpro.developpez.com/
Blog SQL, SQL Server, SGBDR : http://blog.developpez.com/sqlpro
Expert Microsoft SQL Server - M.V.P. (Most valuable Professional) MS Corp.
Entreprise SQL SPOT : modélisation, conseils, audit, optimisation, formation...
* * * * * Expertise SQL Server : http://mssqlserver.fr/ * * * * *
Merci Frédéric.
1-alors ce n'est pas possible par l'interface graphique de EM ?
2-Cette instruction
RESTORE DATABASE UnAutreNom
FROM DISK =c:\temp\mybackup.bck
Va t-il laisser l'ancienne base intacte ? Au final j'aurais deux base distinctes ?
D'avance merci.
Je ne travaille JAMAIS avec l'interface graphique. La clicougnette c'est pour les machintoshiens !1-alors ce n'est pas possible par l'interface graphique de EM ?
OUI2-Cette instruction
RESTORE DATABASE UnAutreNom
FROM DISK =c:\temp\mybackup.bck
Va t-il laisser l'ancienne base intacte ? Au final j'aurais deux base distinctes ?
A +
Frédéric Brouard - SQLpro - ARCHITECTE DE DONNÉES - expert SGBDR et langage SQL
Le site sur les SGBD relationnels et le langage SQL: http://sqlpro.developpez.com/
Blog SQL, SQL Server, SGBDR : http://blog.developpez.com/sqlpro
Expert Microsoft SQL Server - M.V.P. (Most valuable Professional) MS Corp.
Entreprise SQL SPOT : modélisation, conseils, audit, optimisation, formation...
* * * * * Expertise SQL Server : http://mssqlserver.fr/ * * * * *
Merci Frédéric.
Pour appliquer RESTORE DATABSE :
1-La base source doit être en quel état ? Offline ou ...
2-Dans query Analyzer où j'applique l'instruction dois-je être connecté à la base master ?
En appliquant l'instruction :
je reçois :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 RESTORE DATABASE BIG2 FROM DISK='C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\big_save'
Merci pour votre aide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Server: Msg 1834, Level 16, State 1, Line 1 The file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\big_Data.MDF' cannot be overwritten. It is being used by database 'big'. Server: Msg 3156, Level 16, State 1, Line 1 File 'big_Data' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\big_Data.MDF'. Use WITH MOVE to identify a valid location for the file. Server: Msg 1834, Level 16, State 1, Line 1 The file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\big_Log.LDF' cannot be overwritten. It is being used by database 'big'. Server: Msg 3156, Level 16, State 1, Line 1 File 'big_Log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL\data\big_Log.LDF'. Use WITH MOVE to identify a valid location for the file. Server: Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.
Toi, tu tentes de faire une restauration depuis des fichiers de base en activité, c'est pas comme ça que ça marche. En fait la commande de restauration ne fonctionne qu'en utilisant un fichier de sauvegarde MSSQL (ce qui est bien normal)
La manipulation :
Tu fais ta sauvegarde (ça ne peut faire que du bien) via les commandes TSQL prévues à cet effet
Tu restaures via la commande que t'as indiqué Mister SQLPro
Ca devrait mieux marcher
Partager