Wednesday, March 28, 2012
Question regarding sp_detach
Deleted the .ldf file associated with the database and
then ran this:
EXEC sp_attach_single_file_db @.dbname = 'testlog',
@.physname = 'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\testlog_data.mdf'
Then I got this error message
"Device activation error. The physical file
name 'D:\Program Files\Microsoft SQL
Server\MSSQL\data\testlog_log.ldf' may be incorrect.
New log file 'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\testlog_log.LDF' was created."
Is this an expected error message?
Thanks Mike Allen
Novice DBAMike,
I think the message is more information, letting you know that SQL Server
created a log file for you. Note, however, that BOL states that a new log
file will/can be created only if you actually detached the database first
and only of you have one and only one log file and only one database file.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Mike Allen" <mikea@.atg.wa.gov> wrote in message
news:1157001c3bf6c$a15d8620$a601280a@.phx.gbl...
> Ran this command - EXEC sp_detach_db 'testlog', 'true'
> Deleted the .ldf file associated with the database and
> then ran this:
> EXEC sp_attach_single_file_db @.dbname = 'testlog',
> @.physname = 'd:\Program Files\Microsoft SQL
> Server\MSSQL\Data\testlog_data.mdf'
> Then I got this error message
> "Device activation error. The physical file
> name 'D:\Program Files\Microsoft SQL
> Server\MSSQL\data\testlog_log.ldf' may be incorrect.
> New log file 'd:\Program Files\Microsoft SQL
> Server\MSSQL\Data\testlog_log.LDF' was created."
> Is this an expected error message?
> Thanks Mike Allen
> Novice DBA
>|||Thanks
>--Original Message--
>Mike,
>I think the message is more information, letting you know
that SQL Server
>created a log file for you. Note, however, that BOL
states that a new log
>file will/can be created only if you actually detached
the database first
>and only of you have one and only one log file and only
one database file.
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>"Mike Allen" <mikea@.atg.wa.gov> wrote in message
>news:1157001c3bf6c$a15d8620$a601280a@.phx.gbl...
>> Ran this command - EXEC sp_detach_db 'testlog', 'true'
>> Deleted the .ldf file associated with the database and
>> then ran this:
>> EXEC sp_attach_single_file_db @.dbname = 'testlog',
>> @.physname = 'd:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\testlog_data.mdf'
>> Then I got this error message
>> "Device activation error. The physical file
>> name 'D:\Program Files\Microsoft SQL
>> Server\MSSQL\data\testlog_log.ldf' may be incorrect.
>> New log file 'd:\Program Files\Microsoft SQL
>> Server\MSSQL\Data\testlog_log.LDF' was created."
>> Is this an expected error message?
>> Thanks Mike Allen
>> Novice DBA
>
>.
>sql
Monday, March 26, 2012
question re process ids
Is it normal to have @.100 process id's in process info folder?
I noticed that some process don't get deleted once they are finished.
Please advise.
Thanks,Certainly isn't uncommon. By default SQL will start about 10 processes and
then add processes for normal user activity. However in my experience most
DBAs never use EM to look at processes and locks. They turn to the stored
procedures such as sp_who, sp_who2, sp_lock and so forth.
Danny
"Guju" <guju@.tpg.com.au> wrote in message
news:41acfda1_1@.news.iprimus.com.au...
> Hi,
> Is it normal to have @.100 process id's in process info folder?
> I noticed that some process don't get deleted once they are finished.
> Please advise.
> Thanks,|||Danny,
Any reason why process don't die once they are done.
thanks,
"Danny" <istdrs@.flash.net> wrote in message
news:Y08rd.35207$Qv5.3915@.newssvr33.news.prodigy.c om...
> Certainly isn't uncommon. By default SQL will start about 10 processes
and
> then add processes for normal user activity. However in my experience
most
> DBAs never use EM to look at processes and locks. They turn to the stored
> procedures such as sp_who, sp_who2, sp_lock and so forth.
>
> Danny
> "Guju" <guju@.tpg.com.au> wrote in message
> news:41acfda1_1@.news.iprimus.com.au...
> > Hi,
> > Is it normal to have @.100 process id's in process info folder?
> > I noticed that some process don't get deleted once they are finished.
> > Please advise.
> > Thanks,|||My assumption is that you are seeing in a nonactive state. Try getting more
detail like running dbcc inputbuffer(spid) and checking to see if cpu and/or
io is increasing.
"Guju" <guju@.tpg.com.au> wrote in message
news:41ad14f6$1_1@.news.iprimus.com.au...
> Danny,
> Any reason why process don't die once they are done.
> thanks,
> "Danny" <istdrs@.flash.net> wrote in message
> news:Y08rd.35207$Qv5.3915@.newssvr33.news.prodigy.c om...
>> Certainly isn't uncommon. By default SQL will start about 10 processes
> and
>> then add processes for normal user activity. However in my experience
> most
>> DBAs never use EM to look at processes and locks. They turn to the
>> stored
>> procedures such as sp_who, sp_who2, sp_lock and so forth.
>>
>>
>> Danny
>>
>> "Guju" <guju@.tpg.com.au> wrote in message
>> news:41acfda1_1@.news.iprimus.com.au...
>> > Hi,
>>> > Is it normal to have @.100 process id's in process info folder?
>>> > I noticed that some process don't get deleted once they are finished.
>>> > Please advise.
>>> > Thanks,
>>>>
>>|||[posted and mailed, please reply in news]
Guju (guju@.tpg.com.au) writes:
> I noticed that some process don't get deleted once they are finished.
Need to define "finished". This depends on the application design. An
application may opt to make a connection, and stay connected until the
users disconnects.
Also, several client libraries employs connection pooling. This means that
even if the client code calls a disconnect routine, the client library
does not actually disconnect from SQL Server immediately, but clings to
the connection, in case the application would reconnect. This grace
period is typically around 60 seconds. In fact many web applications make
heavy use of this. They connect and disconnect for about every query
they make.
Of course, you may be seeing a real problem, but without further information
it is difficult to say more.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp