Dear all,
I would like to know how can I restore the MSSQL database? I copied the
abc.mdf and abc.ldf files from another computer. I want to know how can I
restore the data in my computer just using these 2 files. Thank you for all
of your help.
Alex
hi Alex,
"alex" <a@.a.com> ha scritto nel messaggio
news:OMP5qnQWEHA.1488@.TK2MSFTNGP09.phx.gbl...
> Dear all,
> I would like to know how can I restore the MSSQL database? I copied
the
> abc.mdf and abc.ldf files from another computer. I want to know how can I
> restore the data in my computer just using these 2 files. Thank you for
all
> of your help.
if you already have the data .Mdf file and log .Ldf file building the
database, you don't have to restore it but just attach it to your MSDE
instance... a database restore can only be performed using a database
backup, which is not a physical copy of the physical files... further info
at
http://msdn.microsoft.com/library/de...ackpc_7cft.asp
in order to perform this task, you have to use the system stored procedure
sp_attach_db, similar to
EXEC sp_attach_db @.dbname = 'your_dbname'
, @.filename1 = '..\full data path of\abc.mdf'
, @.filename2 = '..\full data path of\abc.ldf'
with the query tool interface of your choice... please have a look at
http://msdn.microsoft.com/library/de...ae-az_52oy.asp
for sp_attach_db synopsis and further info about it...
for your convenience, you can have a look at a free prj of mine, available
at the link following my sign., which provide a user interface similar to
Enterprise Manager, that includes this feature too...
hth
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thx Andrea. I have tried the store procedure sp_attach_db; however, when I
executed the procedure, it showed me the following error messages:
Could not attach the database because the character Set, Sort Order, or
Unicode Collation for the database differs from this server.
warning: sort order 52 in database differs from server sort order of
197
warning: Unicode Language locale 1033 in database differs from Server
Unicode language locale of 1028
I would like to ask how can i solve this problem. Thank you for all of your
help.
Alex
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> gl
news:2jt4t4F14gi9gU1@.uni-berlin.de...[vbcol=seagreen]
> hi Alex,
> "alex" <a@.a.com> ha scritto nel messaggio
> news:OMP5qnQWEHA.1488@.TK2MSFTNGP09.phx.gbl...
> the
I
> all
> if you already have the data .Mdf file and log .Ldf file building the
> database, you don't have to restore it but just attach it to your MSDE
> instance... a database restore can only be performed using a database
> backup, which is not a physical copy of the physical files... further info
> at
>
http://msdn.microsoft.com/library/de...us/howtosql/ht
_7_backpc_7cft.asp
> in order to perform this task, you have to use the system stored procedure
> sp_attach_db, similar to
> EXEC sp_attach_db @.dbname = 'your_dbname'
> , @.filename1 = '..\full data path of\abc.mdf'
> , @.filename2 = '..\full data path of\abc.ldf'
> with the query tool interface of your choice... please have a look at
>
http://msdn.microsoft.com/library/de...us/tsqlref/ts_
sp_ae-az_52oy.asp
> for sp_attach_db synopsis and further info about it...
> for your convenience, you can have a look at a free prj of mine, available
> at the link following my sign., which provide a user interface similar to
> Enterprise Manager, that includes this feature too...
> hth
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi Alex,
"alex" <a@.a.com> ha scritto nel messaggio
news:OAmiowYWEHA.3420@.TK2MSFTNGP12.phx.gbl...
> Thx Andrea. I have tried the store procedure sp_attach_db; however, when
I
> executed the procedure, it showed me the following error messages:
> Could not attach the database because the character Set, Sort Order,
or
> Unicode Collation for the database differs from this server.
> warning: sort order 52 in database differs from server sort order of
> 197
> warning: Unicode Language locale 1033 in database differs from Server
> Unicode language locale of 1028
> I would like to ask how can i solve this problem. Thank you for all of
your
> help.
are you perhaps running a SQL Server 7.0 instance?
on tha version, the Character Set and Sort Order rules must be the same on
both servers in order to "migrate" a database via attach/restore method..
if this is the case, you shoul'd perform the migration via DTS, if the 2
servers are bound in a lan, or script the database out, both database schema
and data...
database schema can be scripted out via Enterprise Manager, while data can
be pushed to file (and later loaded to SQL Server database) with BCP (Bulk
Copy Program),
http://msdn.microsoft.com/library/de...p_bcp_61et.asp ,
SQL Server MVP Narayana Vyas Kondreddi world famous INSERT INTO stored
procedure ( http://vyaskn.tripod.com/code.htm#inserts ) or have a look at a
free prj of mine at the link following my sign., which provide a user
interface similar to Enterprise Manager that includes this feature too...
DDL schema generation sql scripts and INSERT INTO scripts can be later run
via oSql.exe and/or Query Analyzer..
the other way, is to rebuild your destination SQL Server instance with the
same Character Set and Sort Order rules as the originating server...
SQL Server 2000 and MSDE 2000 allow collations bot at database level and
column level...
http://msdn.microsoft.com/library/de...ation_72pg.asp
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment