SQL
SQL
If you install MSDE [Server 2000 Desktop Engine (MSDE 2000)] you have to log in with windows authentication
you can change it with Query Analyzer
Change login mode to mixed mode
xp_instance_regwrite N”HKEY_LOCAL_MACHINE”, N”SOFTWAREMicrosoftMSSQLServerMSSQLServer”, “LoginMode”, N”REG_DWORD”, 2
* Replace ” with single quote
RESTORE FILELISTONLY
FROM DISK = ‘c:dbfolderdb_backup_file’
RESTORE DATABASE PFist –DBNAME
FROM DISK = ‘d:pfo00.BAK’ –DB FILE
WITH REPLACE,
MOVE ‘dbData’ TO ‘e:S_Data.MDF’, — DATA
MOVE ‘dbLog’ TO ‘e:SQvest_Log.LDF’ — LOG
DBCC SHRINKFILE (Ree_Data, 50)
DBCC SHRINKFILE (pfata, 10)
DBCC SHRINKFILE (Reg, TRUNCATEONLY )
master.dbo.xp_fixeddrives
use pst
go
sp_helpfile
go
EXEC sp_dboption ‘dbname’, ‘autoclose’, ‘TRUE’
EXEC sp_dboption ‘dbname’, ‘autoshrink’, ‘TRUE’
ALTER DATABASE [dbname] SET RECOVERY SIMPLE
More on the SQL hacking Page