Showing posts with label attach. Show all posts
Showing posts with label attach. Show all posts

Wednesday, March 28, 2012

Restore database without transaction log

Hi,
I lost transaction log of SQL 2000 database.
How i can restore the database without transaction log ?
What is restore sequence ?
I can't attach the database only:it requires log file
Regards
Alex
Alex
Take a look ate:
sp_attach_single_file_db
This may be what you are after.
-- cranfield, DBA
"alext12" wrote:

> Hi,
> I lost transaction log of SQL 2000 database.
> How i can restore the database without transaction log ?
> What is restore sequence ?
> I can't attach the database only:it requires log file
> --
> Regards
> Alex
|||cranfield ,
we receive error something about NLS code is incorrect
Regards
Alex
"Cranfield" wrote:
[vbcol=seagreen]
> Alex
> Take a look ate:
> sp_attach_single_file_db
>
> This may be what you are after.
> --
> -- cranfield, DBA
>
> "alext12" wrote:
sql

Restore database without transaction log

Hi,
I lost transaction log of SQL 2000 database.
How i can restore the database without transaction log ?
What is restore sequence ?
I can't attach the database only:it requires log file
--
Regards
AlexAlex
Take a look ate:
sp_attach_single_file_db
This may be what you are after.
-- cranfield, DBA
"alext12" wrote:

> Hi,
> I lost transaction log of SQL 2000 database.
> How i can restore the database without transaction log ?
> What is restore sequence ?
> I can't attach the database only:it requires log file
> --
> Regards
> Alex|||cranfield ,
we receive error something about NLS code is incorrect
--
Regards
Alex
"Cranfield" wrote:
[vbcol=seagreen]
> Alex
> Take a look ate:
> sp_attach_single_file_db
>
> This may be what you are after.
> --
> -- cranfield, DBA
>
> "alext12" wrote:
>|||Have you got a backup of the DB? Without a DB backup you can't restore
anything, regardless of whether you have tlog backups or not.
When you say you "lost" the transaction log, do you mean it's corrupt?
or you've stopped the SQL instance, misplaced the ldf file and now the
server can't recover the DB on start up? or something else?
Mike
alext12 wrote:
> cranfield ,
> we receive error something about NLS code is incorrect

Wednesday, March 7, 2012

restore a sql db

Hi,
I received a sql xxx.mdf file. I believe it is a copy
after detached from the server.
But I don't know the path. When I tried to attach it back
to my sql server, I received error "Error 5173 Cannot
associate files with different databases."
Any suggestion?
ThanksIF the database is a single mdf file... use
sp_attach_single_file_db databasename, "Fully qualified mdf filename"
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"frankie" <frank.su@.harlandfs.com> wrote in message
news:028201c3debe$7ba77370$a101280a@.phx.gbl...
> Hi,
> I received a sql xxx.mdf file. I believe it is a copy
> after detached from the server.
> But I don't know the path. When I tried to attach it back
> to my sql server, I received error "Error 5173 Cannot
> associate files with different databases."
> Any suggestion?
> Thanks|||this is what I got when I used sp_attached_single db
Server: Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 3(The
system cannot find the path specified.) while attempting
to open or create the physical
file 'E:\NewData\Log\ezteller_log.LDF'.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'ezteller'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Program Files\Microsoft SQL
Server\MSSQL\data\EZTeller_Log.LDF' may be incorrect.
I know the database name, but I don't the file path. Does
it matter?
>--Original Message--
>IF the database is a single mdf file... use
>sp_attach_single_file_db databasename, "Fully qualified
mdf filename"
>
>--
>Wayne Snyder, MCDBA, SQL Server MVP
>Computer Education Services Corporation (CESC),
Charlotte, NC
>www.computeredservices.com
>(Please respond only to the newsgroups.)
>I support the Professional Association of SQL Server
(PASS) and it's
>community of SQL Server professionals.
>www.sqlpass.org
>
>"frankie" <frank.su@.harlandfs.com> wrote in message
>news:028201c3debe$7ba77370$a101280a@.phx.gbl...
>> Hi,
>> I received a sql xxx.mdf file. I believe it is a copy
>> after detached from the server.
>> But I don't know the path. When I tried to attach it
back
>> to my sql server, I received error "Error 5173 Cannot
>> associate files with different databases."
>> Any suggestion?
>> Thanks
>
>.
>|||No, the file path doesn't matter... You simply use the path you copy the
file to... Let's say you copy the file to D:\data\SQL\ezteller.mdf, then
the command would be
Sp_attach_single_file_db ezteller, 'D:\data\SQL\ezteller.mdf'
The error message is whining about the log file however... Are you sure you
are
1. Using sp_attach_single_file_db and NOT sp_attach_db and
2. The file you are attaching is ACTUALLY an MDF file and not a log file?
and
3. The directory etc actually already exists with the mdf file copied to it?
AND
4. the SQL Server login has read/write permissions on the file?
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"frankie" <frank.su@.harlandfs> wrote in message
news:0a5501c3dec6$e6f9b040$a501280a@.phx.gbl...
> this is what I got when I used sp_attached_single db
> Server: Msg 5123, Level 16, State 1, Line 1
> CREATE FILE encountered operating system error 3(The
> system cannot find the path specified.) while attempting
> to open or create the physical
> file 'E:\NewData\Log\ezteller_log.LDF'.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'ezteller'. CREATE DATABASE is
> aborted.
> Device activation error. The physical file
> name 'D:\Program Files\Microsoft SQL
> Server\MSSQL\data\EZTeller_Log.LDF' may be incorrect.
> I know the database name, but I don't the file path. Does
> it matter?
>
> >--Original Message--
> >IF the database is a single mdf file... use
> >sp_attach_single_file_db databasename, "Fully qualified
> mdf filename"
> >
> >
> >
> >--
> >Wayne Snyder, MCDBA, SQL Server MVP
> >Computer Education Services Corporation (CESC),
> Charlotte, NC
> >www.computeredservices.com
> >(Please respond only to the newsgroups.)
> >
> >I support the Professional Association of SQL Server
> (PASS) and it's
> >community of SQL Server professionals.
> >www.sqlpass.org
> >
> >
> >"frankie" <frank.su@.harlandfs.com> wrote in message
> >news:028201c3debe$7ba77370$a101280a@.phx.gbl...
> >> Hi,
> >> I received a sql xxx.mdf file. I believe it is a copy
> >> after detached from the server.
> >> But I don't know the path. When I tried to attach it
> back
> >> to my sql server, I received error "Error 5173 Cannot
> >> associate files with different databases."
> >>
> >> Any suggestion?
> >>
> >> Thanks
> >
> >
> >.
> >|||I was able to restore the db by create some folders which
I believed the original physical files were at.
Thanks
>--Original Message--
>this is what I got when I used sp_attached_single db
>Server: Msg 5123, Level 16, State 1, Line 1
>CREATE FILE encountered operating system error 3(The
>system cannot find the path specified.) while attempting
>to open or create the physical
>file 'E:\NewData\Log\ezteller_log.LDF'.
>Server: Msg 1813, Level 16, State 1, Line 1
>Could not open new database 'ezteller'. CREATE DATABASE
is
>aborted.
>Device activation error. The physical file
>name 'D:\Program Files\Microsoft SQL
>Server\MSSQL\data\EZTeller_Log.LDF' may be incorrect.
>I know the database name, but I don't the file path. Does
>it matter?
>
>>--Original Message--
>>IF the database is a single mdf file... use
>>sp_attach_single_file_db databasename, "Fully qualified
>mdf filename"
>>
>>--
>>Wayne Snyder, MCDBA, SQL Server MVP
>>Computer Education Services Corporation (CESC),
>Charlotte, NC
>>www.computeredservices.com
>>(Please respond only to the newsgroups.)
>>I support the Professional Association of SQL Server
>(PASS) and it's
>>community of SQL Server professionals.
>>www.sqlpass.org
>>
>>"frankie" <frank.su@.harlandfs.com> wrote in message
>>news:028201c3debe$7ba77370$a101280a@.phx.gbl...
>> Hi,
>> I received a sql xxx.mdf file. I believe it is a copy
>> after detached from the server.
>> But I don't know the path. When I tried to attach it
>back
>> to my sql server, I received error "Error 5173 Cannot
>> associate files with different databases."
>> Any suggestion?
>> Thanks
>>
>>.
>.
>

restore a sql db

Hi,
I received a sql xxx.mdf file. I believe it is a copy
after detached from the server.
But I don't know the path. When I tried to attach it back
to my sql server, I received error "Error 5173 Cannot
associate files with different databases."
Any suggestion?
ThanksIF the database is a single mdf file... use
sp_attach_single_file_db databasename, "Fully qualified mdf filename"
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"frankie" <frank.su@.harlandfs.com> wrote in message
news:028201c3debe$7ba77370$a101280a@.phx.gbl...
quote:

> Hi,
> I received a sql xxx.mdf file. I believe it is a copy
> after detached from the server.
> But I don't know the path. When I tried to attach it back
> to my sql server, I received error "Error 5173 Cannot
> associate files with different databases."
> Any suggestion?
> Thanks
|||this is what I got when I used sp_attached_single db
Server: Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 3(The
system cannot find the path specified.) while attempting
to open or create the physical
file 'E:\NewData\Log\ezteller_log.LDF'.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'ezteller'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Program Files\Microsoft SQL
Server\MSSQL\data\EZTeller_Log.LDF' may be incorrect.
I know the database name, but I don't the file path. Does
it matter?
quote:

>--Original Message--
>IF the database is a single mdf file... use
>sp_attach_single_file_db databasename, "Fully qualified

mdf filename"
quote:

>
>--
>Wayne Snyder, MCDBA, SQL Server MVP
>Computer Education Services Corporation (CESC),

Charlotte, NC
quote:

>www.computeredservices.com
>(Please respond only to the newsgroups.)
>I support the Professional Association of SQL Server

(PASS) and it's
quote:

>community of SQL Server professionals.
>www.sqlpass.org
>
>"frankie" <frank.su@.harlandfs.com> wrote in message
>news:028201c3debe$7ba77370$a101280a@.phx.gbl...
back[QUOTE]
>
>.
>
|||No, the file path doesn't matter... You simply use the path you copy the
file to... Let's say you copy the file to D:\data\SQL\ezteller.mdf, then
the command would be
Sp_attach_single_file_db ezteller, 'D:\data\SQL\ezteller.mdf'
The error message is whining about the log file however... Are you sure you
are
1. Using sp_attach_single_file_db and NOT sp_attach_db and
2. The file you are attaching is ACTUALLY an MDF file and not a log file?
and
3. The directory etc actually already exists with the mdf file copied to it?
AND
4. the SQL Server login has read/write permissions on the file?
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"frankie" <frank.su@.harlandfs> wrote in message
news:0a5501c3dec6$e6f9b040$a501280a@.phx.gbl...[QUOTE]
> this is what I got when I used sp_attached_single db
> Server: Msg 5123, Level 16, State 1, Line 1
> CREATE FILE encountered operating system error 3(The
> system cannot find the path specified.) while attempting
> to open or create the physical
> file 'E:\NewData\Log\ezteller_log.LDF'.
> Server: Msg 1813, Level 16, State 1, Line 1
> Could not open new database 'ezteller'. CREATE DATABASE is
> aborted.
> Device activation error. The physical file
> name 'D:\Program Files\Microsoft SQL
> Server\MSSQL\data\EZTeller_Log.LDF' may be incorrect.
> I know the database name, but I don't the file path. Does
> it matter?
>
> mdf filename"
> Charlotte, NC
> (PASS) and it's
> back|||I was able to restore the db by create some folders which
I believed the original physical files were at.
Thanks
quote:

>--Original Message--
>this is what I got when I used sp_attached_single db
>Server: Msg 5123, Level 16, State 1, Line 1
>CREATE FILE encountered operating system error 3(The
>system cannot find the path specified.) while attempting
>to open or create the physical
>file 'E:\NewData\Log\ezteller_log.LDF'.
>Server: Msg 1813, Level 16, State 1, Line 1
>Could not open new database 'ezteller'. CREATE DATABASE

is
quote:

>aborted.
>Device activation error. The physical file
>name 'D:\Program Files\Microsoft SQL
>Server\MSSQL\data\EZTeller_Log.LDF' may be incorrect.
>I know the database name, but I don't the file path. Does
>it matter?
>
>mdf filename"
>Charlotte, NC
>(PASS) and it's
>back
>.
>
|||Place the file in the path as specified i.e. 'D:\Program Files\Microsoft SQL
Server\MSSQL\data\EZTeller_Log.LDF'