Windows 2003 server
SQL2000 installed and running
Create a database on C:\Data called Ctest
Create a database on F:\Data called Ftest
Detach both databases.
Move Ftest to c:\Data folder.
Move Ctest to F:\Data folder.
Reattach both databases from their new locations.
Here's the problem --
Both are read only now.
Un-checking the Read only properties causes an error 5105 "device
activation..."
I do the same thing on another system and they don't attach as read
only.
Any ideas on this one?
Mark GMark,
Check the file properties for the .mdf and .ldf files - are they read-only?
Also since this is a test box try restarting the server as well.
HTH
Jerry
"Mark G" <megriep@.gmail.com> wrote in message
news:1128185904.036026.202210@.o13g2000cwo.googlegroups.com...
> Windows 2003 server
> SQL2000 installed and running
> Create a database on C:\Data called Ctest
> Create a database on F:\Data called Ftest
> Detach both databases.
>
> Move Ftest to c:\Data folder.
> Move Ctest to F:\Data folder.
>
> Reattach both databases from their new locations.
>
> Here's the problem --
> Both are read only now.
> Un-checking the Read only properties causes an error 5105 "device
> activation..."
>
> I do the same thing on another system and they don't attach as read
> only.
>
> Any ideas on this one?
>
> Mark G
>|||And also verify that the SQL Server service account has proper permission on the files.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:Onzf8DrxFHA.3400@.TK2MSFTNGP14.phx.gbl...
> Mark,
> Check the file properties for the .mdf and .ldf files - are they read-only? Also since this is a
> test box try restarting the server as well.
> HTH
> Jerry
> "Mark G" <megriep@.gmail.com> wrote in message
> news:1128185904.036026.202210@.o13g2000cwo.googlegroups.com...
>> Windows 2003 server
>> SQL2000 installed and running
>> Create a database on C:\Data called Ctest
>> Create a database on F:\Data called Ftest
>> Detach both databases.
>>
>> Move Ftest to c:\Data folder.
>> Move Ctest to F:\Data folder.
>>
>> Reattach both databases from their new locations.
>>
>> Here's the problem --
>> Both are read only now.
>> Un-checking the Read only properties causes an error 5105 "device
>> activation..."
>>
>> I do the same thing on another system and they don't attach as read
>> only.
>>
>> Any ideas on this one?
>>
>> Mark G
>|||Thanks,
Yes, it's a permissions thing--something to do with Windows. Not sure
why one system has the problem and the other doesn't. I'll have to
look into it.
Thanks for all your help.
Mark.
Showing posts with label sql2000. Show all posts
Showing posts with label sql2000. Show all posts
Monday, March 26, 2012
Wednesday, March 21, 2012
Read + Statistics from SQl
I have a very big problem. I must do this vbs or i'll be fired...Help me, i'm newbie at vb...
I have a SQL2000 database with a columns defined like that:
Server name, data, service1, service2, ..., service7.
Records looks something like that:
k2-ss-ss, 2003-08-13, 1, 0, 1, 1, 1, 1, 0.
k2-qq-ww, 2003-08-14 0, 0, 1, 1, 0, 0, 1.
"1" - means running
"0" - means stopped
example
a write: "service1", "2003-08-11 ", "2003-08-14"
Script list, that service1 worked 94,3% at choosed period, on k2-ss-ss.
Script list, that service1 worked 06,3% at choosed period, on k2-qq-ww.
Records to the database are writen every 3 minutes.
Can anyone help me? Some piece of code?:(create procedure SaveYerAss
(@.Service varchar(50),
@.StartDate datetime,
@.EndDate datetime)
as
select @.Service + ' worked ' +
case @.Service
when 'Service1' then 100 * Service1Count/RecordCount
when 'Service2' then 100 * Service2Count/RecordCount
when 'Service3' then 100 * Service3Count/RecordCount
when 'Service4' then 100 * Service4Count/RecordCount
when 'Service5' then 100 * Service5Count/RecordCount
when 'Service6' then 100 * Service6Count/RecordCount
when 'Service7' then 100 * Service7Count/RecordCount
end
+ '% at choosed period, on ' + Servername + '.'
From
(select servername,
sum([service1]) Service1Count,
sum([service2]) Service2Count,
sum([service3]) Service3Count,
sum([service4]) Service4Count,
sum([service5]) Service5Count,
sum([service6]) Service6Count,
sum([service7]) Service7Count,
count(*) RecordCount
from [YerDataTable]
where [data] between @.StartDate and @.EndDate) SummarizedData|||bm, your subquery lacks a
group by servername
clause.|||Well, he ought to do SOMETHING to save his own job! :D|||bm, I take it as a THANKS. :D|||What do you want to bet that was a homework problem?
I have a SQL2000 database with a columns defined like that:
Server name, data, service1, service2, ..., service7.
Records looks something like that:
k2-ss-ss, 2003-08-13, 1, 0, 1, 1, 1, 1, 0.
k2-qq-ww, 2003-08-14 0, 0, 1, 1, 0, 0, 1.
"1" - means running
"0" - means stopped
example
a write: "service1", "2003-08-11 ", "2003-08-14"
Script list, that service1 worked 94,3% at choosed period, on k2-ss-ss.
Script list, that service1 worked 06,3% at choosed period, on k2-qq-ww.
Records to the database are writen every 3 minutes.
Can anyone help me? Some piece of code?:(create procedure SaveYerAss
(@.Service varchar(50),
@.StartDate datetime,
@.EndDate datetime)
as
select @.Service + ' worked ' +
case @.Service
when 'Service1' then 100 * Service1Count/RecordCount
when 'Service2' then 100 * Service2Count/RecordCount
when 'Service3' then 100 * Service3Count/RecordCount
when 'Service4' then 100 * Service4Count/RecordCount
when 'Service5' then 100 * Service5Count/RecordCount
when 'Service6' then 100 * Service6Count/RecordCount
when 'Service7' then 100 * Service7Count/RecordCount
end
+ '% at choosed period, on ' + Servername + '.'
From
(select servername,
sum([service1]) Service1Count,
sum([service2]) Service2Count,
sum([service3]) Service3Count,
sum([service4]) Service4Count,
sum([service5]) Service5Count,
sum([service6]) Service6Count,
sum([service7]) Service7Count,
count(*) RecordCount
from [YerDataTable]
where [data] between @.StartDate and @.EndDate) SummarizedData|||bm, your subquery lacks a
group by servername
clause.|||Well, he ought to do SOMETHING to save his own job! :D|||bm, I take it as a THANKS. :D|||What do you want to bet that was a homework problem?
Subscribe to:
Posts (Atom)