Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Wednesday, March 7, 2012

databse restore

Hello,
I have situation where I will need to restore from.
Monday -- Full backup + Transaction Log ever hour
Tuesday -- Deferential Backup +Transaction Log ever hour
Wednesday --Deferential Backup Transaction Log ever hour at 7 PM database
suspect and I will need to restore from my backup
Do I go and restore Full backup + deferential backup of Tuesday +
deferential Backup of Wednesday + Transaction log that was taken after that
deferential backup on Wednesday ?
Thanks,Hello,
I would recommend to find out first why database became suspect and fix that
problem. To restore use Monday full backup, the last differential backup
(Wednesday) and all the transaction log backups since the last differential
backup.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Ron A" wrote:
> Hello,
>
> I have situation where I will need to restore from.
>
> Monday -- Full backup + Transaction Log ever hour
>
> Tuesday -- Deferential Backup +Transaction Log ever hour
>
> Wednesday --Deferential Backup Transaction Log ever hour at 7 PM database
> suspect and I will need to restore from my backup
>
> Do I go and restore Full backup + deferential backup of Tuesday +
> deferential Backup of Wednesday + Transaction log that was taken after that
> deferential backup on Wednesday ?
>
> Thanks,
>
>|||Ron
How about restoring FULL backup + LOG backup at 7PM ( I assume you took
backup log file just after a database became corrupted)
"Ron A" <omranu@.Gmail.com> wrote in message
news:er$LhgoHIHA.2100@.TK2MSFTNGP03.phx.gbl...
> Hello,
>
> I have situation where I will need to restore from.
>
> Monday -- Full backup + Transaction Log ever hour
>
> Tuesday -- Deferential Backup +Transaction Log ever hour
>
> Wednesday --Deferential Backup Transaction Log ever hour at 7 PM
> database suspect and I will need to restore from my backup
>
> Do I go and restore Full backup + deferential backup of Tuesday +
> deferential Backup of Wednesday + Transaction log that was taken after
> that deferential backup on Wednesday ?
>
> Thanks,
>
>

Sunday, February 26, 2012

Databases missing from Backup Task of Maintenance Plan

I'm moving databases from SQL7 to another server with SQL2005.

I have created new databases in SQL2005 via a restore from backup files created in the old server. Now I want to back up these new databases but they don't show in the Backup Task of a new or existing Maintenance Plan in Management Studio. I can backup them manually though. Any ideas?

I assume you have restored this database to a local 2005 server. If this is the case, they should show up. Maintenance plans can not make connections to SQL 7. Can you see this database via Management Studio?|||

Rob,

Yes, that's correct. I restored the databases to another server running SQL2005. None of the databases show up in any task of Management Studio's Maintenance Plans (eg Backup, Shrink, ReOrg)

-Bill

|||

Found the problem - the compatibility level was set to SQL Server 7.0 by default ( under database properties->options). As soon as I changed the compatiblity level to SQL Server 2000, the databases showed up in the Maintenance Plan tasks.

Thank you for your responses.

Sunday, February 19, 2012

Databasemail

Hi,

i have set up databasemail to send me e-mail after my sql backup has finished.

Profile and account has bin configured,and test mail ha been sent. Works just fine.

But when my backup has finished, no e-mail is being sent.

Get this error message in error logs: [264] An attemtemt was made to send an e-mail when no email session was established.

My system is

Microsoft Windows Server 2003 R2. SP2. Standard Edition.

SQL sever 2005, sp2

Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML 2.6 3.0 6.0
Microsoft Internet Explorer 6.0.3790.3959
Microsoft .NET Framework 2.0.50727.832
Operating System 5.2.3790

DId you have a look on:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=354995&SiteID=1

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||You can use the below code as step two in your backup job to invoke mail alert.
Dont forget to change profilename,recipients, subject & body in the below code before inserting into job

Code Snippet

Exec msdb..sp_send_dbmail @.profile_name='<profilename>',
@.recipients='Your Email Address',
@.subject='Your Subject here',
@.body='Your Body Message',
@.query='SET NOCOUNT ON
select ''SERVER NAME : '' + @.@.servername
select SUBSTRING(s.name,1,40) AS ''Database Name'',
CAST(b.backup_start_date AS char(25)) AS ''Last Backup Date'',
CASE WHEN b.backup_start_date > DATEADD(dd,-1,getdate())
THEN ''Backup Completed ''
WHEN b.backup_start_date > DATEADD(dd,-7,getdate())
THEN ''Backup Older than One day ''
ELSE ''Backup Older than One Week ''
END
AS ''Status'',
substring(m.physical_device_name ,1,100) AS ''Backup File Name''

from master..sysdatabases s
LEFT OUTER JOIN msdb..backupset b
ON s.name = b.database_name
AND b.backup_start_date = (SELECT MAX(backup_start_date)
FROM msdb..backupset
WHERE database_name = b.database_name
AND type = ''D'' ) -- full database backups only, not log backups
left outer join msdb..backupmediafamily m
on m.media_set_id=b.media_set_id
and m.physical_device_name=(select max(physical_device_name) from msdb..backupmediafamily
where media_set_id=b.media_set_id)
WHERE s.name <> ''tempdb''
ORDER BY s.name'


Database won't backup?

I have 5 databases that I backup nightly, but one of them won't allow me to
backup to the .DEV file on the server. I just tried to backup manually and
got the following error. I search on the KB and Google, but didn't find much.
I even recreated the .DEV file without luck. Any ideas?
(running SQL 2000 SP4 on Windows 2003 sp1)
EVENT # 17530
EVENT LOG Application
EVENT TYPE Error
SOURCE MSSQLSERVER
CATEGORY Backup
EVENT ID 17055
USERNAME ADVOCACYINC\Administrator
COMPUTERNAME INTAKE2003
TIME 1/9/2007 10:10:27 AM
MESSAGE 3041 :
BACKUP failed to complete the command BACKUP DATABASE [EducationAndTraining]
TO DISK = N'E:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\EducationAndTraining\Education AndTraining.BAK' WITH
NOINIT , NOUNLOAD , NAME = N'EducationAndTraining backup', NOSKIP , STATS =
10, NOFORMAT
BINARY DATA 0000: E1 0B 00 00 10 00 00 00 0B 00 00 00 49 00 4E 00
0010: 54 00 41 00 4B 00 45 00 32 00 30 00 30 00 33 00
0020: 00 00 15 00 00 00 45 00 64 00 75 00 63 00 61 00
0030: 74 00 69 00 6F 00 6E 00 41 00 6E 00 64 00 54 00
0040: 72 00 61 00 69 00 6E 00 69 00 6E 00 67 00 00 00
0050:
Hello,
Check if you have enough hard disk space in E Drive. I feel that this is
because you do not have enough room to backup the database into the hard
disk.
One more suggestion is you are using NOINIT, this will append the backups
files and cause the file to grow very high resulting in using the
hard disk space. So instead you NOINIT you can use WITH INIT. This will
reinitialize the backup file.
Thanks
Hari
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:B74FA9F7-B751-4891-8AA8-D6F64EB37FD0@.microsoft.com...
>I have 5 databases that I backup nightly, but one of them won't allow me to
> backup to the .DEV file on the server. I just tried to backup manually and
> got the following error. I search on the KB and Google, but didn't find
> much.
> I even recreated the .DEV file without luck. Any ideas?
> (running SQL 2000 SP4 on Windows 2003 sp1)
> EVENT # 17530
> EVENT LOG Application
> EVENT TYPE Error
> SOURCE MSSQLSERVER
> CATEGORY Backup
> EVENT ID 17055
> USERNAME ADVOCACYINC\Administrator
> COMPUTERNAME INTAKE2003
> TIME 1/9/2007 10:10:27 AM
> MESSAGE 3041 :
> BACKUP failed to complete the command BACKUP DATABASE
> [EducationAndTraining]
> TO DISK = N'E:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\EducationAndTraining\Education AndTraining.BAK' WITH
> NOINIT , NOUNLOAD , NAME = N'EducationAndTraining backup', NOSKIP , STATS
> =
> 10, NOFORMAT
> BINARY DATA 0000: E1 0B 00 00 10 00 00 00 0B 00 00 00 49 00 4E 00
> 0010: 54 00 41 00 4B 00 45 00 32 00 30 00 30 00 33 00
> 0020: 00 00 15 00 00 00 45 00 64 00 75 00 63 00 61 00
> 0030: 74 00 69 00 6F 00 6E 00 41 00 6E 00 64 00 54 00
> 0040: 72 00 61 00 69 00 6E 00 69 00 6E 00 67 00 00 00
> 0050:
>
|||The hard drive has plenty of disk space. I'm wondering if the database might
be corrupt. Is there a way to check? If so, what is the procedure to cleanup
a corrupt database?
thanks,
Carlton.
"Hari Prasad" wrote:

> Hello,
> Check if you have enough hard disk space in E Drive. I feel that this is
> because you do not have enough room to backup the database into the hard
> disk.
> One more suggestion is you are using NOINIT, this will append the backups
> files and cause the file to grow very high resulting in using the
> hard disk space. So instead you NOINIT you can use WITH INIT. This will
> reinitialize the backup file.
> Thanks
> Hari
> "Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
> news:B74FA9F7-B751-4891-8AA8-D6F64EB37FD0@.microsoft.com...
>
>
|||use
"DBCC Checkdb" on the database to see if some corruption is there...
also try "dbcc checkalloc" on the database.
"Cwhitmore" wrote:
[vbcol=seagreen]
> The hard drive has plenty of disk space. I'm wondering if the database might
> be corrupt. Is there a way to check? If so, what is the procedure to cleanup
> a corrupt database?
> thanks,
> Carlton.
> "Hari Prasad" wrote:

Database won't backup?

I have 5 databases that I backup nightly, but one of them won't allow me to
backup to the .DEV file on the server. I just tried to backup manually and
got the following error. I search on the KB and Google, but didn't find much
.
I even recreated the .DEV file without luck. Any ideas?
(running SQL 2000 SP4 on Windows 2003 sp1)
EVENT # 17530
EVENT LOG Application
EVENT TYPE Error
SOURCE MSSQLSERVER
CATEGORY Backup
EVENT ID 17055
USERNAME ADVOCACYINC\Administrator
COMPUTERNAME INTAKE2003
TIME 1/9/2007 10:10:27 AM
MESSAGE 3041 :
BACKUP failed to complete the command BACKUP DATABASE [EducationAndTrain
ing]
TO DISK = N'E:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\EducationAndTraining
\EducationAndTraining.BAK' WITH
NOINIT , NOUNLOAD , NAME = N'EducationAndTraining backup', NOSKIP , STATS =
10, NOFORMAT
BINARY DATA 0000: E1 0B 00 00 10 00 00 00 0B 00 00 00 49 00 4E 00
0010: 54 00 41 00 4B 00 45 00 32 00 30 00 30 00 33 00
0020: 00 00 15 00 00 00 45 00 64 00 75 00 63 00 61 00
0030: 74 00 69 00 6F 00 6E 00 41 00 6E 00 64 00 54 00
0040: 72 00 61 00 69 00 6E 00 69 00 6E 00 67 00 00 00
0050:Hello,
Check if you have enough hard disk space in E Drive. I feel that this is
because you do not have enough room to backup the database into the hard
disk.
One more suggestion is you are using NOINIT, this will append the backups
files and cause the file to grow very high resulting in using the
hard disk space. So instead you NOINIT you can use WITH INIT. This will
reinitialize the backup file.
Thanks
Hari
"Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
news:B74FA9F7-B751-4891-8AA8-D6F64EB37FD0@.microsoft.com...
>I have 5 databases that I backup nightly, but one of them won't allow me to
> backup to the .DEV file on the server. I just tried to backup manually and
> got the following error. I search on the KB and Google, but didn't find
> much.
> I even recreated the .DEV file without luck. Any ideas?
> (running SQL 2000 SP4 on Windows 2003 sp1)
> EVENT # 17530
> EVENT LOG Application
> EVENT TYPE Error
> SOURCE MSSQLSERVER
> CATEGORY Backup
> EVENT ID 17055
> USERNAME ADVOCACYINC\Administrator
> COMPUTERNAME INTAKE2003
> TIME 1/9/2007 10:10:27 AM
> MESSAGE 3041 :
> BACKUP failed to complete the command BACKUP DATABASE
> [EducationAndTraining]
> TO DISK = N'E:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\EducationAndTraining
\EducationAndTraining.BAK' WITH
> NOINIT , NOUNLOAD , NAME = N'EducationAndTraining backup', NOSKIP , STATS
> =
> 10, NOFORMAT
> BINARY DATA 0000: E1 0B 00 00 10 00 00 00 0B 00 00 00 49 00 4E 00
> 0010: 54 00 41 00 4B 00 45 00 32 00 30 00 30 00 33 00
> 0020: 00 00 15 00 00 00 45 00 64 00 75 00 63 00 61 00
> 0030: 74 00 69 00 6F 00 6E 00 41 00 6E 00 64 00 54 00
> 0040: 72 00 61 00 69 00 6E 00 69 00 6E 00 67 00 00 00
> 0050:
>|||The hard drive has plenty of disk space. I'm wondering if the database might
be corrupt. Is there a way to check? If so, what is the procedure to cleanup
a corrupt database?
thanks,
Carlton.
"Hari Prasad" wrote:

> Hello,
> Check if you have enough hard disk space in E Drive. I feel that this is
> because you do not have enough room to backup the database into the hard
> disk.
> One more suggestion is you are using NOINIT, this will append the backups
> files and cause the file to grow very high resulting in using the
> hard disk space. So instead you NOINIT you can use WITH INIT. This will
> reinitialize the backup file.
> Thanks
> Hari
> "Cwhitmore" <Cwhitmore@.discussions.microsoft.com> wrote in message
> news:B74FA9F7-B751-4891-8AA8-D6F64EB37FD0@.microsoft.com...
>
>|||use
"DBCC Checkdb" on the database to see if some corruption is there...
also try "dbcc checkalloc" on the database.
"Cwhitmore" wrote:
[vbcol=seagreen]
> The hard drive has plenty of disk space. I'm wondering if the database mig
ht
> be corrupt. Is there a way to check? If so, what is the procedure to clean
up
> a corrupt database?
> thanks,
> Carlton.
> "Hari Prasad" wrote:
>

Database wont backup or anything...

Hi

I have a database on my SQL Server which since Saturday will not backup. It is part of a maintenance plan which should do backup, log and optimisations. None of these will work on this database. Running a backup manually or using the maintenance plan jobs once started the job just sits there saying 'Executing job step 1'.

We had a problem with the server on Friday to do with tape backups and the server was rebooted. There was no issue with SQL Server its self. All other databases are OK and backup normally even those in the same maintenance plan as this dodgy database.

The system which uses this database works fine with no problems. EDIT: I should add that the first attempt at backing up where I realised there was a problem I stopped the backup from running and it said it had been going for 102 Hours! Even though it went for that amount of time it made no progress. The database only normally takes about 30 secs to a minute to backup.

What can I do to fix this?

Neil.are you able to backup the database through the QA or EM?|||Hi

It does not work in EM but I will give QA a quick try.

Neil.|||Have tried QA and that isn't working either. I set stats to 10 so it should give me some progress but I don't get anything :(|||Don't use a Maint Plan?

Write the backup yourself, or steal one

You should be able to find something here

http://weblogs.sqlteam.com/tarad/category/95.aspx|||how much space is on the destination drive and how big is your database?|||Run sp_who2 in Query Analyzer. Look for a session that is labeled "Backup database". Kill that SPID. It is possible that you have a failed backup that is blocking all others.|||Database is 50Mb and directory has about 25gig spare. Have just tried sp_who2 and there i only one thing in the list relating to my database and its me. There are no Backup Database commands running.|||Something I did get yesterday but forgot to post was when running the backup in QA it responded after several minutes saysing:

Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'D:\'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

Is this trying to tell me my D drive is offline or something? If so it lies because that's where everything else is backing up to OK.

Neil.|||Have u changed the location of ur backups lately....try changing the folder location there might be some permissions issues on that particular drive......|||Mystery almost solved...

Have changed the backup directory to use the L drive instead and I can backup the database sucessfully. If I try a backup on the usual D drive area it fails or never starts.

This is what I think happened:

The server I am using is a cluster between two servers so and at the weekend our techies had a problem with the tape software on one of the servers say ServerX. The cluster was currently running on ServerX and when they had to reboot it the cluster failed over to ServerY. So now the cluster is on ServerY and for some reason I can't backup this database to ServerY D drive.

Does that sound about right? Anyone know why I woul have issues with one database not saving to the D drive?|||Seems ok now we backed up to L drive ok. Now tried D drive again and that works. Weired...

Friday, February 17, 2012

Database will not restore from backup

have a production database running on SQL 2000 Enterprise with service pack
3, that until monday had a DTS package copying to another SQL Server for
development work. On monday a developer ran the package manually and it
failed with the error message "bulk copy transaction failed" error code
80045707. Since then it will not copy the database to the other SQL instance.
Tried to restore the databse on the same SQL instance to another database
name but the restore hangs with the message "loading".
I cannot put the database in into restricted access with SQL Enterprise
Management.
I have run DBCC DBCHECK and get no error reported.
Any suggestions?
Regards
Drew
I can do a restore of the database but still cannot run the DTS package to
copy the database even on the same server.
"drew" wrote:

> have a production database running on SQL 2000 Enterprise with service pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code
> 80045707. Since then it will not copy the database to the other SQL instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew
|||Hi,
Can you execute the Restore database using Query analyzer .
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name withpa
th',stats=10
Stats=10 will show the progress of restore.
Thanks
Hari
MCDBA
"drew" <drew@.discussions.microsoft.com> wrote in message
news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
> have a production database running on SQL 2000 Enterprise with service
> pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code>
> 80045707. Since then it will not copy the database to the other SQL
> instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew
|||I have managed to get the backup working. I am now trying to figure out why
the DTS package is failing. The paackage stops at the same table each time so
I will try and copy the database between servers less that table to see if
that clears the problem.
Thanks Drew
"Hari Prasad" wrote:

> Hi,
> Can you execute the Restore database using Query analyzer .
> 1. Using Restore filelistonly command identify the logical file names of the
> database backup file
> RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
> 2. With the output of the above query use RESTORE database
> RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
> WITH move 'logical_mdf_filename' to 'new physical name with path',
> move 'logical_ldf_filename' to 'new physical log name withpa
> th',stats=10
> Stats=10 will show the progress of restore.
> Thanks
> Hari
> MCDBA
>
> "drew" <drew@.discussions.microsoft.com> wrote in message
> news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
>
>

Database will not restore from backup

have a production database running on SQL 2000 Enterprise with service pack
3, that until monday had a DTS package copying to another SQL Server for
development work. On monday a developer ran the package manually and it
failed with the error message "bulk copy transaction failed" error code
80045707. Since then it will not copy the database to the other SQL instance.
Tried to restore the databse on the same SQL instance to another database
name but the restore hangs with the message "loading".
I cannot put the database in into restricted access with SQL Enterprise
Management.
I have run DBCC DBCHECK and get no error reported.
Any suggestions?
Regards
DrewI can do a restore of the database but still cannot run the DTS package to
copy the database even on the same server.
"drew" wrote:
> have a production database running on SQL 2000 Enterprise with service pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code
> 80045707. Since then it will not copy the database to the other SQL instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew|||Hi,
Can you execute the Restore database using Query analyzer .
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name withpa
th',stats=10
Stats=10 will show the progress of restore.
Thanks
Hari
MCDBA
"drew" <drew@.discussions.microsoft.com> wrote in message
news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
> have a production database running on SQL 2000 Enterprise with service
> pack
> 3, that until monday had a DTS package copying to another SQL Server for
> development work. On monday a developer ran the package manually and it
> failed with the error message "bulk copy transaction failed" error code>
> 80045707. Since then it will not copy the database to the other SQL
> instance.
> Tried to restore the databse on the same SQL instance to another database
> name but the restore hangs with the message "loading".
> I cannot put the database in into restricted access with SQL Enterprise
> Management.
> I have run DBCC DBCHECK and get no error reported.
>
> Any suggestions?
>
> Regards
> Drew|||I have managed to get the backup working. I am now trying to figure out why
the DTS package is failing. The paackage stops at the same table each time so
I will try and copy the database between servers less that table to see if
that clears the problem.
Thanks Drew
"Hari Prasad" wrote:
> Hi,
> Can you execute the Restore database using Query analyzer .
> 1. Using Restore filelistonly command identify the logical file names of the
> database backup file
> RESTORE FILELISTONLY from disk='c:\backup\dbname.bak'
> 2. With the output of the above query use RESTORE database
> RESTORE DATABASE <newdbname> from disk='c:\backup\dbname.bak'
> WITH move 'logical_mdf_filename' to 'new physical name with path',
> move 'logical_ldf_filename' to 'new physical log name withpa
> th',stats=10
> Stats=10 will show the progress of restore.
> Thanks
> Hari
> MCDBA
>
> "drew" <drew@.discussions.microsoft.com> wrote in message
> news:78023771-E516-4373-A1D3-BC922A4397D4@.microsoft.com...
> > have a production database running on SQL 2000 Enterprise with service
> > pack
> > 3, that until monday had a DTS package copying to another SQL Server for
> > development work. On monday a developer ran the package manually and it
> > failed with the error message "bulk copy transaction failed" error code>
> > 80045707. Since then it will not copy the database to the other SQL
> > instance.
> >
> > Tried to restore the databse on the same SQL instance to another database
> > name but the restore hangs with the message "loading".
> >
> > I cannot put the database in into restricted access with SQL Enterprise
> > Management.
> >
> > I have run DBCC DBCHECK and get no error reported.
> >
> >
> >
> > Any suggestions?
> >
> >
> > Regards
> >
> > Drew
>
>

Database Users Appear to be Corrupt

We had a hardware error on our production machine and had to replace it with
our backup machine. Both machines are running SQL Server 2000 on Windows
2000. I used the SQL Server database backup file from production to restore
the backup server.
I know about the sid's being out of sync between the logins and the database
users. I used our standard procedures to re-align them but must have done
something wrong. Now when I run sp_change_users_login 'Report', the list is
empty. I can see the users listed under the database using the enterprise
manager and the users can access the database but I fear that some table
somewhere pertaining to users is corrupted.You should be ok. The Report option of
sp_change_users_login only lists logins that are out of
sync. If you don't get any back from
sp_change_users_login 'Report', then they should all be in
sync.
This is taken directly from BOL pertaining to the Report
option:
"Lists the users, and their corresponding security
identifiers (SID), that are in the current database, not
linked to any login."
>--Original Message--
>We had a hardware error on our production machine and had
to replace it with
>our backup machine. Both machines are running SQL Server
2000 on Windows
>2000. I used the SQL Server database backup file from
production to restore
>the backup server.
>I know about the sid's being out of sync between the
logins and the database
>users. I used our standard procedures to re-align them
but must have done
>something wrong. Now when I run
sp_change_users_login 'Report', the list is
>empty. I can see the users listed under the database
using the enterprise
>manager and the users can access the database but I fear
that some table
>somewhere pertaining to users is corrupted.
>
>.
>|||Hi Robert,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with your issue.
As Van has pointed out, no report from sp_change_ueses_login means no sync problem of
the corresponding SID and everything seems fine on your side.
It is also recommended you try Database Consistency Checker (DBCC) statements after you
backup and restore your database.
You can use DBCC CHECKDB to check the allocation and structural integrity of the whole
database, or use DBCC CHECKALLOC / DBCC CHECKTABLE to check the individual objects
(including some suspicious tables).
For more information, please refer to Books Online on the topic "DBCC CHECKDB" and
"DBCC CHECKTABLE".
Robert, does this answer your question? If there is anything more we can do to assist you,
please feel free to post it in the group
Best regards,
Billy Yao
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

database user post extraction

please can anyone help me i have a ipb forum some how i accidently delete my post i have a old backup from 3 week ago how can i extract the post from the backup
NOTE: the only post that was deleted was post made by me none of the other member post was deleted
i did not want to restore the entire post table beacause i would loose post in the past 3 weeks
can anyone help me with a script or anything i can used to extract post of the post table where the poster id is 1
here is a sample

INSERT INTO `ibf_posts` VALUES (2, 0, NULL, 1, 'albertldee', 1, 1, '12.8.34.199'
INSERT INTO `ibf_posts` VALUES (3, 0, NULL, 4, '??-?', 1, 1, '207.44.154.35
INSERT INTO `ibf_posts` VALUES (4, 0, NULL, 6, 'demarcus', 1, 1, '69.142.131.149
INSERT INTO `ibf_posts` VALUES (5, 0, NULL, 7, 'gottasteu', 1, 1, '65.12.169.41

the post table has about 122000 line like above i just want to extract all the line that has albertldee like line number 1Try something like:
INSERT INTO ibf_posts
SELECT * FROM ibf_posts_backup
WHERE user_id = 'albertldee';
NOTE: Change user_id to the correct column name.

:D|||thanks but how do i set it up|||or can anyone tell me how can i setup a query to check a table and insert a line if it's not already exist|||Post a description of both the 'ibf_posts' and the backup table.
:confused: