How to get InDesign Server instance on IIS Webservice
<WebMethod()> _
Public Function testIDS() As String
Dim idsAP As InDesignServer.Application = Nothing
Try
idsAP = GetObject("myid2")
Catch ex As Exception
Return ex.Message
End Try
idsAP.Consoleout(" Web Service call test success !(VB) ")
Return Nothing
End Function
I can run it correctly on ASP.NET development server, but it will occurred error on IIS6 .
Is the permission problem? How to solve it ?
I also try this
idsAP = System.Runtime.InteropServices.Marshal.BindToMoniker("myid2")
But, no use !
SQL Server instances define the container for all operations you perform within SQL Server. Each instance
contains its own set of database, security credentials, configuration settings, Windows services and other SQL Server objects.
SQL Server 2008 supports the installation of up to 50 instances on SQL Server on a single machine. When connecting to a named instance, you use the combination of the
machine name and instance name, such as <machinename>\<instancename>
Please refer to:
http://msmvps.com/blogs/paulomorgado/archive/2010/07/02/how-to-add-and-remove-sql-server-2008-2008r2-instances.aspx
http://www.sysads.co.uk/2012/02/add-additonal-sql-instance-to-existing-sql-server-2008-r2-cluster/
Please vote if it's helpful and mark it as an answer!
Similar Messages
-
How to get Windows Server 2012 trial license key?
How to get Windows Server 2012 trial license key? I'm trying to install WinServer 2012 Trial on a VMWare Workstation 9. I'm asked for the product key during set up. If I ignore putting in the key (since I don't have one) The install fails stating no valid
key. I tried this with Oracle's Virtual Box and the same thing happens. I tried using Majic JellyBean to find the key, but that only works on pre-installed OS. A Technet article said to use aaaa-bbbbb-ccccc-ddddd etc. in the spaces. That doesn't work either.
Articles all over the web seem to have other people in the same boat. Please help :)Download the trial version from here -
http://www.microsoft.com/en-us/server-cloud/evaluate/trial-software.aspx It does not require a key. If the software is asking for a key, it is not the trial copy. Where did you get your copy?
.:|:.:|:. tim -
How to get the server name/hostname on which JVM is running?
How to get the server name/hostname on which JVM is running from the Servlet or normal class?
InetAddress.getLocalHost()
-
How to get indesign from iMac to mac powerbook which does not have cd slot?
how to get indesign from iMac to mac powerbook which does not have cd slot?
That will not work!
You cannot copy or migrate Adobe applications from computer to computer. There are a whole host of files in different locations which have to be installed, and copying will not do it.
In fact, you'll now have to use the Adobe Cleaner tool to remove the mess you created. You can get to it here:
Use the CC Cleaner Tool to solve installation ... - Adobe -
Exception while getting the server instance. Stateless bean problem
Hi,
New to OC4J, I'm moving an ear that was running ok under jboss.
1- The wep app deploys. This is a piece of code inside the init() method of a struts plugin:
System.out.println("0");
AddressFacadeHome addressFacadeHome = HomeFactory.getAddressFacadeHome();
System.out.println("1.0");
AddressFacade addressFacade = addressFacadeHome.create();
System.out.println("1.5");
2- The code is run when the web app is initialized. This is the error message I get. system.out show that the error occurs on addressFacadeHome.create().
AddressFacade is a remote/local stateless bean. HomeFactory returns the jndi lookup/narrow of the remote object.
0
1.0
caught exception while getting the server instance null
java.lang.NullPointerException
com.evermind.security.User com.evermind.server.ThreadState.getCurrentUser()
ThreadState.java:637
com.evermind.security.User com.evermind.server.ThreadState.getUser()
ThreadState.java:371
fda.common.address.ejb.interfaces.AddressFacade AddressFacadeHome_StatelessSessionHomeWrapper7.create(
AddressFacadeHome_StatelessSessionHomeWrapper7.java:66
void fda.web.oaa.struts.plugin.ApplicationInit.init(org.apache.struts.action.ActionServlet, org.apache
.struts.config.ModuleConfig)
void org.apache.struts.action.ActionServlet.initModulePlugIns(org.apache.struts.config.ModuleConfig)
ActionServlet.java:1105
void org.apache.struts.action.ActionServlet.init()
ActionServlet.java:468
void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
GenericServlet.java:258
com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.loadServlet(com.
evermind.util.ByteString)
HttpApplication.java:1956
com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.findServlet(com.
evermind.util.ByteString)
HttpApplication.java:4355
void com.evermind.server.http.HttpApplication.initPreloadServlets()
HttpApplication.java:4455
void com.evermind.server.http.HttpApplication.initDynamic(com.evermind.server.http.HttpApplicationConf
ig)
HttpApplication.java:662
void com.evermind.server.http.HttpApplication.<init>(com.evermind.server.Application, com.evermind.ser
ver.http.HttpSite, com.evermind.server.http.HttpApplicationConfig, java.lang.String, java.lang.String, boolean
My guess is that it's a jaas issue (because i see security and getCurrentUser), but at init time, no user is authenticated.
Any clue would be very much appreciated. Let me know if I can provide anything else, such as deployment descriptors.
Thanks,
Christophe.After spending some time on this, I looked at the source code for com.evermind.server.ThreadState
This is the code that throws the exception:
if(applicationThread != null && applicationThread.httpHandler != null && applicationThread.servletInfo != null)
try
server = applicationThread.httpHandler.request.getApplication().getApplication().getServer();
catch(Throwable t)
System.out.println("caught exception while getting the server instance " + t.getMessage());
t.printStackTrace(System.out);
It looks like this method expects a httpRequest, and would find null because I'm in the servlet.init()
(at least, that's my interpretation)
I tested my code (the remoteFacade.create()) inside of a jsp, and it worked...
So, the next logical question is:
Can I make EJB calls from within the init method of a servlet? (or more specifically from a struts plugin, which I believe should be more or less the same thing)
If so, do I need to take extra steps?
Again, any experience/help on this will be much appreciated.
Thanks,
Christophe. -
How to get a server chain certificate
Hi all,
I'm installing SSL on Bea Logic server 6.0, but i dont know how to get a server
chain certificate.
Does any body know how to get this certificate?
Also, I read in the e-docs site that we can use utility der2pem and vice versa
to convert between them, but i odnt know where to get the tools.(It's not in the
utils.jar)
thanks for any answer.
UyHi all,
I'm installing SSL on Bea Logic server 6.0, but i dont know how to get a server
chain certificate.
Does any body know how to get this certificate?
Also, I read in the e-docs site that we can use utility der2pem and vice versa
to convert between them, but i odnt know where to get the tools.(It's not in the
utils.jar)
thanks for any answer.
Uy -
Hi All,
How to get the process instance key so as to retry a rejected task through API while AD provisioing state?
API URL - http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm
ThanksTo retry a task that is in a rejected state, you use the SCH_KEY which is the task key. In OIM, all rejected tasks are listed in the OTI table. It contains all the important information about a rejected or pending task.
You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
-Kevin -
How to get the activity instance id and process id
Dear All,
For my case, my boss require the workflow program processor can be runtime assigned . After research, I found the coding example like below:
// dynamically assign a user to a role
rtm.addRuntimeDefinedUserToRole(
// process instance
prInstance,
// role name
"Processor",
// user that is assigned (IUser)
user,
// user context (IGPUserContext)
userContext);
// dynamically change the user assigned to a role for a particular task
String prInstanceID = prInstance.getID();
rtm.changeTaskProcessor(
// process instance ID
prInstanceID,
// activity instance ID
activityInstanceID,
// current user (IGPUserContext)
currentProcessorContext,
// new user (IGPUserContext)
newProcessorContext);
But I don't know how to get the process instance ID and activity instance ID before I can apply this api in my webdynpro application.
Any gentllement can give me an idea.
Thank you.
Regards
Ericprocess = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
// by specifying its ID "CCD2C3F1BED111DD9DFA005056A9416C",/
/* and the user accessing it */ userContext);
// retrieve the Runtime Manager
IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
// create an empty role assignment list
IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
//Initialising the input params
IGPStructure params =GPStructureFactory.getStructure(process.getInputParameters());
params.setAttributeValue("Name",value);
//Starting the process
IGPProcessInstance prInstance = rtm.startProcess(process,"Process Name","Process name",user,roles,params,user); -
How do you assign an InDesign server instance to its own drive?
I am working on optimizing the performance of our InDesign server and read about the possibility of assigning drives to the individual instances in the performance guide. Is there a configuration file or command-line argument for configuring the working drive for each server instance?
I am not sure about that. Do you mean that all I have to do is provide the interface <cc:attribute name="value" type="lvl1.lvl2.someClass"/> and when I run the method, the returned result will be written into the expression provided in "value"?
-
Configuration name of an InDesign Server instance
Hello folks!
I have an question.
I started several instance of InDesignServer with different gonfiguration name.(Server_1 , Server_2 ...)
C:\Program Files\Adobe\Adobe InDesign Server CS2>InDesignServer.com -conf
iguration Server_1 -port 4001
C:\Program Files\Adobe\Adobe InDesign Server CS2>InDesignServer.com -conf
iguration Server_2 -port 4002
C:\Program Files\Adobe\Adobe InDesign Server CS2>InDesignServer.com -conf
iguration Server_3 -port 4003
Does anybody know how can I get the configuration name of the given instance of InDesign Setver in my plugin?
The reason is I want to write different settings for every instance in separate files.from the CCommandLineArgs.h file:
i "At startup an object of type CCommandLineArgs is created and referenced by the global variable gCommandLineArgs, declared below. Command line arguments should be accessed through this variable."
you can use the variable gCommandLineArgs to get the arguments. -
How to get the all instances in which I acted on any of the activity?
Hi all,
Consider that in a Process there are three Activities named
1. Create Proposal Role : Initiator
2. Routed to Primary Owner Approval Role : Primary Owner
3. Routed to Manager Approval Role : Manager
Suppose I'm a Participant having access to PrimaryOwner Role. Some X, Y, Z persons created 3 instances whcih is now in "Routed to Manager Approval" activity or completed. I acted only on 2 instances and the other some one else acted. How can i get the 2 instances in which i acted . What is the way to acheive this PAPI 6.0 or Stuio 6.0?
Thanks in advance,
SanaDoing something similar, using following code in a screenflow called from a global activity:
ps = new ProcessService();
ps.connectTo(url :Fuego.Server.directoryURL, user : "username", password : "password");
InstanceFilter filter = ps.getFilterFor(viewId : "myHidView");
filter.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
// have tried the filter using both methods below
//filter.setParametricValueTo(variable : "myvar", value : myDesiredVarValue);
filter.addAttributeTo(variable : "myvar", comparator : Comparison.IS, value : myDesiredVarValue);
instances = ps.getInstancesByFilter(filter : filter);
I get the following error in the engine log:
Unable to receive the message because of a serialization error. Caused by: fuegoblock.papi.Instance fuego.rmi.spi.SerializationException: Unable to receive the message because of a serialization error. at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:101) at fuego.rmi.ServerCluster.send(ServerCluster.java:226) at fuego.rmi.ServerCluster.sendResult(ServerCluster.java:495) at fuego.rmi.ServerCluster.access$400(ServerCluster.java:50) at fuego.rmi.ServerCluster$1.put(ServerCluster.java:590) at fuego.component.ExecutionThread.sendResult(ExecutionThread.java:523) at fuego.component.ExecutionThreadContext.doClientInvoke(ExecutionThreadContext.java:668) at fuego.component.ClientRemoteComponent.doInvocation(ClientRemoteComponent.java:303) at fuego.component.ClientRemoteComponent.invoke(ClientRemoteComponent.java:160) at fuego.component.ExecutionRelayedThrowable.execute(ExecutionRelayedThrowable.java:94) at fuego.server.execution.TaskExecution.handleExecutionRelayedThrowable(TaskExecution.java:802) at fuego.server.execution.TaskExecution.handleComponentExecutionException(TaskExecution.java:753) at fuego.server.execution.TaskExecution.executeCIL(TaskExecution.java:493) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:677) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:638) at fuego.server.execution.TaskExecution.executeTask(TaskExecution.java:451) at fuego.server.execution.GlobalTaskExecution.executeGlobalCIL(GlobalTaskExecution.java:164) at fuego.server.execution.Global.continueCil(Global.java:68) at fuego.server.AbstractProcessBean$39.execute(AbstractProcessBean.java:2515) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:291) at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:462) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:540) at fuego.transaction.TransactionAction.start(TransactionAction.java:213) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:118) at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66) at fuego.server.AbstractProcessBean.runGlobalActivity(AbstractProcessBean.java:2508) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1477) at fuego.lang.JavaObject.invoke(JavaObject.java:185) at fuego.component.Message.process(Message.java:585) at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:759) at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:734) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:140) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:132) at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:257) at fuego.component.ExecutionThread.work(ExecutionThread.java:818) at fuego.component.ExecutionThread.run(ExecutionThread.java:397) Caused by: java.io.NotSerializableException: fuegoblock.papi.Instance at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.ArrayList.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.component.Message.writeObject(Message.java:665) at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.component.Batch.writeObject(Batch.java:151) at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at fuego.rmi.Packet.write(Packet.java:251) at fuego.rmi.spi.BaseConnection.send(BaseConnection.java:98) ... 38 more
Sorry for huge error message.
Is there a trick to getting the filtered set of instances from in the screenflow activity? -
How to get FMS server time and date
hi,
i m working on a customer support chat application. There is
neccssary for me to get the FMS server time and date, bcoz
depending on the server time and date the client instances recive
different messages.
i looked at date() function on FMS server, but it returns
user PC time ( not FMS server time).......
so i there any way to get FMS server date and time??
thanks in advance
shrikantSee this post.
How To Display Time Information in Report/Results?
http://forums.ni.com/t5/NI-TestStand/During-a-test-how-can-I-find-the-start-time-and-date-of-that/td...
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
[IDS Win]How to flush Indesign server.
Hi All,
I am using Indesign server to create documents which contains text, images & tables. My job is to create & export documents to pdf. Document are sometimes contains 300 plus pages. And cs2 server process this jobs one after the other in queue ..may be 100 jobs in a queue. Here after certain amount of time a 'out of memory' error comes up and Indesign server gets crashed(its around after processing 30-40 jobs).
I have taken care to delete all allocated meomary in my program through New- delete pair. Still after each job allocated memory to Indesign keeps increasing.
Is there any way so that I can purge memory from Indesign after my job complition? I tried to use 'PurgeMemory' over IDocumentList but its not that effective.
Any suggestions are most welcommed!
Thanks,
Rahul.Well, it's been two years since the last activity in this thread, and I am having this exact same problem with InDesign Server CS4.
I have a .NET web application that calls the IDS through SOAP and simply tells it to run a JavaScript. In simple terms, the script opens an InDesign file, imports some XML, makes some minor formatting changes, and exports the PDF to the filesystem. The .NET webapp then receives the status message and redirects the user directly to the finished PDF which they can then view/save/etc.
This all works perfectly, but while it's running, I see the memory usage of InDesignServer.exe spike by several MB, and then it settles back down to a still-higher-than-initial value. Eventually, the InDesignServer.exe is taking up several hundred MB and my server starts giving out-of-memory errors.
I'm not sure what I'm doing wrong. Like the original poster asked, it appears as though I should be flushing something that I am not. I've researched this "ErrorList" that was referenced, and my memory "leak" seems to be bigger than this (although I could be wrong), but I can't find anything in the language reference on how to programmatically flush this after each document. I'm not even sure if this is the culprit.
Can anybody help? Many many thanks in advance
The contents of my JavaScript is as follows (and you'll see that I'm closing the document each time):
// We encapsulate the meat of the code in a main() function and then call main() at
// the bottom of the script in order to facilitate proper returns
// see http://ericwillis.wordpress.com/2008/04/18/return-value-from-indesign-server-script-via-so ap/
function main()
// Our script requires a school code to be passed in as an argument
// We begin by assuming that it hasn't been passed
var message='Error: schoolCode parameter required';
// if the argument HAS been passed...
if(app.scriptArgs.isDefined('schoolCode'))
// We change our return message and proceed with processing
message='Success: No problems reported';
// This is our work folder
var projectPath='/E/mywebsite/';
// this is our starting template
var doc = app.open(File(projectPath + 'source/Template.indd'));
// the template has been "tagged" with XML placeholders, so here we are
// importing the data to replace them. The filename of the XML is
// dependent on the school code that was passed as an argument
doc.importXML(File(projectPath + 'work/' + app.scriptArgs.getValue('schoolCode') + '.xml'));
// The next portion of the script scans the entire document for overset
// text (text that flows outside of it's container). If any is found, it changes
// the text colour to red so that the author knows that they overtyped
//Create a color.
try{
doc.colors.item("Red").name;
catch (myError)
doc.colors.add({name:"Red", model:ColorModel.process, colorValue:[20, 100, 80, 10]});
// loop through each "story"
for(x=0;x<=doc.stories.length-1;x++)
// if the current story has overset text...
if(doc.stories.item(x).overflows)
// change the text colour to our previously created colour
doc.stories.item(x).fillColor = doc.colors.item("Red");
// Change the message too so that we know on the server side
// that there's a problem
message='Warning: Contains overset text';
// We couldn't find a way to use styles to place an outside border
// around a variable-width & length table that we're creating
// dynamically in the XML. To solve this, the following loop finds all
// of the tables in the document and places a border around their
// outside-most edges only
// Loop through each table in this story
for(y=0;y<=doc.stories.item(x).tables.length-1;y++)
// myTable will refer to each table
var myTable=doc.stories.item(x).tables.item(y);
// Header stroke
var myRow=myTable.rows.item(0);
myRow.topEdgeStrokeColor="Black";
myRow.topEdgeStrokeTint=100;
myRow.topEdgeStrokeType="Solid";
myRow.topEdgeStrokeWeight=0.5;
myRow.topEdgeStrokeOverprint=true;
// Do left border
var myCol=myTable.columns.item(0);
myCol.leftEdgeStrokeColor="Black";
myCol.leftEdgeStrokeTint=100;
myCol.leftEdgeStrokeType="Solid";
myCol.leftEdgeStrokeWeight=0.5;
myCol.leftEdgeStrokeOverprint=true;
// Do right border
var myCol=myTable.columns.item(myTable.columns.length-1);
myCol.rightEdgeStrokeColor="Black";
myCol.rightEdgeStrokeTint=100;
myCol.rightEdgeStrokeType="Solid";
myCol.rightEdgeStrokeWeight=0.5;
myCol.rightEdgeStrokeOverprint=true;
// Do bottom border
var myRow=myTable.rows.item(myTable.rows.length-1);
myRow.bottomEdgeStrokeColor="Black";
myRow.bottomEdgeStrokeTint=100;
myRow.bottomEdgeStrokeType="Solid";
myRow.bottomEdgeStrokeWeight=0.5;
myRow.bottomEdgeStrokeOverprint=true;
// Set some PDF export prefs
app.pdfExportPreferences.cropMarks=false;
app.pdfExportPreferences.colorBars=false;
app.pdfExportPreferences.bleedMarks=false;
app.pdfExportPreferences.useSecurity=false;
// Export the PDF to the filesystem
// the filename is dependent on the school code that was passed
// as an argument
doc.exportFile(ExportFormat.PDF_TYPE, File(projectPath + 'work/' + app.scriptArgs.getValue('schoolCode') + '.pdf'));
// Close the document
doc.close(SaveOptions.no);
// Return whatever message was produced by this function
return message;
// call our main function
main(); -
How to get SQL server IP ?
Hi ALL ,
I am using this script to get the SQL server IP address but it is working on one of the servers and generating an error on the other
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') [Machine Name]
,SERVERPROPERTY('InstanceName') AS [Instance Name]
,LOCAL_NET_ADDRESS AS [IP Address Of SQL Server]
,CLIENT_NET_ADDRESS AS [IP Address Of Client]
FROM SYS.DM_EXEC_CONNECTIONS
WHERE SESSION_ID = @@SPID
there error I am getting is
Invalid object name 'SYS.DM_EXEC_CONNECTIONS'.
Any ideas how to get it to work ?Do you have
VIEW SERVER STATE permission?
Can you execute below SQL and post us the output?
SELECT HAS_PERMS_BY_NAME(null, null, 'VIEW SERVER STATE');
Also, Can you check the existence of the DMV under master database -> views->system views of the server?
--Prashanth -
How to get sql server performance counters using query?
Hai i want to see my sql server performance counters like, Full Scans/sec, Buffer
Cache Hit Ratio, Database Transactions/sec, User
Connections, Average Latch Wait Time (ms), Lock
Waits/sec, Lock Timeouts/sec, Number
of Deadlocks/sec, Total Server Memory, SQL
Re-Compilations/sec, User Settable Query. If any one know how to get it by using query means, please help me.
Thanks in advanceHello,
Below is query created by Jonathan Kehayias for measuring Perfom counters using DMV sys.dm_os_performance_counter.
You can download book from below link
https://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/
DECLARE @CounterPrefix NVARCHAR(30)
SET @CounterPrefix = CASE WHEN @@SERVICENAME = 'MSSQLSERVER'
THEN 'SQLServer:'
ELSE 'MSSQL$' + @@SERVICENAME + ':'
END ;
-- Capture the first counter set
SELECT CAST(1 AS INT) AS collection_instance ,
[OBJECT_NAME] ,
counter_name ,
instance_name ,
cntr_value ,
cntr_type ,
CURRENT_TIMESTAMP AS collection_time
INTO #perf_counters_init
FROM sys.dm_os_performance_counters
WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Full Scans/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Index Searches/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Lazy Writes/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Page life expectancy'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'Processes Blocked'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'User Connections'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Waits/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Wait Time (ms)'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Re-Compilations/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
AND counter_name = 'Memory Grants Pending'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'Batch Requests/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Compilations/sec'
-- Wait on Second between data collection
WAITFOR DELAY '00:00:01'
-- Capture the second counter set
SELECT CAST(2 AS INT) AS collection_instance ,
OBJECT_NAME ,
counter_name ,
instance_name ,
cntr_value ,
cntr_type ,
CURRENT_TIMESTAMP AS collection_time
INTO #perf_counters_second
FROM sys.dm_os_performance_counters
WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Full Scans/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
AND counter_name = 'Index Searches/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Lazy Writes/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
AND counter_name = 'Page life expectancy'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'Processes Blocked'
OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
AND counter_name = 'User Connections'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Waits/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
AND counter_name = 'Lock Wait Time (ms)'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Re-Compilations/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
AND counter_name = 'Memory Grants Pending'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'Batch Requests/sec'
OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
AND counter_name = 'SQL Compilations/sec'
-- Calculate the cumulative counter values
SELECT i.OBJECT_NAME ,
i.counter_name ,
i.instance_name ,
CASE WHEN i.cntr_type = 272696576
THEN s.cntr_value - i.cntr_value
WHEN i.cntr_type = 65792 THEN s.cntr_value
END AS cntr_value
FROM #perf_counters_init AS i
JOIN #perf_counters_second AS s
ON i.collection_instance + 1 = s.collection_instance
AND i.OBJECT_NAME = s.OBJECT_NAME
AND i.counter_name = s.counter_name
AND i.instance_name = s.instance_name
ORDER BY OBJECT_NAME
-- Cleanup tables
DROP TABLE #perf_counters_init
DROP TABLE #perf_counters_second
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
Maybe you are looking for
-
Closing Web Browser from an Applet
Does anyone knows how to close the Web Browser from an Applet ? Also Is there a way to close a browser which is intantiated from using ApplteContext ().showDocument ("....","_Blank"). Thanks Sohan
-
How many computers can I install labview on?
I have two automated tests that I would like to run at the same time on separate computers. Increased productivity and the whole 9 yards. Can I legally install Lab view on both computers and run them at the same time? Or is it only 1 copy of Labveiw
-
MB_CREATE_GOODS_MOVEMENT with Reservation reference
Dear, I want to create good movement with Reservation reference and use T_MS1INT structure. Here is my way, but it does not work. Pls check and tell me why! Thanks a lot, DATA: IMKPF TYPE IMKPF, EMKPF TYPE EMKPF, EMSEG TYPE TABLE OF E
-
Apple TV streaming iTunes Match?
Okay, so iTunes Match tunes in the cloud works great on the ATV2.... which has a very small SSD, acting as a cache, correct? So, the cloud must be streaming right? I mean, it's obviously not filling up my harddrive on the ATV, so it must be streaming
-
I just bought a brand new iPhone 5s and a huge problem is that when i try to sync my music to my iPhone 5s, under the music tab it says that i can only access my music via iCloud. is there anyway to sync your music from your computer?????