Showing posts with label sql2000. Show all posts
Showing posts with label sql2000. Show all posts

Thursday, March 29, 2012

Data files & Log Files in SQL2000

Dear all,
I have a question of the Data files & Log Files in SQL2000.
Is that once someone got the data files and log files of the database, and
he had a SQL server 2000 installed, he can use sp_attach_db command to
restore the database?
Is there any control for this case?
Best Regards,
IvanOnce you have the mdf and or ldf files of a particular db, then you can
attach the database, as far as I know, there is no remedy for this
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>|||Yes , just before detaching you need to kick off all users of the database
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>|||If someone stop the sql server service, copy out the data file and log file,
and start the service...
Then, he can easily duplicate the database.
Ivan
"Uri Dimant" <urid@.iscar.co.il> ¼¶¼g©ó¶l¥ó·s»D:ekHRZox1GHA.480@.TK2MSFTNGP06.phx.gbl...
> Yes , just before detaching you need to kick off all users of the
> database
>
> "Ivan" <ivan@.microsoft.com> wrote in message
> news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>> Dear all,
>> I have a question of the Data files & Log Files in SQL2000.
>> Is that once someone got the data files and log files of the database,
>> and he had a SQL server 2000 installed, he can use sp_attach_db command
>> to restore the database?
>> Is there any control for this case?
>> Best Regards,
>> Ivan
>|||Ivan
Well , not in the same name unless the old database will be droped.
Actually you don't need to stop Services because you can use BACKUP/RESTORE
commands
"Ivan" <ivan@.microsoft.com> wrote in message
news:eyYLC9x1GHA.2036@.TK2MSFTNGP05.phx.gbl...
> If someone stop the sql server service, copy out the data file and log
> file, and start the service...
> Then, he can easily duplicate the database.
> Ivan
> "Uri Dimant" <urid@.iscar.co.il>
> ¼¶¼g©ó¶l¥ó·s»D:ekHRZox1GHA.480@.TK2MSFTNGP06.phx.gbl...
>> Yes , just before detaching you need to kick off all users of the
>> database
>>
>> "Ivan" <ivan@.microsoft.com> wrote in message
>> news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>> Dear all,
>> I have a question of the Data files & Log Files in SQL2000.
>> Is that once someone got the data files and log files of the database,
>> and he had a SQL server 2000 installed, he can use sp_attach_db command
>> to restore the database?
>> Is there any control for this case?
>> Best Regards,
>> Ivan
>>
>|||> Is there any control for this case?
You can secure your database files (and backups) with NTFS permissions so
that only authorized users have access.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>|||... and even use EFS to encrypt the files, in case someone get their hands on the machine and
installs another OS on top of the old OS.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:eqcp3My1GHA.4228@.TK2MSFTNGP06.phx.gbl...
>> Is there any control for this case?
> You can secure your database files (and backups) with NTFS permissions so that only authorized
> users have access.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ivan" <ivan@.microsoft.com> wrote in message news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>> Dear all,
>> I have a question of the Data files & Log Files in SQL2000.
>> Is that once someone got the data files and log files of the database, and he had a SQL server
>> 2000 installed, he can use sp_attach_db command to restore the database?
>> Is there any control for this case?
>> Best Regards,
>> Ivan
>|||Hi,
To add on to tibor; take a look into the below article on implementing EFS
on sql server and its benfits.
http://www.sqlservercentral.com/columnists/bkelley/implementing_efs.asp
With EFS, database files are encrypted under the identity of the account
running SQL Server. Only this account can decrypt the files. If you need to
change the account that runs SQL Server, you should first decrypt the files
under the old account, then re-encrypt them under the new account.
Thanks
Hari
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OfrIXSy1GHA.4752@.TK2MSFTNGP05.phx.gbl...
> ... and even use EFS to encrypt the files, in case someone get their hands
> on the machine and installs another OS on top of the old OS.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:eqcp3My1GHA.4228@.TK2MSFTNGP06.phx.gbl...
>> Is there any control for this case?
>> You can secure your database files (and backups) with NTFS permissions so
>> that only authorized users have access.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Ivan" <ivan@.microsoft.com> wrote in message
>> news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>> Dear all,
>> I have a question of the Data files & Log Files in SQL2000.
>> Is that once someone got the data files and log files of the database,
>> and he had a SQL server 2000 installed, he can use sp_attach_db command
>> to restore the database?
>> Is there any control for this case?
>> Best Regards,
>> Ivan
>>
>

Data files & Log Files in SQL2000

Dear all,
I have a question of the Data files & Log Files in SQL2000.
Is that once someone got the data files and log files of the database, and
he had a SQL server 2000 installed, he can use sp_attach_db command to
restore the database?
Is there any control for this case?
Best Regards,
Ivan
Once you have the mdf and or ldf files of a particular db, then you can
attach the database, as far as I know, there is no remedy for this
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>
|||Yes , just before detaching you need to kick off all users of the database
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>
|||If someone stop the sql server service, copy out the data file and log file,
and start the service...
Then, he can easily duplicate the database.
Ivan
"Uri Dimant" <urid@.iscar.co.il> glsD:ekHRZox1GHA.480@.TK2MSFTNGP06.phx.gb l...
> Yes , just before detaching you need to kick off all users of the
> database
>
> "Ivan" <ivan@.microsoft.com> wrote in message
> news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>
|||Ivan
Well , not in the same name unless the old database will be droped.
Actually you don't need to stop Services because you can use BACKUP/RESTORE
commands
"Ivan" <ivan@.microsoft.com> wrote in message
news:eyYLC9x1GHA.2036@.TK2MSFTNGP05.phx.gbl...
> If someone stop the sql server service, copy out the data file and log
> file, and start the service...
> Then, he can easily duplicate the database.
> Ivan
> "Uri Dimant" <urid@.iscar.co.il>
> glsD:ekHRZox1GHA.480@.TK2MSFTNGP06.phx.gb l...
>
|||> Is there any control for this case?
You can secure your database files (and backups) with NTFS permissions so
that only authorized users have access.
Hope this helps.
Dan Guzman
SQL Server MVP
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>
|||... and even use EFS to encrypt the files, in case someone get their hands on the machine and
installs another OS on top of the old OS.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:eqcp3My1GHA.4228@.TK2MSFTNGP06.phx.gbl...
> You can secure your database files (and backups) with NTFS permissions so that only authorized
> users have access.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ivan" <ivan@.microsoft.com> wrote in message news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>
|||Hi,
To add on to tibor; take a look into the below article on implementing EFS
on sql server and its benfits.
http://www.sqlservercentral.com/colu...enting_efs.asp
With EFS, database files are encrypted under the identity of the account
running SQL Server. Only this account can decrypt the files. If you need to
change the account that runs SQL Server, you should first decrypt the files
under the old account, then re-encrypt them under the new account.
Thanks
Hari
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OfrIXSy1GHA.4752@.TK2MSFTNGP05.phx.gbl...
> ... and even use EFS to encrypt the files, in case someone get their hands
> on the machine and installs another OS on top of the old OS.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:eqcp3My1GHA.4228@.TK2MSFTNGP06.phx.gbl...
>

Data files & Log Files in SQL2000

Dear all,
I have a question of the Data files & Log Files in SQL2000.
Is that once someone got the data files and log files of the database, and
he had a SQL server 2000 installed, he can use sp_attach_db command to
restore the database?
Is there any control for this case?
Best Regards,
IvanOnce you have the mdf and or ldf files of a particular db, then you can
attach the database, as far as I know, there is no remedy for this
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>|||Yes , just before detaching you need to kick off all users of the database
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>|||If someone stop the sql server service, copy out the data file and log file,
and start the service...
Then, he can easily duplicate the database.
Ivan
"Uri Dimant" <urid@.iscar.co.il> glsD:ekHRZox1GHA.480@.TK2MSFTNGP06.phx.gbl...[vbcol
=seagreen]
> Yes , just before detaching you need to kick off all users of the
> database
>
> "Ivan" <ivan@.microsoft.com> wrote in message
> news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
>[/vbcol]|||Ivan
Well , not in the same name unless the old database will be droped.
Actually you don't need to stop Services because you can use BACKUP/RESTORE
commands
"Ivan" <ivan@.microsoft.com> wrote in message
news:eyYLC9x1GHA.2036@.TK2MSFTNGP05.phx.gbl...
> If someone stop the sql server service, copy out the data file and log
> file, and start the service...
> Then, he can easily duplicate the database.
> Ivan
> "Uri Dimant" <urid@.iscar.co.il>
> glsD:ekHRZox1GHA.480@.TK2MSFTNGP06.phx.gbl...
>|||> Is there any control for this case?
You can secure your database files (and backups) with NTFS permissions so
that only authorized users have access.
Hope this helps.
Dan Guzman
SQL Server MVP
"Ivan" <ivan@.microsoft.com> wrote in message
news:OjQEjMx1GHA.476@.TK2MSFTNGP06.phx.gbl...
> Dear all,
> I have a question of the Data files & Log Files in SQL2000.
> Is that once someone got the data files and log files of the database, and
> he had a SQL server 2000 installed, he can use sp_attach_db command to
> restore the database?
> Is there any control for this case?
> Best Regards,
> Ivan
>|||... and even use EFS to encrypt the files, in case someone get their hands
on the machine and
installs another OS on top of the old OS.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:eqcp3My1GHA.4228@.TK2MSFTNGP06.phx.gbl...
> You can secure your database files (and backups) with NTFS permissions so
that only authorized
> users have access.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ivan" <ivan@.microsoft.com> wrote in message news:OjQEjMx1GHA.476@.TK2MSFTN
GP06.phx.gbl...
>|||Hi,
To add on to tibor; take a look into the below article on implementing EFS
on sql server and its benfits.
http://www.sqlservercentral.com/col...menting_efs.asp
With EFS, database files are encrypted under the identity of the account
running SQL Server. Only this account can decrypt the files. If you need to
change the account that runs SQL Server, you should first decrypt the files
under the old account, then re-encrypt them under the new account.
Thanks
Hari
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OfrIXSy1GHA.4752@.TK2MSFTNGP05.phx.gbl...
> ... and even use EFS to encrypt the files, in case someone get their hands
> on the machine and installs another OS on top of the old OS.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:eqcp3My1GHA.4228@.TK2MSFTNGP06.phx.gbl...
>

Tuesday, March 27, 2012

Data file growth not save

Hi,
In my SQL2000 Server, I needs to put 10Mb in the properties>data files
But when i put 10Mb, it fonctionnally few hours but next if i returne in the properties, the parameter goes back to 10%
How i can save definitively 10Mb
ThanksHi Dji_c:
I think it is a behavior of SQL SERVER,After you change the property,
you should update the data before you click back.
Best Wishes
Wei Ci Zhou|||Hi
Ok, but how i should update the data
Sorry I'm novice user of SQL Serve
Thanks

Data file growth not save

Hi,
In my SQL2000 Server, I needs to put 10Mb in the properties>data files.
But when i put 10Mb, it fonctionnally few hours but next if i returne in the
properties, the parameter goes back to 10%.
How i can save definitively 10Mb ?
ThanksHi Dji_c:
I think it is a behavior of SQL SERVER,After you change the property,
you should update the data before you click back.
Best Wishes
Wei Ci Zhou|||Hi,
Ok, but how i should update the data ?
Sorry I'm novice user of SQL Server
Thanks

Sunday, March 25, 2012

Data Driven Subscriptions unavailable, please help

I'm running sql2000 Standard with SP4 applied. I also have Reporting Services 2000 with service packs running on the same machine. I'm trying to get a data-driven subscription, but the button to access is unavailable.

I've assigned the account I'm working under the Publisher role and have modified this role to have all permissions (including managing subscriptions). I have stored credentials with my data source as well.

I can create a standard subscription with no problems, but just don't get the button to do the data-driven option.

Any assistance is appreciated.

You are running RS 2000 Standard Edition. Data driven subscriptions are only available on Enterprise Edition and Developer Edition.

The same applies to data driven subscriptions on RS 2005: http://www.microsoft.com/sql/technologies/reporting/rsfeatures.mspx

-- Robert

|||Is it possible to run the enterprise edition of Reporting Services on the Standard edition of SQL 2000?|||

Actually, you can run a Reporting Services Enterprise Edition with its metadata store on a SQL Server Standard Edition.

-- Robert

|||We have the same issue and we are using the enterprise version. The user who is trying to set-up the data-driven subscription is also an admin on the report server settings...|||

Does anybody know the license implications if you install reporting services 2000 enterprise on a sql server 2000 standard install?

|||Does anybody know the license implications if you install reporting services 2000 enterprise on a sql server 2000 standard install?

Data Driven Subscriptions unavailable, please help

I'm running sql2000 Standard with SP4 applied. I also have Reporting Services 2000 with service packs running on the same machine. I'm trying to get a data-driven subscription, but the button to access is unavailable.

I've assigned the account I'm working under the Publisher role and have modified this role to have all permissions (including managing subscriptions). I have stored credentials with my data source as well.

I can create a standard subscription with no problems, but just don't get the button to do the data-driven option.

Any assistance is appreciated.

You are running RS 2000 Standard Edition. Data driven subscriptions are only available on Enterprise Edition and Developer Edition.

The same applies to data driven subscriptions on RS 2005: http://www.microsoft.com/sql/technologies/reporting/rsfeatures.mspx

-- Robert

|||Is it possible to run the enterprise edition of Reporting Services on the Standard edition of SQL 2000?|||

Actually, you can run a Reporting Services Enterprise Edition with its metadata store on a SQL Server Standard Edition.

-- Robert

|||We have the same issue and we are using the enterprise version. The user who is trying to set-up the data-driven subscription is also an admin on the report server settings...|||

Does anybody know the license implications if you install reporting services 2000 enterprise on a sql server 2000 standard install?

|||Does anybody know the license implications if you install reporting services 2000 enterprise on a sql server 2000 standard install?sql

Data Driven Subscriptions unavailable, please help

I'm running sql2000 Standard with SP4 applied. I also have Reporting Services 2000 with service packs running on the same machine. I'm trying to get a data-driven subscription, but the button to access is unavailable.

I've assigned the account I'm working under the Publisher role and have modified this role to have all permissions (including managing subscriptions). I have stored credentials with my data source as well.

I can create a standard subscription with no problems, but just don't get the button to do the data-driven option.

Any assistance is appreciated.

You are running RS 2000 Standard Edition. Data driven subscriptions are only available on Enterprise Edition and Developer Edition.

The same applies to data driven subscriptions on RS 2005: http://www.microsoft.com/sql/technologies/reporting/rsfeatures.mspx

-- Robert

|||Is it possible to run the enterprise edition of Reporting Services on the Standard edition of SQL 2000?|||

Actually, you can run a Reporting Services Enterprise Edition with its metadata store on a SQL Server Standard Edition.

-- Robert

|||We have the same issue and we are using the enterprise version. The user who is trying to set-up the data-driven subscription is also an admin on the report server settings...|||

Does anybody know the license implications if you install reporting services 2000 enterprise on a sql server 2000 standard install?

|||Does anybody know the license implications if you install reporting services 2000 enterprise on a sql server 2000 standard install?

Friday, February 24, 2012

Damaged databases

Hi

I recently had a hard disk failure on which was running Win2003 SQL2000 SP4.

This server is a sharepoint backend server, I repaired the disk to the point that it could be mirrored across to a new and then set about looking at the databases. There was a schedule in place to backup all 4 DBs daily, the backup process at no time after verifying the backup had any errors. All but one of the DBs reports this error when I attempt to run DBCC or similar query I/O error (bad page ID) detected during read at offset etc. (error 823) I have restored back to the earliest DBs I have and I still get the same error.

Any ideas on how I can recover as much as possible if not all of the DBs? What is the best way to restore from a transaction log? I have found a few articles on it and they all take a slightly different approach for differnet situations however I'm not entirely sure which applies to me.

All help will be very much appreciated.

Rob

Sounds like your backups are corrupt too - I suspect that the disk hardware was going bad for a while and all the backups have backed up corrupted data. Does the backup process backup the databases to the same disk hardware? How often do you run DBCC CHECKDB on your databases to verify their integrity?

You can't recover from just a transaction log - you need to restore a full backup first. What's the DBCC error you get (post the output of "DBCC CHECKDB (yourdb) WITH ALL_ERRORMSGS, NO_INFOMSGS")? Your only option may be to extract what data you can into a new database.

Thanks

Damaged databases

Hi

I recently had a hard disk failure on which was running Win2003 SQL2000 SP4.

This server is a sharepoint backend server, I repaired the disk to the point that it could be mirrored across to a new and then set about looking at the databases. There was a schedule in place to backup all 4 DBs daily, the backup process at no time after verifying the backup had any errors. All but one of the DBs reports this error when I attempt to run DBCC or similar query I/O error (bad page ID) detected during read at offset etc. (error 823) I have restored back to the earliest DBs I have and I still get the same error.

Any ideas on how I can recover as much as possible if not all of the DBs? What is the best way to restore from a transaction log? I have found a few articles on it and they all take a slightly different approach for differnet situations however I'm not entirely sure which applies to me.

All help will be very much appreciated.

Rob

Sounds like your backups are corrupt too - I suspect that the disk hardware was going bad for a while and all the backups have backed up corrupted data. Does the backup process backup the databases to the same disk hardware? How often do you run DBCC CHECKDB on your databases to verify their integrity?

You can't recover from just a transaction log - you need to restore a full backup first. What's the DBCC error you get (post the output of "DBCC CHECKDB (yourdb) WITH ALL_ERRORMSGS, NO_INFOMSGS")? Your only option may be to extract what data you can into a new database.

Thanks

Damaged database

I in a real catastrophic scenario in a SQL2000
installation:
Due to a hardware failure:
I HAVE A SINGLE MDF, NOTHING ELSE .
The database originally was formed with this single mdf
and a single ldf, and its recovery model was simple.
I tried sp_attach_single_file_db as documented, but it
returned errors.
I tried to out smart the engine and create a database
with same name, and BORROW its log, but when attaching
with my lonely mdf, the engine returned a logical error
massage telling me that these two files doesn't belong .
Please can anyone help ?If that didn't work then you're in a bit of trouble but you can try this
**Make sure you have a copy of your MDF first and a backup of master**
Replace the filenames with your filename !!!
1) Make sure you have a copy of PowerDVD301_2_Data.MDF
2) Create a new database called fake (default file locations)
3) Stop SQL Service
4) Delete the fake_Data.MDF and copy PowerDVD301_2_Data.MDF
to where fake_Data.MDF used to be and rename the file to fake_Data.MDF
5) Start SQL Service
6) Database fake will appear as suspect in EM
7) Open Query Analyser and in master database run the following :
sp_configure 'allow updates',1
go
reconfigure with override
go
update sysdatabases set
status=-32768 where dbid=DB_ID('fake')
go
sp_configure 'allow updates',0
go
reconfigure with override
go
This will put the database in emergency recovery mode
8) Stop SQL Service
9) Delete the fake_Log.LDF file
10) Restart SQL Service
11) In QA run the following (with correct path for log)
dbcc rebuild_log('fake','h:\fake_log.ldf')
go
dbcc checkdb('fake') -- to check for errors
go
12) Now we need to rename the files, run the following (make sure
there are no connections to it) in Query Analyser
(At this stage you can actually access the database so you could use
DTS or bcp to move the data to another database .)
use master
go
sp_helpdb 'fake'
go
/* Make a note of the names of the files , you will need them
in the next bit of the script to replace datafilename and
logfilename - it might be that they have the right names */
sp_renamedb 'fake','PowerDVD301'
go
alter database PowerDVD301
MODIFY FILE(NAME='datafilename', NEWNAME = 'PowerDVD301_Data')
go
alter database PowerDVD301
MODIFY FILE(NAME='logfilename', NEWNAME = 'PowerDVD301_Log')
go
dbcc checkdb('PowerDVD301')
go
sp_dboption 'PowerDVD301','dbo use only','false'
go
use PowerDVD301
go
sp_updatestats
go
13) You should now have a working database. However the log file
will be small so it will be worth increasing its size
Unfortunately your files will be called fake_Data.MDF and
fake_Log.LDF but you can get round this by detaching the
database properly and then renaming the files and reattaching
it
14) Run the following in QA
sp_detach_db PowerDVD301
--now rename the files then reattach
sp_attach_db 'PowerDVD301','h:\dvd.mdf','h:\DVD.ldf'
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"ATS967" <anonymous@.discussions.microsoft.com> wrote in message
news:098d01c3a06f$83c18e20$a301280a@.phx.gbl...
I in a real catastrophic scenario in a SQL2000
installation:
Due to a hardware failure:
I HAVE A SINGLE MDF, NOTHING ELSE .
The database originally was formed with this single mdf
and a single ldf, and its recovery model was simple.
I tried sp_attach_single_file_db as documented, but it
returned errors.
I tried to out smart the engine and create a database
with same name, and BORROW its log, but when attaching
with my lonely mdf, the engine returned a logical error
massage telling me that these two files doesn't belong .
Please can anyone help ?