SSRS Active Directory Data Source LastLogonTimeStamp returns "System._ComObject"

I am working in Report Builder and I have created a Data Source Connection to my Active Directory. I want to get LastLogonTimeStamp from my AD computer objects but when i run the query i get "System._ComObject" instead of a date. All the other
fields return data.
here is my code:
SELECT ADsPath, cn ,objectCategory,name, lastLogonTimestamp
FROM 'LDAP://DC=domain,DC=org'
where objectCategory = 'Computer'
Eventually i would like a query that returns a count of Computer objects where LastLogonTimeStamp is older than 30 days.
I have researched this and found that the LastLogonTimeStamp is a IADsLargeInteger
Value and not an actual date. How can i display this as a date is SSRS Report Builder

Hi Ryaed,
The lastLogon and lastLogonTimestamp LDAP timestamps attributes are returned in int64 format (also called Windows NT time format) and the timestamp is the number of 100-nanoseconds intervals (1 nanosecond = one billionth of a second) since Jan 1, 1601 UTC.
So, we cannot tell the exact date and time directly. To convert the Windows NT time format value to human readable date value, you can use the following query:
SELECT ADsPath, cn ,objectCategory,name, DATEADD(Minute,(lastLogonTimeStamp/ 600000000) + DATEDIFF(Minute,GetUTCDate(),GetDate()),CAST('1/1/1601' AS DATETIME2))
FROM 'LDAP://DC=domain,DC=org'
WHERE objectCategory = 'Computer'
Or you can also create a user defined function:
CREATE FUNCTION dbo.udf_Int8_to_DateTime(
@Int8 BIGINT
RETURNS DATETIME2
AS
BEGIN
RETURN (DATEADD(Minute,@Int8 / 600000000 + DATEDIFF(Minute,GetUTCDate(),GetDate()),CAST('1/1/1601' AS DATETIME2)))
END
Then, use the function in the query like below:
SELECT ADsPath, cn ,objectCategory,name, udf_Int8_to_DateTime(lastLogonTimestamp)
FROM 'LDAP://DC=domain,DC=org'
WHERE objectCategory = 'Computer'
Reference:
http://myitforum.com/cs2/blogs/jnelson/archive/2009/08/25/140938.aspx
Regards,
Mike Yin
TechNet Community Support

Similar Messages

  • How to find active master data source in the bw system

    Hi
    Can anyone guide me how to find the active master data source in the bw system

    Hi,
        You can use the table ROOSOURCE. The field ROOSTYPE specifies the type of datasource whether Transaction or attributes or text. You could write an abap program to filter the table and give you only master data datasources.
    Assign points if helpful
    Regards.

  • Problem in activating the data source using a web service

    Hi all,
    I have created a web service with Logical and Source System names and i have selected nothing in the Type and Release.
    Activated the created web service.
    Later i tried creating a data source based on this web service source system and tried activating the data sources.
    But it is throwing an error saying that error generating the Web Service /BIC/CQWEB_SER_000020000 and error while activating the data source.
    Can any one say why is this happening and is there any pre requisites to be done while creating the web service?
    what is the use of Type and Release while creating the webservice?
    Thanks,
    Pra.

    Hi
    Please consider reference tables also while creating view, otherwise it won't accept when there are amount and currency fields.
    Please have a look at the below url
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=genericdatasourceusingview&cat=sdn_all
    thanks,
    Teja

  • Error - When Activating Generic Data source in BW DEV

    Hi,
    I am working in BI 7.0
    I created a Generic Data source
    I had checked in RSA3 , it is showing records too.
    i replicated the Datasource in BW
    Datasource is available in BW
    Then I try to activated the Datasource
    because
    when i try to create tranformation for the data source then
    It will show this message (and transformation is not created)
    <b>Source RSDS ZCOPC_C10 GDVCLNT110 does not exist</b>
    My Data source name is ZCOPC_C10 for source system GDVCLNT110
    then I will try to Activated the Data source First
    then also it will show the Error like this
    Post Processing/Checking the Activation for DataSource ZCOPC_C10 GDVCLNT110
    <b>&
    Error when activating DataSource ZCOPC_C10                     GDVCLNT110</b>
    and the
    DataSource ZCOPC_C10 (GDVCLNT110) could not be activated
    can some body help me to solve this problem
    sure you can get the points
    Thanks
    prasanna

    Hi Oscar,
    The Data source is not Active in BW, I had checked in Data source defination.
    when I activate the Data source .
    <b>I received the Message / Error</b>
    Activation of Objects with Type DataSource
    Saving Objects with Type DataSource
    Internal Activation (DataSource )
    Preprocessing / Creation of DDIC Objects for DataSource ZCOPC_C11 GDVCLNT110
    Save DDIC object /BIC/CAZCOPC_C000020000001 (Application Structure for ZCOPC_C11 GDVCLNT110)
    Save DDIC object /BIC/WCAZCOPC_C000020000001 (Application Structure for ZCOPC_C11 GDVCLNT110 - T)
    Save DDIC object /BIC/CAZCOPC_C00002000 (Segment Structure for ZCOPC_C11 GDVCLNT110 - Appli)
    Save DDIC object /BIC/CCZCOPC_C000020000001 (Character Structure for ZCOPC_C11 GDVCLNT110)
    Save DDIC object /BIC/WCCZCOPC_C000020000001 (Character Structure for ZCOPC_C11 GDVCLNT110 - Tab)
    Save DDIC object /BIC/CCZCOPC_C00002000 (Segment Structure for ZCOPC_C11 GDVCLNT110 - Chara)
    Save DDIC object /BIC/B0001051 (PSA for ZCOPC_C11 GDVCLNT110 Itemization)
    Writing of object catalog entries (TADIR)
    Object TABL /BIC/CAZCOPC_C000020000001 written to the ObjectCatalog (TADIR)
    Object TTYP /BIC/WCAZCOPC_C000020000001 written to the ObjectCatalog (TADIR)
    Object TABL /BIC/CAZCOPC_C00002000 written to the ObjectCatalog (TADIR)
    Object TABL /BIC/CCZCOPC_C000020000001 written to the ObjectCatalog (TADIR)
    Object TTYP /BIC/WCCZCOPC_C000020000001 written to the ObjectCatalog (TADIR)
    Object TABL /BIC/CCZCOPC_C00002000 written to the ObjectCatalog (TADIR)
    Activate all Dictionary objects ( 6 ):
    All DDIC objects have been activated / deleted
    <b>Post Processing/Checking the Activation for DataSource ZCOPC_C11 GDVCLNT110
    Error when activating DataSource ZCOPC_C11                     GDVCLNT110</b>Deletion of Unused Dictionary Objects ( 6)
    All DDIC objects have been activated / deleted
    Deletion of Object Catalog Entries (TADIR)
    Object TABL /BIC/CAZCOPC_C000020000001 deleted from TADIR
    Object TTYP /BIC/WCAZCOPC_C000020000001 deleted from TADIR
    Object TABL /BIC/CAZCOPC_C00002000 deleted from TADIR
    Object TABL /BIC/CCZCOPC_C000020000001 deleted from TADIR
    Object TTYP /BIC/WCCZCOPC_C000020000001 deleted from TADIR
    Object TABL /BIC/CCZCOPC_C00002000 deleted from TADIR
    All unused DDIC objects have been deleted
    Thanks
    prasanna

  • RSA1 Data source has old system entry even after BDLS

    Hi Experts,
    Our BW system is on SAP_BW 701. Recently Our ECC system got replaced by a new upgraded system. So I ran BDLS from old system to new system. It went successfully and data sources were active.
    Later we found there is one data source that had two entires. One with old logical system and one with new logical system.Could anyone please advise how I can find why old logical system name entry still appears there even after BDLS.
    Thanks,
    Varun

    Hi,
    We checked that BDLS run has been fine and there were no errors or warnings. Also all the data sources ahve a soirce system as the new logical system name. But for many data sources; old logical system name's entry is still there. Old system is now not active but we are not getting how we got the old logical system names entries as well alon with new ones. When we try to manually delete those data source entries by right clicking on that; it gives an 'X Fatal error' and does not delete. Looks like its not getting deleted because the old logical system name is not active now. Please advise how can we get rid of these data source entries along with old logical system name and we do not want to re run BDLS.
    Thanks,
    Varun

  • Error While Activating the Data Source in RSA5 T-Code

    Hi,
    When i tried to inactive the data source in 2lis_11_vahdr it shows "Data Source does not exists errror".
    So i went to RSA5 T-Code and tried to activate the data source but there it is throwing the error like "Event with errors Extract in Data Source 2LIS_11_VAHDR".
    I have checked the above thing with all the data sources every one are throwing the same errors. Can any one please suggest me how to solve the issue.
    Or Is this issue related to Basis People?.
    Regards,
    Kumar.

    Hi Ravi,
    1.When i tried to inactive the data source  in  LBWE T-Code the error is "Data Source 2lis_11_vahdr does not exists ".
    2. In RSA5 T-Code  while activating the data source the error is  "Event with errors Extract in Data Source 2LIS_11_VAHDR".
    Regards,
    Kumar.

  • Difference between Replication and Activation of Data Sources

    Hi,
    I would like to know what exactly happens when data sources are replicated and when data souces are activated
    Regards,
    Visali.G.

    Once you make the replicate of DS at BW, what ever the struc. for that DS would be regenarated, and accordingly your extraction and setup table struc. would get updated by the latest changes made in the DS.
    At the BW side all corresponding communication and transfer structure and PSA structure would also get generated according to the DS struct. per R/3
    Need of Replication in other terms we can say
    Replication needs to be done is each time you save you datasource in R/3. This causes the timestamp of the datasource to be changed and hence the timestamp of the datasource in R/3 and BW are not in sync. Replication would make the timestamp in sync in both R/3 and BW.
    Hence you would notice the error "Timestamp error" when you do not replicate the datasource after changing it.
    Activating the data source, activating the structure and make available the dat source to use.

  • Error while activating the data source.

    Dear all,
    We are using the BI version 7.00 - i have a problem i.e., while creating the infopackage for the data source
    0PM_OM_OPA_2 the following error is displayed.
    "No active transfer rule for DS 0PM_OM_OPA_2 and ....source system CLNTDEV400; create first..."
    Moreover the data source is found to be in version "M" - while activating the same when in click on the display/change icon , the following error is popped up.
    "You can only edit 3.x DataSources using transfer rule
    maintenance Do you want to create the transfer rules now?"
    What could be the reason for this error. What are the things that are to be done to replicate the data and pull data?
    Valid experts comment is expected in this regard.
    Regards,
    M.M

    Hi Magesh,
    Replicate your data source in BW and then right click onit and choose Assign Info source, it may take you to BC wherein you may need to install the Transfer Rules and related info objects etc.... Once you maintain this data source in the source system then you can create an info pack withput any extra effort.
    Hope it helps..

  • SSRS 2008 R2 data source authentication issue

    Hello,
    End-users with Browser permissions for the necessary SSRS folders and reports are getting "The permissions denied to user [Windows user] are insufficient for performing this operation (rsAccessDenied)" even though the data source for the report is configured
    to use "credentials stored securely in the report server" and "Use as Windows credentials when connecting to the data source" is checked. Users who are members of the local admin machine hosting the Report Manager site don't get the error. But users with full
    control permissions to the SSRS directories, including the config files, do get the error. Obviously, the solution shouldn't entail giving end-users local admin or even full control permissions to the SQL Server SSRS folders.  Moreover, the error only
    occurs when using Windows credentials but not when using only a database credential, i.e. non Windows credentials.  This workaround doesn't work for me since I'm also using a data source connection to SSAS, which doesn't appear to use database logins
    - only Windows credentials that are added to roles.
    Please advise.
    Thanks,
    Ben Lezin

    Hi Ben,
    Generally, the error "The permissions denied to user [Windows user] are insufficient for performing this operation (rsAccessDenied)" should be caused
    by one of the following reasons:
    1. User Access Control (UAC). Windows Vista, Windows 7 and Windows Server 2008 limit the overuse of elevated permissions by removing administrator permissions
    when accessing applications. Because the operating system removes permissions, members of the local Administrators group run most applications as if they are using the Standard User account.
    If this issue is caused by UAC, please run Internet Explorer as administrator. From the Start menu, click All Programs, right-click Internet Explorer,
    and select Run as administrator. For more information about UAC, please refer to this document:
    http://msdn.microsoft.com/en-us/library/bb630430.aspx
    2. User has insufficient permissions to perform the operation. Please check the following items:
    a. End-users belong to "Browser" role. In Report Manager Home page, click "Folder Settings", make sure the end-users are in the security list and with
    Browser role permission.
    b. "Browser" role has permissions to perform the operation. You can use SSMS to connect to report server, expand Security/Roles, double click "Browser",
    and then check the tasks list.
    If there is anything unclear, please feel free to ask.
    Thanks,
    Albert Ye

  • Error while activating Transactional data source

    I am facing the below error while activating the transactional data source.
    Field Revenue ( Position 7 ): Amount Field in Internal Format, Check Settings.
    Can nyone plz let me know.

    Hi Reddy,
    You might have created the Revenue field Currency as "Fixed Currency" like INR or USD.
    In the Datasouce Def - Fields tab you have Internal format for a field then you should have the reference field to specify the external format like 0currency.
    In your case you have not taken any reference field 0currency. So you should n't specify the revenue field in Internal format,
    As Shashank said, Please change it to External format and Activate the DS.
    Thanks
    Sreekanth.

  • Re: Invalid Type CURR while activating the data source from R/3 to BI 7

    Dear Expert,
    I have created a data source using function module and has it successfully replicated in BI 7.
    But when I try to activate it, I run into the problem associated with "Invalid Type CURR" with two of the CURR fields.
    Could you help me to resolve this problem or provide me with some suggestions?
    Thanks and appreciated.
    Arthur

    In SAP BW 7.0 Currency types are managed via transaction RSCUR.. Perhaps you should check if everything is ok (i mean to check if the Currency Types are transported) before to active your DataSource.
    It's only a suggestion .. good luck !

  • Error while Replicating the Data Source in Quality System....

    Dear Expert,
       I have created a generic data source in R/3 Dev system and I replicated the data source to BW DEV system.  Everything is fine in DEV system.
    I have transported the Data Source to R/3 Quality System. And transported the related  objects in BW DEV system to BW QUALITY system.
    Now I am getting the error as follows :
    BW QUA System --> RSA1 --> Source System --> Data source Overview --> Sales & Distribution --> _REPLICATE_
    *DATASOURCE*.( clicked )
    Its moving to another screen (R/3 QUALITY) , but it is coming as a LOGIN screen. Its askong for the USER name and Password. And when I click on BACK button , its givin following pop-up
    RFC connection to source system LOGSYS is damaged  ==> no Metadata upload
    What could be the issue ?? Please suggest.
    Thanks,
    Sanjana

    Hi saveen,
    Yes I transported in that manner.
    I checked in Source System ( RSA13):
    Its giveng the pop-up  ,
                                    RFC connection check failed. Check connection
    Please suggest, how can I proceed ?
    Thanks,
    Sanjana

  • Re-replicate data source in QAS system doesn't work

    I've transported extract. structures from DEV ECC to QAS ECC and done data source replications on BI side.
    After that I done some changes (added several fields) on extraction structure CUSTOMER_ATTR on ECC side in dev env. and transported it to QAS ECC. Then I replicate CUSTOMER_ATTR on BI QAS nothing happens. It remains with the same field list.
    My QAS system is read-only. How can I re-replicate this CUSTOMER_ATTR to get new added fields?

    Gediminas 
    Datasource, extract structure and append structure(if any) not transported properly.
    Try to collect again and retransport and replicate.
    Check at RSA3 in QA system, now fields are visible or not.
    Srini

  • Import Active Directory Data into SAP HR

    We are currently working on updating user data in Active directory from data stored in SAP HR via the LDAP Connector. This is working great! The question is what is required to make this happen the other way around. Ex  Employee email address is stored in AD and we want to update IT105 email address from Active directory.
    Thanks in Advance!
    Tariq Khan

    Hello Tariq,
    I am also trying to find out the way for flowing data from AD to SAP HCM IT0105.
    If you found the solution, it would be a great help if you could pls share the solution.
    Hoping for the favorable response.
    Thanks in advance.
    Best Regards,
    Tauseef

  • Activation of Data sources RSA5 for PP

    Hi BW Gurus,
    I am Activating the Business content Data sources in RSA5 while activation i am getting errors for Master data 0Prodorder_attr and Text
    0workcenter_attr and text and hierarchy the data sources are not activating.
    It displays the error msg "Request/task QLTK901816 can only be changed in client 320"  currently i am working on 330 client for R3.
    Please provide the solution for this.
    Regards,
    Syed

    Hi Shahid,
    I think the transport request under which you are trying to capture the activated DS is in client 320. Create a new request in your current client (330) and provide this development class and transport request while activating. That should solve your problem. Hope it helps.
    Thanks and Regards
    Subray Hegde

Maybe you are looking for

  • Drill Down Report using Crystal reports in eclipse and jspviewer

    Hi I want to understand how to write a drill down report since I have a requirement for my project, so I tried to run the sample drill down.rpt that is available with Crystal Reports 2008 Complete Reference book by George Peck. I can see the results

  • My playlists are gone in my iTunes. How do I get them back?

    My playlists are no longer displaying in iTunes. Where are they and how do I get them back?

  • Show a Field type Flag in a Table and edit it

    Hi, i'm a beginner in Web Dynpro and i tried to solve on my own reading previous mails but i didn't find the solution. In my view i have a table binded from a table returned from a function called in the COMPONENTCONTROLLER. The custom structure of t

  • IR Value exceed GR value

    Hi xpert, how to block IV from processing IR if the item value exceed GR item value.

  • Enhanced podcast corrupt

    After creating a podcast with music, photos and links in Garage Bankd, it worked just fine in iTunes on my hard drive. But after uploading it to adudioblog.com, the photos all played at the wrong time and the links were totally gone. Any ideas what i