May 31, 2007 at 9:47 pm
server/SQL Server 2000) and got the following error.
device activation error. The physical filename g:\mssqldata
\templog.ldf may be incorrect.
properties and with sp_dbhelp.
has 2 entries each for tempdb logs and data files. One of them is on
g: and one is on f:. The lower dbid is on f: and the higher one is on
g: (actually the last two rows in the table).
the log and data files to the g: drive with DBID = 15 and one pair of rows points
them to the f: drive with DBID = 2. The references to g: drive need to go away but
I've been googinling for a while now and haven't come up with much.
tempdb and though it didn't fail, it didn't change anything.
try and speed it up a bit. Appearantly they messed it up and now have
written us off till WE fix it.
up (though we didn't look at every table and aren't even remotely sure
where other references might be located).
We thought about trying a reconfigure and restarting but I'm not real
hopeful. We also thought about just updating the wrong entries to
reflect the right locations but that smacks of kluge.
\mssql in the error I found that in master.sysdevices the file
location is e:\Program Files\Microsoft SQL Server\MSSQL\data
\tempdb.mdf.
server it got moved to g: then to f:.
at dbid2 which in sysaltfiles is the dbid of the two rows that point
at the CORRECT file locations.....
rows out of sysaltfiles and restart.
June 1, 2007 at 9:30 am
Here's the exact text of the error.
Server: Msg 945, Level 14, State 2, Line 1
Database 'test123' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
The CREATE DATABASE process is allocating 10.00 MB on disk 'Test123_dat'.
The CREATE DATABASE process is allocating 5.00 MB on disk 'Test123_log'.
Device activation error. The physical file name 'g:\Sqldata\templog.ldf' may be incorrect.
Nothing definitive is turning up in the current log.
June 3, 2007 at 5:17 pm
June 4, 2007 at 7:08 am
Thanks for the reply.
I saw that article but it doesn't seem to apply. The new database isn't even created so can't be offline and tempdb is functioning normally.
The refererence in sysaltfiles to a non-existent tempdb seems to be what's precluding the creation of the new database.
I'm just not sure of a safe way to fix it.
June 4, 2007 at 7:10 am
I did run an alter database on tempdb (per the MS KB on moving tempdb). I basically just gave it the current, correct file locations hoping it might strip any incorrect rows. The attempt didn't return any errors but didn't do anything to the incorrect rows.
June 5, 2007 at 7:11 am
Forgive me if this is obvious, but have you tried shutting down SQL server? TempDB is recreated each time the service restarts.
If it were me and I could afford some downtime, I would try shutting down SQL server and then running a file search on all instances of tempdb mdf and ldf files. Delete (or more safely rename) all of these files then start SQL Server back up. This should recreate the TempDB files and get rid of the bogus ones in the system tables. I'd also be tempted to check for disk/file corruption while I had the system just to be safe.
My hovercraft is full of eels.
June 5, 2007 at 7:16 am
Not since we discovered the current issue, but it has been rebooted several times since the tempdb was moved from g: to f: and the stray rows in sysaltfiles seem to remain.
On a side note, this is from our OpenVMS host generating a canned system warning message...
IDX1> exit %xb70
%SYSTEM-W-FISH, my hovercraft is full of eels
IDX1>
June 5, 2007 at 10:55 am
The only way to remove those stray rows is to edit the system table itself. If you are comfortable with SQL and mucking witth the system tables it is a breeze and will take a few minutes at most. Let me know if you need a hand with this.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
June 5, 2007 at 11:08 am
We're comfortable with how to delete the rows but I was worried about creating more problems by creating broken links. I didn't see any other references in any of the master tables that pointed at the bad rows so I was guessing it would be okay to remove them but, well, I'm paranoid.
Will sql need to be bounced or have a "reconfigure" run after the rows are removed?
June 5, 2007 at 11:19 am
There should not be any issues nire a restart. However, backup the master database first !!!
Here is the general outline you'll need:
exec sp-configure 'allow updates',1
reconfigure with override
begin tran
select what you want to delete
do your deletes
select again just to make sure
commit tran - only after you are absolutely sure
exec sp-configure 'allow updates',0
reconfigure with override
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
June 5, 2007 at 11:27 am
Many thanks for the input Rudy!
We'll give it a try. Keep your fingers crossed!
June 5, 2007 at 11:36 am
no problemo senore ...
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply