Central Management server - executed a query but how to send the query output in the form of mail?

Hi All,
i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
basically query is checking the rows count from couple of user tables in servers.
issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers
could you please suggest how can i achieve this?

Copy to what?
SELECT COUNT(*) FROM sys.objects
Running the above statement returns two columns (server name and count)
All the servers SS2005  and onwards , then use
EXEC msdb.dbo.sp_send_dbmail 
     @profile_name = 'name', 
     @recipients = '[email protected]', 
     @query = 'SELECT COUNT(*) FROM sys.objects', 
     @subject = 'Count rows'
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • How to remove Central Management Server in Lync 2013

    Hello,
    I want to know how can I manually remove the Central management Server in Lync 2013.
    I didn't see any information in the ADSEdit.
    Thanks,
    stmart

    Have you followed: http://technet.microsoft.com/en-us/library/gg195614(v=ocs.14).aspx after that you can remove the databases: http://technet.microsoft.com/en-us/library/gg195656(v=ocs.14).aspx
    Please mark posts as answers/helpful if it answers your question.
    Blog
    Lync Validator - Used to assist in the validation and documentation of Lync Server 2013.

  • The system can be contact, but there is no Central Management Server

    Please help me, I have an error in SAP BusinessObjects XI 3.1 in Linux. I changed by web in CMC the ports of CentralManagementConsole, InputFileRepository and OutputFileRepository in order to assign an specific port, after that I restarted the servers and now I have this error.
    Couldn't logon to CMS STU00152
    The system can be contact, but there is no Central Management Server running at port 6400
    I donu2019t know where I should change that by commands in Linux because I cannot enter to CMC and change like before. Please help me.
    Regards,
    Paulina Villacis

    Thanks Ashwini,
    I have used this command but it does not work
    initialli I found this command line like that
    Local CMS
    Name:      Q_SIA_1.CentralManagementServer
         Port: 6400
         Auto-Start: yes
         Command Line: -loggingPath /swbobj/bobje/logging/ -defaultlocale en -port 6400
    I think this command line is incorrect because the port is repeated
    -loggingPath /swbobj/bobje/logging/ -defaultlocale en -port 6400
    I changed the command line to  
    u2013loggingPath /swobj/bobje/logging/ -defaultlocale en   
    but I donu2019t know why after I safe it, it  is the same with u2013port 6400, I think this is the issue. Do you know where also I must to change in order to fix the CMS to port 6400.
    Regards,
    Paulina Villacis

  • Central Management Server - where do queries run

    I want to monitor performance on a couple remote servers by running DMV's repeatedly.
    Is it it possible to run queries on the CMS against remote servers, and store the results in a CMS table?
    This might be obvious, but sorry I need your help in understanding... When you run a multi-server query on a CMS, where does the query actually get optimized and ran?  On the remote server, or on the CMS itself.  I.e., what CPU is
    execuing the query?  Where does the query get cached?  On the remote or CMS?  My thinking is that I don't to put additional workload of the monitoring queries on the remote server.  Eventhough the impact of running DMV's is said
    to be negligible, running many of them repeatedly must put some extra burden on the target server.

    Hi District,
    Central management servers store a list of instances of SQL Server that is organized into one or more central management server groups. After you create a central management server, one or more server groups, and one or more registered servers,
    you can execute queries against a whole group at the same time, however, Central Management Server cannot be a member of a group that it maintains. So when you run DMV statement of remote servers , it could not save the results into your Central management
    servers. Meanwhile, actions that are taken by using a central management server group act on all servers in the server group. When you run multiple queries on a Central management server, the queries actually are run on all servers in the server group. If
    you want store the results about remote servers in the Central management server, I recommend you using linked server or set up a SSIS package.
    For more information, see: Central Management Server
    http://technet.microsoft.com/en-us/library/bb895144.aspx
    http://technet.microsoft.com/en-us/library/bb934126.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • XI 3.0 Installation Problem: no central managment server running

    Hi, I am totally new to BO our company just purchased the application and I have installed XI 3.0 on one of our server. I have setup the DB and the installation finished successfully. However I can't find CMS anywhere on the server. It seems like all the other XI 3.0 components are there Business view manager, central configuration manager, etc. they are all in the program list.
    The only thing I didn't install is Tomcat. In Central configuration Manager ther Server Intelligence Agent is running. When I try to connect to the server in Business view Manager I receive the following error "The system servername cannot be contacted, but there is no Central Managment Server running at port 6400."
    During the installation for "Web Application Server" part I checked the "other" option since I want to use IIS. I have a feeling I need to do some type of post configuration for IIS? Where do I perform this?
    Our setup is:
    Window Server 2003 SP2 with all the latest window updates
    The latest XI 3.0 (I downloaded it from the product page)
    My questions are:
    1. Does XI work with IIS at  all?
    2. Do I need to install Tomcat and run some kind of connector to have IIS work?
    3. What am I missing for my XI 3.0 it seem the core component is missing (CS)?
    Edited by: Amy Williams on Sep 24, 2008 11:18 AM
    Moved from Xcelsius forum to BOE Administration

    Hi Allan,
    In answer to your questions - XI 3.0 does not have an IIS interface right now.  You will need to install a java application components in order to access the end user interface for viewing reports (InfoView), the report viewers, the web services and SDKs and the management console (CMC).  The easiest way to do this is to choose the default Tomcat components in the installation and work from there.
    If you left everything else as default, then you will have all the necessary application components installed to get the system up and running.  It may just be that your CMS has not started for some reason.  Try stopping and restarting the Server Intelligence Agent (SIA) in the Central Config Manager (CCM) - found in the Start/Programs/Business Objects group.
    Once started, try clicking on the "Manage Servers" icon of the CCM (the one with a server and a check mark on it).  This should allow you connect to the system and see which servers have started.  IF you cannot connect, the next step would be to check the windows Event Log.  See if the CMS service started OK.  If it didn't the log should provide you with more information, which you can post here for further assistance.
    If it did, and you still cannot connect, you may need to review your network firewall settings and/or your DEP status (see the properties panel for My Computer, choose the Advanced tab, select the Performance settings button, then the Data Execution Prevention tab).
    Happy hunting.
    Derek.

  • Issue With Business Objects Installation-STW00213 The Central Management Server has failed to start.

    Hi,
    I am in the process of installing Business Objects XI 3.1 in one of our server. While installing I am getting the error 'The Central Management Server has failed to start. Press 'retry' to attempt to start it again or 'cancel' to skip any actions dependendent on the Central Management Server. STW00213.'
    I have tried re-installing the BO, and also tried installing without giving admin password. But it doesn't work. And also I ahve tried giving the passwords of database and CMS Admin without Sepcia Characters. But it also doesn't work.
    If I cancel and install the BO, Server Intelligence Agent is not available in Central Management Server.
    Could anyone help on this issue?
    Thanks
    Prakadesh

    Hi Prakadesh,
    Try these steps.
    1. Stop and disable the service of current SIA. You can do it from start-->run services.msc. Double click the SIA service and change the status to disable.
    2. Login into sqlplus and drop all the CMS tables.
    3. Create a new SIA pointing to Oracle from the CCM.
    4. Start the new SIA and check if all services come up and you are able to login into Manager servers.
    If this does not work, check the event viewer for error messages.
    Regards
    Chinmaya

  • SQL 2012 Central Management Server - can it manage itself?

    I'm setting up a SQL Server 2012 lab on Windows 2008 R2 which has 5 SQL servers. I registered "SQL1" as my central management server and created a group under this server that includes all the servers and the CMS itself. I'm a bit confused since
    the documentation says the CMS cannot be a member of a group it maintains. However, i'm able to include it in the group, run multiple queries and evaluate policies (at least i think i am).
    reference: http://msdn.microsoft.com/en-us/library/bb895144.aspx see under "Related tasks"
    I've seen other forum posts where users have issues registering the CMS itself but i don't have this problem at all. Has something changed?
    Thanks,
    Paul

    Can you confirm what version of SQL and SSMS you're running?
    I'm running SQL Server 2012 Enterprise SP1 and SSMS 2012.
    Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64) 
    Dec 28 2012 20:23:12 
    Copyright (c) Microsoft Corporation
    Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
    Here's the CMS returning queries for the whole group.

  • Central Management Server - other Sites

    Hi all,
    I have installed 5 sites in my topology. but in my topology when i click on the top node i.e. "Lync Server" under Central Management Server section I only see names of two Front Ends. 
    Is there something I am missing?
    Thanks,

    Hi Atif7865,
    Based on my understanding, once you published the topology, under the Central Management Server section, you only can see the one (FE) which hosts the CMS, and the option is gray
    out and cannot be changed.
    Did you see the tips below ?
    To move the CMS, you should follow this article.
    https://technet.microsoft.com/en-us/library/gg195644.aspx
    Best regards,
    Eric
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • There was an error while retrieving the universes from the CMS (Central Management Server). (PS 20003)

    Hi there,
    When I'm trying to manage spaces in SAP Business Objects Explorer 4.1 SP04, I'm getting the following error:
    Failed to retrieve the data source list.
    There was an error while retrieving the universes from the CMS (Central Management Server). (PS 20003)
    For input string: "false"
    I've already restart Explorer servers (Explorer Exploration Server, Explorer Indexing Server, Explorer Master Server and Explorer Search Server) and rebooted the server where Explorer is installed.
    Nothing seems to fix this error message. I'm not able to create new spaces because I cant access the sources:
    I'd appreciate some help !
    Thanks in advance

    HI Pavan,
    Admin is on the Administrators Group, which as Full Control on the Explorer Application
    I think this worked on the day the Explorer was installed (past week).
    Since them never worked.

  • I just got a new Mac- I have transferred my itunes but how do I transfer my iphone to the new itunes?

    I just got a new Mac- I have transferred my itunes but how do I transfer my iphone to the new itunes? i dont want my whole iphone to blank so please help

    and everything from my iphone will transfer to the new itunes and i wont loose anything when i sync?
    thankyou!!

  • My ipod went to the ''connect to itunes mode'' and i want to use my itunes backup but how can i do that. also when the ''recover your ipod screen'' appeared i accidentally chose not to show it anymore.

    My ipod went to the ''connect to itunes mode'' and i want to use my itunes backup but how can i do that. also when the ''recover your ipod screen'' appeared i accidentally chose not to show it anymore. please help i just had it for half a day.

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    Some users have reported as many as 8 or 9 attempts were necessary before success.
    If the issue persists...
    Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • The green PHONE icon has dropped from the bottom of the home screen and isn't among the icons that I have installed.  I can get to it by searching but how do I get it back on the bottom of the home screen?

    The green PHONE icon has dropped from the bottom of the home screen and isn't among the icons that I have installed.  I can get to it by searching but how do I get it back on the bottom of the home screen?

    Reset home screen layout.
    This is covered in the manual:
    iPhone User Guide (For iOS 4.2 and 4.3 Software)

  • My UR12 Steinberg interface is recognized by Yosemite but I can't get any output from the device, does anyone know how to fix this problem? Thanks in advance

    My UR12 Steinberg interface is recognized by Yosemite but I can't get any output from the device, does anyone know how to fix this problem? Thanks in advance

    Apparently it's related to the Firefox plug in.
    This isn't exactly a solution but more of a way to avoid opening PDFs with Firefox's plug in.
    1. Highlight "Tools" from the Menu Bar in the top left of the screen (or click "Options" if using the Firefox Compact Menu)
    2. Select to "Options
    3. Select "Applications"
    4. Look for "Adobe Acrobat Document" under Content Type and to the right under Action select "Use Adobe Reader (default)" instead of the using Adobe Acrobat in Firefox
    5. Open a test PDF. It should open in it's own window now.
    Again, not a complete solution but something that'll at least let you scroll with PDFs open.
    More info here: http://forums.mozillazine.org/viewtopic.php?f=38&t=2171033

  • How to send the report output to the application server in a excel file

    Hello,
    how to send the report output to the application server in a excel file.
    and the report runs in background.
    Thanks in advance.
    Sundeep

    Dear Sundeep.
    I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
    D A T A D E C L A R A T I O N *
    TYPES: BEGIN OF TY_EXCEL,
    CELL_01(80) TYPE C,
    CELL_02(80) TYPE C,
    CELL_03(80) TYPE C,
    CELL_04(80) TYPE C,
    CELL_05(80) TYPE C,
    CELL_06(80) TYPE C,
    CELL_07(80) TYPE C,
    CELL_08(80) TYPE C,
    CELL_09(80) TYPE C,
    CELL_10(80) TYPE C,
    END OF TY_EXCEL.
    DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
    WA_EXCEL TYPE TY_EXCEL..
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Here you populate the Internal Table.
    Display - Top of the Page.
    PERFORM DISPLAY_TOP_OF_PAGE.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    SET PF-STATUS 'GUI_STATUS'.
    E V E N T : A T U S E R - C O M M AN D *
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'EXPORT'.
    Exporting the report data to Excel.
    PERFORM EXPORT_TO_EXCEL.
    ENDCASE.
    *& Form DISPLAY_TOP_OF_PAGE
    text
    --> p1 text
    <-- p2 text
    FORM DISPLAY_TOP_OF_PAGE .
    SKIP.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'O R I C A'
    CENTERED COLOR 1,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
    CENTERED COLOR 4 INTENSIFIED OFF,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE.
    E X C E L O P E R A T I O N
    CLEAR: IT_EXCEL[],
    WA_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    WA_EXCEL-cell_02 = ' XYZ Ltd. '.
    APPEND WA_EXCEL TO IT_EXCEL.
    CLEAR: WA_EXCEL.
    WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
    APPEND WA_EXCEL TO IT_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    ENDFORM. " DISPLAY_TOP_OF_PAGE
    *& Form APPEND_BLANK_LINE
    text
    -->P_1 text
    FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
    DO P_LINE TIMES.
    CLEAR: WA_EXCEL.
    APPEND WA_EXCEL TO IT_EXCEL.
    enddo.
    ENDFORM.
    *& Form EXPORT_TO_EXCEL
    text
    --> p1 text
    <-- p2 text
    FORM EXPORT_TO_EXCEL .
    DATA: L_FILE_NAME(60) TYPE C.
    Create a file name
    CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
    '.' SY-DATUM+0(4) INTO L_FILE_NAME.
    Pass the internal table (it_excel which is already populated )
    to the function module for excel download.
    CALL FUNCTION 'WS_EXCEL'
    exporting
    filename = L_FILE_NAME
    tables
    data = IT_EXCEL
    exceptions
    unknown_error = 1
    others = 2.
    if sy-subrc <> 0.
    message e001(ymm) with 'Error in exporting to Excel.'.
    endif.
    ENDFORM. " EXPORT_TO_EXCEL
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
    Regards,
    Abir
    Don't forget to award Points *

  • Using query ID how we can find query tech name in BW 3.5

    Using query ID how we can find query tech name in BW 3.5
    I got this querry ID from RSDDSTAT table for one user.
    Thanks

    SE16 --> RSRREPDIR --> give your id and get the tech name of the query and other info.

Maybe you are looking for