Tuesday, March 20, 2012
active physical node
active node (physical server) of a cluster? I do not want to use the cluadmin
gui.
if i can find out the node on which sql resources are active using a query -
it will be helpful.
cheers,
bharath
I remember a tip, probably from Tom, about this. If you keep a text file at
the same location on each of the nodes, and store the name of the node in
those files, then you can connect to the server and run something like below
to get the server name:
EXEC master..xp_cmdshell 'Type C:\NodeName.txt'
GO
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Bharath" <Bharath@.discussions.microsoft.com> wrote in message
news:E2F171C0-4591-48AF-AFB3-10A60801134A@.microsoft.com...
Is there any way to find out using a sql query or from registry the current
active node (physical server) of a cluster? I do not want to use the
cluadmin
gui.
if i can find out the node on which sql resources are active using a query -
it will be helpful.
cheers,
bharath
active physical node
active node (physical server) of a cluster? I do not want to use the cluadmi
n
gui.
if i can find out the node on which sql resources are active using a query -
it will be helpful.
cheers,
bharathI remember a tip, probably from Tom, about this. If you keep a text file at
the same location on each of the nodes, and store the name of the node in
those files, then you can connect to the server and run something like below
to get the server name:
EXEC master..xp_cmdshell 'Type C:\NodeName.txt'
GO
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Bharath" <Bharath@.discussions.microsoft.com> wrote in message
news:E2F171C0-4591-48AF-AFB3-10A60801134A@.microsoft.com...
Is there any way to find out using a sql query or from registry the current
active node (physical server) of a cluster? I do not want to use the
cluadmin
gui.
if i can find out the node on which sql resources are active using a query -
it will be helpful.
cheers,
bharath
active physical node
active node (physical server) of a cluster? I do not want to use the cluadmin
gui.
if i can find out the node on which sql resources are active using a query -
it will be helpful.
cheers,
bharathI remember a tip, probably from Tom, about this. If you keep a text file at
the same location on each of the nodes, and store the name of the node in
those files, then you can connect to the server and run something like below
to get the server name:
EXEC master..xp_cmdshell 'Type C:\NodeName.txt'
GO
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Bharath" <Bharath@.discussions.microsoft.com> wrote in message
news:E2F171C0-4591-48AF-AFB3-10A60801134A@.microsoft.com...
Is there any way to find out using a sql query or from registry the current
active node (physical server) of a cluster? I do not want to use the
cluadmin
gui.
if i can find out the node on which sql resources are active using a query -
it will be helpful.
cheers,
bharath
Sunday, February 19, 2012
Accessing the Log File Physical File Name and Path
I am new to SMO and VB.NET and I need to access the transaction log's physical file name and path so that I can correctly relocate it when it is restored on a different.
What I would like to do is display the database and log's physical file and path names in some type of data control for selection by a user during a restore operation.
I have been able to do this for the database but can't seem to get it to work for the log file. How do I find the log file's physical file name and path using SMO? I can't seem to be able to relate the logfile collection and class to specific databases.
Thanks for your help!
Database.LogFiles property gives you a collection of LogFile object, each of which represents a log file on the database. You can access the location and name of the log file using LogFile.FileName and LogFile.Name properties respectively. Refer BOL for more details.
Thanks,
Kuntal
Sunday, February 12, 2012
Accessing Query Execution Plan (QEP) Statistics
I have some questions about estimated QEPs that can be generated in MSSQL QA.
If I point at an icon/physical operator in the estimated QEP, it shows me
some statistics about the operator.
1. Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?
2. Are these statistics generated at the server or at the client?
3. Also, is there a way to generate these statistics on my own?
Thanks in advance,
-TC.
T Chaudhary wrote:
> Hi,
> I have some questions about estimated QEPs that can be generated in
> MSSQL QA.
> If I point at an icon/physical operator in the estimated QEP, it
> shows me some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e.,
> can these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.
Generated on the server. You can use SET SHOWPLAN_ALL ON from QA to get
results back in result set format.
Try This:
Set showplan_all on
go
select * from pubs..publishers
go
Set showplan_all off
go
David G.
|||If you are also interested in index statistics try
DBCC show_statistics(object_id, indid)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"T Chaudhary" <replysoon_04@.yahoo.com> wrote in message
news:e8149671.0409091256.56631cf@.posting.google.co m...
> Hi,
> I have some questions about estimated QEPs that can be generated in MSSQL
QA.
> If I point at an icon/physical operator in the estimated QEP, it shows me
> some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e., can
> these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.
Accessing Query Execution Plan (QEP) Statistics
I have some questions about estimated QEPs that can be generated in MSSQL QA.
If I point at an icon/physical operator in the estimated QEP, it shows me
some statistics about the operator.
1. Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?
2. Are these statistics generated at the server or at the client?
3. Also, is there a way to generate these statistics on my own?
Thanks in advance,
-TC.T Chaudhary wrote:
> Hi,
> I have some questions about estimated QEPs that can be generated in
> MSSQL QA.
> If I point at an icon/physical operator in the estimated QEP, it
> shows me some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e.,
> can these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.
Generated on the server. You can use SET SHOWPLAN_ALL ON from QA to get
results back in result set format.
Try This:
Set showplan_all on
go
select * from pubs..publishers
go
Set showplan_all off
go
David G.|||If you are also interested in index statistics try
DBCC show_statistics(object_id, indid)
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"T Chaudhary" <replysoon_04@.yahoo.com> wrote in message
news:e8149671.0409091256.56631cf@.posting.google.com...
> Hi,
> I have some questions about estimated QEPs that can be generated in MSSQL
QA.
> If I point at an icon/physical operator in the estimated QEP, it shows me
> some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e., can
> these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.