Tuesday, March 27, 2012
Error 1813 while attaching database
the .ldf, as I have done in the past. However, when I try
to attach the database I get "Error 1813: Could not open
the new database ... Device activation error. The
physical file name {OLD_LDF_FILE_NAME} may be incorrect."
In the past, it has created a new .ldf file. How can I
get the date out of the mdf? Attach, export, import?Never never never do this, you have just found out why. Grab your backup and do restore, quite
simply. If you don't have a backup, open a case with MS support and they *might* be able to help
you.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Matt Insko" <minsko@.inovie.com> wrote in message news:1afa01c39f3e$6c148a20$3101280a@.phx.gbl...
> I ran out of space, detacted the .mdf and deleted
> the .ldf, as I have done in the past. However, when I try
> to attach the database I get "Error 1813: Could not open
> the new database ... Device activation error. The
> physical file name {OLD_LDF_FILE_NAME} may be incorrect."
> In the past, it has created a new .ldf file. How can I
> get the date out of the mdf? Attach, export, import?|||I've had that problem in the past, and it was because I had truncated
the log at some point, and never done a full backup since. Doing so
meant I could not re-attach the database but had to restore from a
backup.
Since you're out of space, is there any chance you tried to truncate the
log first?
Doug
Friday, February 24, 2012
ERROR - The row value(s) updated or deleted either do not make the row unique or they alter mult
i am getting the above error on my database i have 2 rows with the same info on and another 2 with the same info on. example:
ID username password
1 bob bob
1 bob bob
1 john john
1 john john
I know this is a fault with ms sql 2005 however how do i fix it?
Ive found this link which explains everything but how do i start a query. I tried clicking on new query and copying the code. What is table1 meant to be? the database is dbl.tbl_admin. It wont find my database.
Im not sure how to do it anyway.
I need to change it though as its my admin password and Ive given it out to web design companys
http://geekswithblogs.net/allensb/archive/2006/07/27/86484.aspx
Can some 1 read the above page and give me full instructions, I dont know what im doing thanks
info@.uktattoostudios.co.uk
hi,
follow solution 3:
open (and download SQL Server Management Studio Express at http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en) SQL Server Management Studio Express..
connect to the desired SQL Server instance... select "New Query".. in the database combo box select your database..
execute the
ALTER TABLE dbo.tbl_admin ADD TempID int IDENTITY(1, 1);this will add a new unique column to tyou tbl_admin table, and this column is a valid alternate candidate key...
if you do not have a primary key defined in your table, execute
ALTER TABLE dbo.tbl_adminADD CONSTRAINT pk_tbl_admin
PRIMARY KEY (TempId);
this will generate a primary key based on the TempId column of your table..
you can then purge your duplicate data as desired/required...
regards
|||hi, thanks for that its sorted. the reason it didnt work before was I didnt choose a database for the query to work on. master was the default just change it to my database and your code worked fine. many thanksERROR - The row value(s) updated or deleted either do not make the row unique or they alter
i am getting the above error on my database i have 2 rows with the same info on and another 2 with the same info on. example:
ID username password
1 bob bob
1 bob bob
1 john john
1 john john
I know this is a fault with ms sql 2005 however how do i fix it?
Ive found this link which explains everything but how do i start a query. I tried clicking on new query and copying the code. What is table1 meant to be? the database is dbl.tbl_admin. It wont find my database.
Im not sure how to do it anyway.
I need to change it though as its my admin password and Ive given it out to web design companys
http://geekswithblogs.net/allensb/archive/2006/07/27/86484.aspx
Can some 1 read the above page and give me full instructions, I dont know what im doing thanks
info@.uktattoostudios.co.uk
hi,
follow solution 3:
open (and download SQL Server Management Studio Express at http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en) SQL Server Management Studio Express..
connect to the desired SQL Server instance... select "New Query".. in the database combo box select your database..
execute the
ALTER TABLE dbo.tbl_admin ADD TempID int IDENTITY(1, 1);this will add a new unique column to tyou tbl_admin table, and this column is a valid alternate candidate key...
if you do not have a primary key defined in your table, execute
ALTER TABLE dbo.tbl_adminADD CONSTRAINT pk_tbl_admin
PRIMARY KEY (TempId);
this will generate a primary key based on the TempId column of your table..
you can then purge your duplicate data as desired/required...
regards
|||hi, thanks for that its sorted. the reason it didnt work before was I didnt choose a database for the query to work on. master was the default just change it to my database and your code worked fine. many thanksWednesday, February 15, 2012
Erroneously deleted stored procedures
able to do point-in-time restore to get back your deleted
procedures (if the log backup chain has not been broken):
1. Do a BACKUP LOG first
2. Do (using pubs as example)
restore database pubs from disk='...'
rstore log ... -- if any
restore log pubs from disk='...' -- the last log backup
with recovery, stopat = '20031010 17:59:59'
The STOPAT time should be before the time the procedures
were deleted.
Linchi
>--Original Message--
>I have a teammate that, in an excess of zeal, managed to
delete a majority of stored procedures on a production
database, causing numerous jobs to fail. Additionally,
there were no receint backups of this database taken, but
the transaction log is still in place and has not been
truncated. Is there any way to recover these stored
procedures that I am unaware of?
>.
>