If the size of the original devices are not known, they can be derived from the sysdevices, sysdatabases, and sysusages tables in the master database.
The size and device assignment of databases can be derived from the sysdevices, sysusages, and sysdatabases tables. Each chunk of disk space assigned to a database is represented by a row in the sysusages table. The size of each chunk is in the row. The dbid of the database to which the chunk is assigned is also in the row, and the corresponding database name can be obtained from sysdatabases. The device containing the chunk of disk space can be deduced by noticing which low/high range in sysdevices contains the starting virtual address (vstart) specified in the sysusages table.
To determine whether a device is a log device, look at the value of segmap in sysusages: 7 indicates log and data, 4 indicates log only, and 3 indicates data only. Anything else is a user-defined segment.
Before re-creating devices, gather information about all affected databases. (This information must be gathered before re-creating lost devices and databases, since as part of those procedures you drop affected devices and databases, and at that point this information is lost).
select segmap, size from sysusages where dbid = (select dbid from sysdatabases where name = "mydb")
segmap size ----------- ---------- 3 10240 3 5120 4 5120 3 1024 4 2048
This translates into these sizes and uses, in megabytes:
Data -- 20 Data -- 10 Log -- 10 Data -- 2 Log -- 4
Note A 7 in the segmap column indicates that the data and log are on the same device, and you can recover only up to the point of the most recent database backup. If the transaction log and database are on the same device, you can perform a DUMP DATABASE, not a DUMP TRANSACTION statement.