questions on copying SQL Server database -


subquestioning [2]

while copying resource.mdf [1], noticed that:
1)
possible copy resource.mdf without stopping sql server instance (i attached 1 having copied running instance , works after attaching) .

1a)
should understand general possibility read-only databases or in versions (mine 2008 r2 on windows xp pro sp3)?
1b)
conceptually, cannot understand why developing (dev ed) sql server on isolated/workgroup desktop windows (in case - xp pro sp3) should stopped in order copy user-defined non-used (for ex., sample database) database.

1c)
when 1 should copy .ldf .mdf file , when copying .ldf can skipped?
why read-only database have (transaction log? understood) file ldf?

2)
resource.mdf (in sql server 2008 r2 on default unnamed instance, windows xp pro sp3) in

  • %programfiles%\microsoft sql server\mssql10_50.mssqlserver\mssql\binn\

and not in

  • %programfiles%\microsoft sql server\mssql10.sql2008\mssql\binn\ [2]

i curious - location differing due sql server version, edition or windows edition, version?

[1]
question "how see/script definitions of system views?"
how see/script definitions of system views?
[2]
martin smith's answer [1]
how see/script definitions of system views?

if database has auto_close turned on engine close file handle when database no longer in use. express instances create databases auto-close on , property preserved when database attached non-express instance.

it not true have shutdown instance copy database file. have relinquish exclusive handle held sql server instance on database files(s). can done setting database offline, copy, setting online. (if remember correctly) databases read-only, handle held sql server allows processes open shared handle on file. why can copy online read-only database, , msqlsystemreource read-only under normal operating mode.

other questions:
1c) never. copy mdf, ndfs , ldf(s). when there recomendations copy mdf alone, ignore them , copy ldf well.
2) resource databases part of binaries. in binn folder of installation, same location sqlservr.exe. path differ each installed instance , can change during setup.

and 1 last consideration: why touch resource db? world of pain, may corrupt instance if manipulate resource db in way.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -