16-10-2017, 11:55 PM
|
#5
|
|
• الانـتـسـاب » Mar 2015
|
• رقـم العـضـويـة » 121247
|
• المشـــاركـات » 3,307
|
• الـدولـة » مصر
|
• الـهـوايـة » ذكر الله ~ لا اله الا الله ~
|
• اسـم الـسـيـرفـر » No Server
|
• الـجـنـس » Male
|
• نقـاط التقييم » 98
|
|
|
رد: مشكله في رستوري داتا بيز
المشكلة ديه من إصدار الـ SQL
كود PHP:
RESTORE FILELISTONLY FROM DISK = 'YourPath\YourDB.bak';
كود PHP:
GO USE master GO RESTORE DATABASE YourDB FROM DISK = N'YourPath\YourDB.bak' -- RECOVER the DB and REPLACE it if it is already there WITH RECOVERY, REPLACE --, CHECKSUM --MOVE the logical files where you want them. There may be more files ,MOVE 'YourDB' TO 'WhereYourWantTheFile\YourDB.mdf' ,MOVE 'YourDB_log' TO 'WhereYourWantTheFile\YourDB_log.ldf'; GO -- Make sure the DB is multi user ALTER DATABASE YourDB SET MULTI_USER; -- Start by setting the owner of the DB to sa, you may want to change this later ALTER AUTHORIZATION ON DATABASE::YourDB TO sa; -- As this is a test DB, there is no point in letting the log grow -- (You may want to change this later) ALTER DATABASE YourDB SET RECOVERY SIMPLE; GO USE YourDB; GO -- Check the DB is okay DBCC checkdb; GO -- When moving a DB to a different machine, always update the stats. EXEC sp_updatestats; GO
|
|
التعديل الأخير تم بواسطة Neoon ; 16-10-2017 الساعة 11:58 PM
|