March 23, 2006 at 3:44 am
How to check which storage belongs to which instance and is active using a query?
March 23, 2006 at 9:23 am
select * from sysfiles
will give you the path to the physical file for a database.
What do you mean "is active"? Are you talking about the cluster?
Regards,Yelena Varsha
March 24, 2006 at 6:32 am
I mean if a sever has two or three SQL Server Instances installed ,they will installed in seperate drives or same drive? Also, .mdf and .ldf files of master database are stored in seperate storage for different instances means seperate drives.
Hope I was expressing in correct way.
March 24, 2006 at 7:35 am
The default location for database files will be different (under the install folders, under C:\Program Files), but hopefully someone has had the sense to move them somewhere else. Whether separate folders were created and used for each instance depends on the DBA.
The query "select filename from sysfiles" will tell you where the files for a database are located. The query "select filename from master.dbo.sysaltfiles" will tell you where all mdf, ldf, and ndf files for all databases in that instance.
If the default instance has linked server definitions for the other instances, you could find all the files with the query:
select 'default' as instance, filename from master.dbo.sysaltfiles
union all select '<inst1>', filename from <inst1>.master.dbo.sysaltfiles
union all select '<inst2>', filename from <inst2>.master.dbo.sysaltfiles
...
March 24, 2006 at 9:47 am
I got this, but how do I know that storage is active?
March 27, 2006 at 7:53 am
I'm still not sure what you're looking for, but if you're talking about actual read/write activity during a query you could try the Windows performance monitor and trace reads/sec, writes/sec, and disk queue length, but you can only drill down to the drive level. You could use SQL Profiler to get reads, writes, and cpu load for each query. These are programs you have already, and they can tell you which disks are working hardest and which queries are responsible.
If you want more detailed info there are monitoring tools like Quest's Spotlight on SQL Server. (There are other tools available but this is the one I am familiar with.) It will let you drill down an see I/O activity levels for each database file in real time. You can download a time-limited free trial (fully-functional) from their website.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply