Showing posts with label repairing. Show all posts
Showing posts with label repairing. Show all posts

Wednesday, March 7, 2012

Repairing 'The shared data source reference is no longer valid' is long winded in report m

Would be great to be able to multi select reports in report manager and set data sources etc. as tasks like that take a long time when done individually.

Yes, that would be a nice feature.

You might consider using RS.exe scripts if you have to do this for lots of reports, or for a few reports on a regular basis.

repairing replicated tables

Hi all,
I have a sql2005 merge replication running nightly between SQl 2005 standard
and SQLexpress. (The subscription is on the SQLexpress) last night it began
failing. I ran a DBCC checkDB and found one table has 3 inconsistancies in
it and the lowest level of repair is repair with loss. This box is on its
way out and i need to band-aide it until the new one arrives and is setup.
My question is, do I need to drop the replication before putting the DB in
single user mode? Is there a way to repair the table without running DBCC
checktable with the repair option?
TIA,
Joe
Is the problem related to some indexes and do you get a RID ID error?
If so this is related to some indexes (on system tables IIRC) and you
can drop them and recreate them.
Run CHECKDB again note the object ID which is experiencing the error
and evaluate whether it is an index or not. Script out the index, drop
it and recreate it. There will be no data loss associated with this.
If it is table related you will have to bcp the data out noting where
failure occurs and then work around that/those rows using the firstrow
and lastrow options. You can use DBCC Page to look at the problem
pages if you need to be so granular in your data retrieval.
On Jan 15, 2:16 pm, jaylou <jay...@.discussions.microsoft.com> wrote:
> Hi all,
> I have a sql2005 merge replication running nightly between SQl 2005 standard
> and SQLexpress. (The subscription is on the SQLexpress) last night it began
> failing. I ran a DBCC checkDB and found one table has 3 inconsistancies in
> it and the lowest level of repair is repair with loss. This box is on its
> way out and i need to band-aide it until the new one arrives and is setup.
> My question is, do I need to drop the replication before putting the DB in
> single user mode? Is there a way to repair the table without running DBCC
> checktable with the repair option?
> TIA,
> Joe
|||Thank you, it was an index issue and droping and recreating the Indexes did
the trick.
Thanks again.
"Hilary Cotter" wrote:

> Is the problem related to some indexes and do you get a RID ID error?
> If so this is related to some indexes (on system tables IIRC) and you
> can drop them and recreate them.
> Run CHECKDB again note the object ID which is experiencing the error
> and evaluate whether it is an index or not. Script out the index, drop
> it and recreate it. There will be no data loss associated with this.
> If it is table related you will have to bcp the data out noting where
> failure occurs and then work around that/those rows using the firstrow
> and lastrow options. You can use DBCC Page to look at the problem
> pages if you need to be so granular in your data retrieval.
> On Jan 15, 2:16 pm, jaylou <jay...@.discussions.microsoft.com> wrote:
>

Repairing indexes in a table but getting errors

Hi ALL,

Somehow one of tables in my database with clustered index got tempered and the pageid are not in proper order. I tried the checkdb command with repair_rebuild option but it is giving the following error.

Table error: Object ID 1984530649, index ID 1. Page (1:254682) is missing a reference from previous page (1:254681). Possible chain linkage problem.

Server: Msg 8936, Level 16, State 1, Line 1

Table error: Object ID 1984530649, index ID 1. B-tree chain linkage mismatch. (1:254680)->next = (1:256198), but (1:256198)->Prev = (1:256197).

Not able to reindex the index of table. I can not even export the data to any other table with same structure.

Please help me.........

Thanks,
PracheerPls take a look at
http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=6046

:)|||Thanks for the help. I will try all the scenarios. Hope that will solve my problem.

:)

repairing damaged sql server MDF and LDF files

I found this program on the web...we just had the same
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin

>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>
Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of 20+), perhaps the corruption is too servere for our case. but you can try your luck.
what other program have you tried ?
Bernard goh
"Kevin" wrote:

> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>

repairing damaged sql server MDF and LDF files

Hi All,
My SQL server's data files all corrupted during a severe power failure, we manage to get back the data files and reinstall the sql server. but unforunately we failed to attaching the database back to the server. The error message indicating it is caused b
y corrupted MDF or LDF files.
Is there a way to perform a file level repair before we can attach it back to sql server again ?
Any help is very much appreciated.
Bernard Gh
Hi,
Can you post the error you are getting while attaching the database.
If the MDF file is corrupted you have to either contact Microsoft product
support or restore from a valid full backup and restore the subsequent
transaction log backups in sequence.
Note:
During this situation even if you recover the database data integrity will
be lost. I recommend you to restore from full backup.
Thanks
Hari
MCDBA
"SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> Hi All,
> My SQL server's data files all corrupted during a severe power failure, we
manage to get back the data files and reinstall the sql server. but
unforunately we failed to attaching the database back to the server. The
error message indicating it is caused by corrupted MDF or LDF files.
> Is there a way to perform a file level repair before we can attach it back
to sql server again ?
> Any help is very much appreciated.
> Bernard Gh
|||I have been in the same situation with customers before. This is why you
have a fault tolerant RAID set(5, 1, 10, or 0+1), use Log Shipping and have
good backup plans. Sometimes things break and you don't get to piece them
together.
We often use a secondary IDE drive that the SCSI drives only dump
transaction backups to every 2-5 minutes. Hence, if the power goes out 1.)
the controller should have an onboard battery to complete the write or fail
it, 2.) we are never more than 2 minutes from the last 'good' state.
Plan for failure, because it will come:wether hardware, software or
intrusion.
Sorry,
Tim
"SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> Hi All,
> My SQL server's data files all corrupted during a severe power failure, we
manage to get back the data files and reinstall the sql server. but
unforunately we failed to attaching the database back to the server. The
error message indicating it is caused by corrupted MDF or LDF files.
> Is there a way to perform a file level repair before we can attach it back
to sql server again ?
> Any help is very much appreciated.
> Bernard Gh
|||with
EXEC sp_attach_db @.dbname = N'IMISWEB_OTHER',
@.filename1 = N'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHER_Data.MDF',
@.filename2 = N'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHER_LOG.LDF'
I got following:
Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHER_LOG.LDF' is not a valid database file header. The PageAudit property is incorrect.
With
EXEC sp_attach_single_file_db @.dbname = 'IMISWEB_OTHER',
@.physname = 'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHER_Data.MDF'
I got the following:
Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'K:\Program Files\Microsoft SQL Server\MSSQL\data\IMISWEB_OTHER_Log.LDF' is not a valid database file header. The PageAudit property is incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHER_log.LDF' because it already exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'IMISWEB_OTHER'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'K:\Program Files\Microsoft SQL Server\MSSQL\data\IMISWEB_OTHER_Log.LDF' may be incorrect.
Bernard goh
"Hari Prasad" wrote:

> Hi,
> Can you post the error you are getting while attaching the database.
> If the MDF file is corrupted you have to either contact Microsoft product
> support or restore from a valid full backup and restore the subsequent
> transaction log backups in sequence.
>
> Note:
> During this situation even if you recover the database data integrity will
> be lost. I recommend you to restore from full backup.
> Thanks
> Hari
> MCDBA
>
> "SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
> news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> manage to get back the data files and reinstall the sql server. but
> unforunately we failed to attaching the database back to the server. The
> error message indicating it is caused by corrupted MDF or LDF files.
> to sql server again ?
>
>

repairing damaged sql server MDF and LDF files

Hi All,
My SQL server's data files all corrupted during a severe power failure, we m
anage to get back the data files and reinstall the sql server. but unforunat
ely we failed to attaching the database back to the server. The error messag
e indicating it is caused b
y corrupted MDF or LDF files.
Is there a way to perform a file level repair before we can attach it back t
o sql server again ?
Any help is very much appreciated.
Bernard GhHi,
Can you post the error you are getting while attaching the database.
If the MDF file is corrupted you have to either contact Microsoft product
support or restore from a valid full backup and restore the subsequent
transaction log backups in sequence.
Note:
During this situation even if you recover the database data integrity will
be lost. I recommend you to restore from full backup.
Thanks
Hari
MCDBA
"SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> Hi All,
> My SQL server's data files all corrupted during a severe power failure, we
manage to get back the data files and reinstall the sql server. but
unforunately we failed to attaching the database back to the server. The
error message indicating it is caused by corrupted MDF or LDF files.
> Is there a way to perform a file level repair before we can attach it back
to sql server again ?
> Any help is very much appreciated.
> Bernard Gh|||I have been in the same situation with customers before. This is why you
have a fault tolerant RAID set(5, 1, 10, or 0+1), use Log Shipping and have
good backup plans. Sometimes things break and you don't get to piece them
together.
We often use a secondary IDE drive that the SCSI drives only dump
transaction backups to every 2-5 minutes. Hence, if the power goes out 1.)
the controller should have an onboard battery to complete the write or fail
it, 2.) we are never more than 2 minutes from the last 'good' state.
Plan for failure, because it will come:wether hardware, software or
intrusion.
Sorry,
Tim
"SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> Hi All,
> My SQL server's data files all corrupted during a severe power failure, we
manage to get back the data files and reinstall the sql server. but
unforunately we failed to attaching the database back to the server. The
error message indicating it is caused by corrupted MDF or LDF files.
> Is there a way to perform a file level repair before we can attach it back
to sql server again ?
> Any help is very much appreciated.
> Bernard Gh|||with
EXEC sp_attach_db @.dbname = N'IMISWEB_OTHER',
@.filename1 = N'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHE
R_Data.MDF',
@.filename2 = N'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHE
R_LOG.LDF'
I got following:
Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWE
B_OTHER_LOG.LDF' is not a valid database file header. The PageAudit property
is incorrect.
With
EXEC sp_attach_single_file_db @.dbname = 'IMISWEB_OTHER',
@.physname = 'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB_OTHER_
Data.MDF'
I got the following:
Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'K:\Program Files\Microsoft SQL Server\MSSQL\data\IMISWE
B_OTHER_Log.LDF' is not a valid database file header. The PageAudit property
is incorrect.
Server: Msg 5170, Level 16, State 1, Line 1
Cannot create file 'K:\Program Files\Microsoft SQL Server\MSSQL\Data\IMISWEB
_OTHER_log.LDF' because it already exists.
Server: Msg 1813, Level 16, State 1, Line 1
Could not open new database 'IMISWEB_OTHER'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'K:\Program Files\Microsoft
SQL Server\MSSQL\data\IMISWEB_OTHER_Log.LDF' may be incorrect.
Bernard goh
"Hari Prasad" wrote:

> Hi,
> Can you post the error you are getting while attaching the database.
> If the MDF file is corrupted you have to either contact Microsoft product
> support or restore from a valid full backup and restore the subsequent
> transaction log backups in sequence.
>
> Note:
> During this situation even if you recover the database data integrity will
> be lost. I recommend you to restore from full backup.
> Thanks
> Hari
> MCDBA
>
> "SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
> news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> manage to get back the data files and reinstall the sql server. but
> unforunately we failed to attaching the database back to the server. The
> error message indicating it is caused by corrupted MDF or LDF files.
> to sql server again ?
>
>

repairing damaged sql server MDF and LDF files

I found this program on the web...we just had the same
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin

>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of
20+), perhaps the corruption is too servere for our case. but you can try yo
ur luck.
what other program have you tried ?
--
Bernard goh
"Kevin" wrote:

> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>

repairing damaged sql server MDF and LDF files

Hi All,
My SQL server's data files all corrupted during a severe power failure, we manage to get back the data files and reinstall the sql server. but unforunately we failed to attaching the database back to the server. The error message indicating it is caused by corrupted MDF or LDF files.
Is there a way to perform a file level repair before we can attach it back to sql server again ?
Any help is very much appreciated.
Bernard GhHi,
Can you post the error you are getting while attaching the database.
If the MDF file is corrupted you have to either contact Microsoft product
support or restore from a valid full backup and restore the subsequent
transaction log backups in sequence.
Note:
During this situation even if you recover the database data integrity will
be lost. I recommend you to restore from full backup.
Thanks
Hari
MCDBA
"SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> Hi All,
> My SQL server's data files all corrupted during a severe power failure, we
manage to get back the data files and reinstall the sql server. but
unforunately we failed to attaching the database back to the server. The
error message indicating it is caused by corrupted MDF or LDF files.
> Is there a way to perform a file level repair before we can attach it back
to sql server again ?
> Any help is very much appreciated.
> Bernard Gh|||I have been in the same situation with customers before. This is why you
have a fault tolerant RAID set(5, 1, 10, or 0+1), use Log Shipping and have
good backup plans. Sometimes things break and you don't get to piece them
together.
We often use a secondary IDE drive that the SCSI drives only dump
transaction backups to every 2-5 minutes. Hence, if the power goes out 1.)
the controller should have an onboard battery to complete the write or fail
it, 2.) we are never more than 2 minutes from the last 'good' state.
Plan for failure, because it will come:wether hardware, software or
intrusion.
Sorry,
Tim
"SummerCoke" <SummerCoke@.discussions.microsoft.com> wrote in message
news:C9AE06CD-460C-48C6-8510-4E1C1858FAE9@.microsoft.com...
> Hi All,
> My SQL server's data files all corrupted during a severe power failure, we
manage to get back the data files and reinstall the sql server. but
unforunately we failed to attaching the database back to the server. The
error message indicating it is caused by corrupted MDF or LDF files.
> Is there a way to perform a file level repair before we can attach it back
to sql server again ?
> Any help is very much appreciated.
> Bernard Gh|||I found this program on the web...we just had the same
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>|||Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of 20+), perhaps the corruption is too servere for our case. but you can try your luck.
what other program have you tried ?
--
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
> >--Original Message--
> >Hi All,
> >
> >My SQL server's data files all corrupted during a severe
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> >
> >Is there a way to perform a file level repair before we
> can attach it back to sql server again ?
> >
> >Any help is very much appreciated.
> >
> >Bernard Gh
> >.
> >
>

repairing an unattached SQL 2005 DB

I have a database file that someone copied from a computer before they
formated that computer. (I know all about how to backup the database properly
and why you should verify backups are good, but it was not me and I am trying
to help this person recover as much data as possible).
Whenever I try to attach the 2005 database to a new SQL 2005 install I get a
tornpage error. My guess is that the database file was corrupted in the copy
and not repairable, but I would like to atleast try to do the
recover_with_data_loss option. The problem is that I can never get the
database to attach so that it is possible to run the dbcc checkdb.
My question is, is it possible to either repair the database unattached or
is there a way get the database attached enough for me to be able to run the
repair utility?
Thanks
btw, the error is
SQL Server detected a logical consistency-based I/O error: torn page
(expected signature: 0x55555555; actual signature: 0xa6c59cbd). It occurred
during a read of page (1:20635) in database ID 15 at offset 0x0000000a136000
in file 'C:\New Folder\StoreInfo.mdf'. Additional messages in the SQL Server
error log or system event log may provide more detail. This is a severe error
condition that threatens database integrity and must be corrected
immediately. Complete a full database consistency check (DBCC CHECKDB). This
error can be caused by many factors; for more information, see SQL Server
Books Online.
Could not open new database 'StoreInfo'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 824)

repairing an unattached SQL 2005 DB

I have a database file that someone copied from a computer before they
formated that computer. (I know all about how to backup the database properl
y
and why you should verify backups are good, but it was not me and I am tryin
g
to help this person recover as much data as possible).
Whenever I try to attach the 2005 database to a new SQL 2005 install I get a
tornpage error. My guess is that the database file was corrupted in the cop
y
and not repairable, but I would like to atleast try to do the
recover_with_data_loss option. The problem is that I can never get the
database to attach so that it is possible to run the dbcc checkdb.
My question is, is it possible to either repair the database unattached or
is there a way get the database attached enough for me to be able to run the
repair utility?
Thanksbtw, the error is
SQL Server detected a logical consistency-based I/O error: torn page
(expected signature: 0x55555555; actual signature: 0xa6c59cbd). It occurred
during a read of page (1:20635) in database ID 15 at offset 0x0000000a136000
in file 'C:\New Folder\StoreInfo.mdf'. Additional messages in the SQL Serve
r
error log or system event log may provide more detail. This is a severe erro
r
condition that threatens database integrity and must be corrected
immediately. Complete a full database consistency check (DBCC CHECKDB). This
error can be caused by many factors; for more information, see SQL Server
Books Online.
Could not open new database 'StoreInfo'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 824)

Repairing a Database

When Trying to Attatch a Database, i get the following message.
Error 9003: The LSN(2768:609:1) passed to log scan in database 'master DB' is invalid.
Is there a repair tool, or something you can do in enterprise manager to repair the database.
Hi,
You may get this error while attaching the Database if the log file of the
database is corrupted.
If you have a clean backup, please restore the Database from the backup.
This is preferred method of recovering the database, because at this point
in time we will not be able to determine the impact of corrupted Log file.
If no clean backup is available, try this workaround, this is not
recommended, as you may have corrupted data.
Move the log file (.ldf) to a different location.
execute the following SP
sp_attach_single_file_db
Attaches a database having only one data file to the current server.
Syntax
sp_attach_single_file_db [ @.dbname = ] 'dbname'
, [ @.physname = ] 'physical_name'
Arguments
[@.dbname =] 'dbname'
Is the name of the database to be attached to the server. dbname is
sysname, with a default of NULL.
[@.physname =] 'phsyical_name'
Is the physical name, including path, of the database file. physical_name
is nvarchar(260), with a default of NULL.
This should be able to attach your database to the Server.
After attaching the database, execute DBCC CHECKDB without a repair clause
to
determine the extent of the corruption. DBCC CHECKDB may recommend a repair
clause
to use. Then, execute DBCC CHECKDB with the appropriate repair clause to
repair the
corruption.
CAUTION: If you are unsure what effect DBCC CHECKDB with a repair clause
has on your data, contact your primary support provider before executing
this
statement.
If running DBCC CHECKDB with one of the repair clauses does not correct the
problem, contact your primary support provider.
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.

Repairing .mdf file.

Hi,
Because the .ldf file of my database 'FlexKIDS' had grown
beyong his limits (2,5 G) and I had no space left to do a
backup/shrink of the transaction log, I detached the
database and physically removed the transaction log.
When I re-attach the database (.mdf) with
the EnterpriseManger (sp_attach_db)I received the
following error:
error 1813:Could not open new database 'FlexKIDS'
createdatabase aborted.
Device activation error.The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\data\FlexKIDS_log.ldf' maybe incorrect.
Who can HELP me recover my database only from
the corrupted .mdf file (FlexKIDS.mdf)?
Cheers Jack. (jbonapart@.dicon.nl)Jack
What is the full sp_attach_single_file_db command you are
using?
Regards
John|||John,
EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
@.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>--Original Message--
>Jack
>What is the full sp_attach_single_file_db command you are
>using?
>Regards
>John
>.
>|||John,
I am also including the sp_attach_db command results:
EXEC sp_attach_db @.dbname = 'FlexKIDS',
@.filename1 = 'D:\Microsoft SQL
MSSSQL\Data\FlexKIDS.mdf'
OUTPUT:
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'FlexKIDS'. CREATE DATABASE is
aborted.
Device activation error. The physical file
name 'D:\Microsoft SQL
Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.|||Jack
I just tried it on my system. And it was fine. I created a
database FlexKids, detached it and deleted the log. Used
the same sp_attach_single_db comand you used .
I got one error, by default the data file was created as
FlexKids_data.mdf. When I amended the attach it worked
just fine.
Unless that is your problem, I do not know what else to
suggest, check you have no typos in your command.
Can you copy the .mdf to another server and try to attach
it, just to see if it will work.
Regards
John
>--Original Message--
>John,
>EXEC sp_attach_single_file_db @.dbname = 'FlexKIDS',
> @.physname = 'D:\Microsoft SQL\MSSQL\Data\FlexKIDS.mdf'
>
>OUTPUT:
>Server: Msg 1813, Level 16, State 2, Line 1
>Could not open new database 'FlexKIDS'. CREATE DATABASE
is
>aborted.
>Device activation error. The physical file
>name 'D:\Microsoft SQL
>Server\data\MSSQL\Data\FlexKIDS_Log.ldf' may be incorrect.
>
>>--Original Message--
>>Jack
>>What is the full sp_attach_single_file_db command you
are
>>using?
>>Regards
>>John
>>.
>.
>

Repair Master db

Today, while working on repairing another issue, I managed to cause an even
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason Williard
Read up on rebuildm.exe in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an even bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine. I ran into some issues
> with logins and, following instructions from an article I found, I was trying to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the statement
> and ended up deleting everything in that table. Now I can't connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>
|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>

Repair Master db

Today, while working on repairing another issue, I managed to cause an even
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason WilliardRead up on rebuildm.exe in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an even bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine. I ran into some issues
> with logins and, following instructions from an article I found, I was trying to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the statement
> and ended up deleting everything in that table. Now I can't connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
--
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>

Repair Master db

Today, while working on repairing another issue, I managed to cause an even
bigger issue. Of course, I was not smart enough to backup the db before
touching it...
I have a new instance of SQL Server 2000 running on a Windows 2003 machine.
I ran into some issues with logins and, following instructions from an
article I found, I was trying to delete a single row from the
master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
statement and ended up deleting everything in that table. Now I can't
connect at all.
Is there any solution besides reinstalling SQL Server?
Thank You,
Jason WilliardRead up on rebuildm.exe in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jason Williard" <jason@.pcsafe.net> wrote in message news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com
..
> Today, while working on repairing another issue, I managed to cause an eve
n bigger issue. Of
> course, I was not smart enough to backup the db before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003 machine
. I ran into some issues
> with logins and, following instructions from an article I found, I was try
ing to delete a single
> row from the master.sysxlogins table. Well, I failed to add "WHERE name =
''" to the statement
> and ended up deleting everything in that table. Now I can't connect at al
l.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>|||You can run Rebuildm.exe in the \80\tools\binn to rebuild master database.
-oj
"Jason Williard" <jason@.pcsafe.net> wrote in message
news:6KKdnVSBcNmIjLnfRVn-tA@.comcast.com...
> Today, while working on repairing another issue, I managed to cause an
> even bigger issue. Of course, I was not smart enough to backup the db
> before touching it...
> I have a new instance of SQL Server 2000 running on a Windows 2003
> machine. I ran into some issues with logins and, following instructions
> from an article I found, I was trying to delete a single row from the
> master.sysxlogins table. Well, I failed to add "WHERE name = ''" to the
> statement and ended up deleting everything in that table. Now I can't
> connect at all.
> Is there any solution besides reinstalling SQL Server?
> Thank You,
> Jason Williard
>