Query on GTC Logging
I am using flat file GTC connector for reconciling the user records. Is it possible to have separate log file for GTC since I need to ascertain which are the user records which have failed and for what reason. Could you please help me how to configure separate logging for GTC or suggest an alternate approach.
Thanks Rajiv,
are you suggesting to read failed events from database using OIM API ? or we another way or procedure?
Thanks,
Similar Messages
-
Querying for users logged into attendant console with AXL (help)
I am wondering if anyone knows of any AXL commands that can be used to query who is logged into attendant console? I know that there is a perfmon counter that will tell you how many users are logged in but there is no other detail beyond that. Any help would be greatly appreciated! Thank you in advance for the assistance.
So after speaking with O365 Support and examining the Activesync Logs (hold down control, rt. click on the exchange tray app bottom right corner of the screen, click Test ActiveSync) we were able to see outlook trying our on-premise exchange servers first.
Despite failing on them, and moving on to activesync.outlook.com, it still would not mount the O365 mailbox & shared mailboxes appropriately. If we set DNS to manual on the workstation to publics, the problem would go away.
Disabling SCP by running the following command on both our exchange servers fixed the issue:
Set-ClientAccessServer -Identity “SERVERNAME” -AutoDiscoverServiceInternalUri $NULL
Credit to AgileIT! Here's the complete reference: http://www.agileit.com/news/outlook-profile-autodiscover-service-order-of-precedence-and-disabling-scp-for-hosted-exchangeoffice-365-migrations/
4 Hours dealing with this issue. -
Hello,
We are seeing a lot of log messages like the one below when an MDO select query is run. There is a message for every numeric column. There doesnt seem to be any issue with the queries working properly its just creating a lot of log messages. Has anyone else had this issue?
Exception of type com.sap.sql.log.OpenSQLException caught:
Cannot fetch column 22, which has JDBC type DOUBLE, into a Java variable of type
float..
[EXCEPTION]
com.sap.sql.log.OpenSQLException: Cannot fetch
column 22, which has JDBC type DOUBLE, into a Java variable of type float.
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:83) ...Hi Christian,
You are right. As in your case it is a select query it does not reflect the error automatically. In my case, I had an insert query so it failed then and there, which was easier to debug and fix.
I have one question regarding your case. When you read the MDO using the query, what do you do with the output? Do you assign it to any local/transaction property in the output links of the query block or in a proceeding assignment block?
Because, the error mentions that the assignment of float to double datatype fails. So, in theory there should be some assignment done with the output.
Please check if you could figure out this part in your transaction.
Regards,
Saumya Govil -
Query apache access logs for Vists, Visit duration
I need help in querying for Vists, Visit duration in mins ..etc from apache access logs. A Visit is considered new if time difference between requests is greater than 60 mins.
ID VISITS VISIT-DURATION-MINS
'Usr-A' 3 112
'Usr-B' 2 34
My data is as below:
ID,TIME-HR-MIN
'Usr-A','01/01/2012 00:45'
'Usr-A','01/01/2012 00:49'
'Usr-A','01/01/2012 00:53'
'Usr-A','01/01/2012 01:04'
'Usr-A','01/01/2012 01:05'
'Usr-A','01/01/2012 01:09'
'Usr-A','01/01/2012 01:10'
'Usr-A','01/01/2012 01:11'
'Usr-A','01/01/2012 01:13'
'Usr-A','01/01/2012 01:14'
'Usr-A','01/01/2012 01:15'
'Usr-A','01/01/2012 02:00'
'Usr-A','01/01/2012 02:01'
'Usr-A','01/01/2012 02:19'
'Usr-A','01/01/2012 03:53'
'Usr-A','01/01/2012 03:59'
'Usr-A','01/01/2012 04:07'
'Usr-A','01/01/2012 04:11'
'Usr-A','01/01/2012 16:30'
'Usr-A','01/01/2012 16:37'
'Usr-A','01/01/2012 16:38'
'Usr-A','01/01/2012 16:39'
'Usr-B','01/01/2012 01:45'
'Usr-B','01/01/2012 01:46'
'Usr-B','01/01/2012 01:48'
'Usr-B','01/01/2012 01:49'
'Usr-B','01/01/2012 01:50'
'Usr-B','01/01/2012 02:07'
'Usr-B','01/01/2012 02:08'
'Usr-B','01/01/2012 02:09'
'Usr-B','01/01/2012 02:10'
'Usr-B','01/01/2012 05:21'
'Usr-B','01/01/2012 05:23'
'Usr-B','01/01/2012 05:30'Hello
I think this gives you what you need, although I think Usr-A has a total of 121 minutes not 112...
with visit as
( select 'Usr-A' id,TO_DATE('01/01/2012 00:45','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 00:49','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 00:53','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:04','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:05','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:09','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:10','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:11','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:13','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:14','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 01:15','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 02:00','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 02:01','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 02:19','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 03:53','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 03:59','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 04:07','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 04:11','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 16:30','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 16:37','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 16:38','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-A' id,TO_DATE('01/01/2012 16:39','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 01:45','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 01:46','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 01:48','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 01:49','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 01:50','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 02:07','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 02:08','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 02:09','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 02:10','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 05:21','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 05:23','dd/mm/yyyy hh24:mi') time_hr_min from dual union all
select 'Usr-B' id,TO_DATE('01/01/2012 05:30','dd/mm/yyyy hh24:mi') time_hr_min from dual
SELECT
id,
COUNT(*) num_visits,
SUM(visit_time) total_visit_time
FROM
SELECT
id,
SUM(visit_time) * 60 visit_time
FROM
SELECT
id,
time_hr_min,
visit_time,
MAX(marker)OVER(PARTITION BY id ORDER BY time_hr_min) marker
FROM
( SELECT
id,
time_hr_min,
CASE
WHEN visit_dur > 1
THEN
0
ELSE
visit_dur
END visit_time,
CASE
WHEN rn = 1
THEN
1
WHEN visit_dur > 1
THEN
rn
END marker
FROM
( SELECT
id,
time_hr_min,
ROW_NUMBER() OVER(PARTITION BY id ORDER BY time_hr_min) rn,
(time_hr_min - LAG(time_hr_min) OVER( PARTITION BY
id
ORDER BY
time_hr_min)
) * 24 visit_dur
FROM
visit
GROUP BY
id,
marker
GROUP BY
id
ORDER BY
id
ID NUM_VISITS TOTAL_VISIT_TIME
Usr-A 3 121
Usr-B 2 34
2 rows selected. HTH
David -
Auto Pay Program : query in Additional Log Tab page in F110
Hello Experts,
In T-Code F110, on Additional Log Tab page, could you please explain for whats the purpose these check boxes, their meaning/importance & when all/each one of them could be used :
1. Due date check
2. Payment method selection in all cases
3. Pmnt method selection if not successful
4. Line items of payment documents
This something which worrying me & i request your help.Hi,
These check boxes determine what to be written on to the logs.
For instance, if 'Due date check' is ticked, and if an invoce does not meet the criteria, it will be written on the logs. But, if it is not checked, such data will not be available in the logs.
Regards,
Sridevi -
Query on available.log file process list
Hi gurus,
I am aware that available.log is the file where we can see the status of the monitored process for an instance and it is located in work directory.
I also guess it is not 100% reliable.
I would like to know what are the monitored process for available.log in a solaris environment.
the process monitored in the list are getting stop/started frequently.
I would like to check which processes are those .
Thanks,
SowmyaHi Sunny,
Thanks for your info.
This file is getting updated frequently .
that means the processes are getting restarted frequently , isn't it?
Please find the details from the log ::
Available 29.07.2010 14:45:22 - 29.07.2010 14:45:22
Unavailable 29.07.2010 14:45:27 - 29.07.2010 14:45:27
Available 29.07.2010 14:46:23 - 29.07.2010 14:46:23
Unavailable 29.07.2010 14:46:27 - 29.07.2010 14:46:27
Available 29.07.2010 14:47:23 - 29.07.2010 14:47:23
Unavailable 29.07.2010 14:47:27 - 29.07.2010 14:47:27
Available 29.07.2010 14:48:23 - 29.07.2010 14:48:23
Unavailable 29.07.2010 14:48:27 - 29.07.2010 14:48:27
Available 29.07.2010 14:49:23 - 29.07.2010 14:49:23
Unavailable 29.07.2010 14:49:27 - 29.07.2010 14:49:27
Available 29.07.2010 14:50:23 - 29.07.2010 14:50:23
Unavailable 29.07.2010 14:50:27 - 29.07.2010 14:50:27
Available 29.07.2010 14:51:23 - 29.07.2010 14:51:23
Unavailable 29.07.2010 14:51:27 - 29.07.2010 14:51:27
Available 29.07.2010 14:52:23 - 29.07.2010 14:52:23
Unavailable 29.07.2010 14:52:27 - 29.07.2010 14:52:27
Available 29.07.2010 14:53:23 - 29.07.2010 14:53:23
Unavailable 29.07.2010 14:53:27 - 29.07.2010 14:53:27
But the server is up and running fine .
Is this file 100% reliable?
Or can it be a bug somewhere ,for ex may be kernel bug which is updating the file incorrectly? -
Hi Experts,
Whenever any network issues or something happens so that connection between client and Oracle server has lost.
Can that information store in client sqlnet.log file or do need to set some settings so that it'll write into sqlnet.log.
Why i am asking this is we have an issues today i got one error
ORA-12571 - TNS: Packet Writer Failure
in one of our process log file. So want to know is this a network issues or any other issues ??1009072 wrote:
Hi Sybrand,
Thanks for your quick response. I have below one concern
Errors, orginating at the client, automatically are written to sqlnet.log
i dont see any sqlnet.log file in client ORACLE_HOME/network/admin location. That means from client side everything was ok when the issue occurred ??
sqlnet.log files aren't always written to ORACLE_HOME/network/anything. I've seen them show up in the 'current' directory of the client process that created the error. -
SQL Query is not found in NQQuery.log
Hi Experts,
I am created an request and executed. But I could not able to find the Physical SQL Query in the NQQuery.log file under OBIEE_HOME/OracleBI/server/Log directory.
I am not running the report with Administrator privileges. Any inputs would be appreciated.
Thanks in Advance.
Regards
sivaHi Brijesh,
I tried to set the log level to 4, but still could not able to get the actual physical sql query from NQQuery.log file. Please see the below ( part of the log file)
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:02
-------------------- Sending query to database named olap (id: <<16271>>):
select distinct D1.c2 as c1,
D1.c3 as c2,
D1.c4 as c3,
D1.c1 as c4,
D1.c1 as c5
from
(select count(T3809.ORDER_WID) as c1,
T15731.COUNTY as c2,
T15731.STATE as c3,
T15731.COUNTRY as c4
from
WC_ORDER_DT T3781,
WC_ADDRESS_DT T15731,
WC_ORDER_FT T3809
where ( T3781.ROW_WID = T3809.ORDER_WID and T3809.SHIP_TO_ADDRESSES_WID = T15731.ROW_WID and T3781.ORDER_REQUESTED_DATE between TO_DATE('2009-08-12 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') and TO_DATE('2009-08-12 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') )
group by T15731.COUNTY, T15731.STATE, T15731.COUNTRY
) D1
order by c1, c2, c3
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Query Result Cache: [59124] The query for user 'genericpoweruser' was inserted into the query result cache. The filename is 'C:\OBIEE\OracleBIData\cache\NQS_VREDDY_733634_59402_00000002.TBL'.
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Query Status: Successful Completion
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Rows 446, bytes 98120 retrieved from database query id: <<16271>>
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Physical query response time 9 (seconds), id <<16271>>
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Physical Query Summary Stats: Number of physical queries 1, Cumulative time 9, DB-connect time 0 (seconds)
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Rows returned to Client 446
+++genericpoweruser:2a0000:2a0003:----2009/08/13 16:30:12
-------------------- Logical Query Summary Stats: Elapsed time 10, Response time 10, Compilation time 0 (seconds)
Any inputs would be appreciated. Thanks in Advance.
Siva -
Logical sql in log file.
Can someone please tell me how to see the complete sql query in the log file. If I run the same query the sql is not being produced I looked in the server log file and also manage sessions log file. It just says all columns from 'Subject Area'. I want to see all the joins and filters as well. Even for repeated queries how can I see complete sql. I set my logging level to 2.
http://lmgtfy.com/?q=obiee+disable+query+caching
http://catb.org/esr/faqs/smart-questions.html#homework -
Script to Export Pervious Day Events Logs to CSV
HI,
I am trying to export all the previous day's application event logs to a CSV file. I found the following script on net. But for this script to work I need to enter in the Event ID's I wont to export. Does anyone have any idea how I can change thsi script
to export all event ID's or have another script that can?
'Description : This script queries the event log for...whatever you want it to! Just set the event 'log name and event ID's!
'Initialization Section
Option Explicit
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Dim objDictionary, objFSO, wshShell, wshNetwork
Dim scriptBaseName, scriptPath, scriptLogPath
Dim ipAddress, macAddress, item, messageType, message
On Error Resume Next
Set objDictionary = NewDictionary
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set wshShell = CreateObject("Wscript.Shell")
Set wshNetwork = CreateObject("Wscript.Network")
scriptBaseName = objFSO.GetBaseName(Wscript.ScriptFullName)
scriptPath = objFSO.GetFile(Wscript.ScriptFullName).ParentFolder.Path
scriptLogPath = scriptPath & "\" & IsoDateString(Now)
If Err.Number <> 0 Then
Wscript.Quit
End If
On Error Goto 0
'Main Processing Section
On Error Resume Next
PromptScriptStart
ProcessScript
If Err.Number <> 0 Then
MsgBox BuildError("Processing Script"), vbCritical, scriptBaseName
Wscript.Quit
End If
PromptScriptEnd
On Error Goto 0
'Functions Processing Section
'Name : ProcessScript -> Primary Function that controls all other script processing.
'Parameters : None ->
'Return : None ->
Function ProcessScript
Dim hostName, logName, startDateTime, endDateTime
Dim events, eventNumbers, i
hostName = wshNetwork.ComputerName
logName = "application"
eventNumbers = Array("1001","1")
startDateTime = DateAdd("n", -21600, Now)
'Query the event log for the eventID's within the specified event log name and date range.
If Not QueryEventLog(events, hostName, logName, eventNumbers, startDateTime) Then
Exit Function
End If
'Log the scripts results to the scripts
For i = 0 To UBound(events)
LogMessage events(i)
Next
End Function
'Name : QueryEventLog -> Primary Function that controls all other script processing.
'Parameters : results -> Input/Output : Variable assigned to an array of results from querying the event log.
' : hostName -> String containing the hostName of the system to query the event log on.
' : logName -> String containing the name of the Event Log to query on the system.
' : eventNumbers -> Array containing the EventID's (eventCode) to search for within the event log.
' : startDateTime -> Date\Time containing the date to finish searching at.
' : minutes -> Integer containing the number of minutes to subtract from the startDate to begin the search.
'Return : QueryEventLog -> Returns True if the event log was successfully queried otherwise returns False.
Function QueryEventLog(results, hostName, logName, eventNumbers, startDateTime)
Dim wmiDateTime, wmi, query, eventItems, eventItem
Dim timeWritten, eventDate, eventTime, description
Dim eventsDict, eventInfo, errorCount, i
QueryEventLog = False
errorCount = 0
If Not IsArray(eventNumbers) Then
eventNumbers = Array(eventNumbers)
End If
'Construct part of the WMI Query to account for searching multiple eventID's
query = "Select * from Win32_NTLogEvent Where Logfile = " & SQ(logName) & " And (EventCode = "
For i = 0 To UBound(eventNumbers)
query = query & SQ(eventNumbers(i)) & " Or EventCode = "
Next
On Error Resume Next
Set eventsDict = NewDictionary
If Err.Number <> 0 Then
LogError "Creating Dictionary Object"
Exit Function
End If
Set wmi = GetObject("winmgmts:{impersonationLevel=impersonate,(Security)}!\\" & hostName & "\root\cimv2")
If Err.Number <> 0 Then
LogError "Creating WMI Object to connect to " & DQ(hostName)
Exit Function
End If
'Create the "SWbemDateTime" Object for converting WMI Date formats. Supported in Windows Server 2003 & Windows XP.
Set wmiDateTime = CreateObject("WbemScripting.SWbemDateTime")
If Err.Number <> 0 Then
LogError "Creating " & DQ("WbemScripting.SWbemDateTime") & " object"
Exit Function
End If
'Build the WQL query and execute it.
wmiDateTime.SetVarDate startDateTime, True
query = Left(query, InStrRev(query, "'")) & ") And (TimeWritten >= " & SQ(wmiDateTime.Value) & ")"
Set eventItems = wmi.ExecQuery(query)
If Err.Number <> 0 Then
LogError "Executing WMI Query " & DQ(query)
Exit Function
End If
'Convert the property values of Each event found to a comma seperated string and add it to the dictionary.
For Each eventItem In eventItems
Do
timeWritten = ""
eventDate = ""
eventTime = ""
eventInfo = ""
timeWritten = ConvertWMIDateTime(eventItem.TimeWritten)
eventDate = FormatDateTime(timeWritten, vbShortDate)
eventTime = FormatDateTime(timeWritten, vbLongTime)
eventInfo = eventDate &
eventInfo = eventInfo & eventTime & ","
eventInfo = eventInfo & eventItem.SourceName & ","
eventInfo = eventInfo & eventItem.Type & ","
eventInfo = eventInfo & eventItem.Category & ","
eventInfo = eventInfo & eventItem.EventCode & ","
eventInfo = eventInfo & eventItem.User & ","
eventInfo = eventInfo & eventItem.ComputerName & ","
description = eventItem.Message
'Ensure the event description is not blank.
If IsNull(description) Then
description = "The event description cannot be found."
End If
description = Replace(description, vbCrLf, " ")
eventInfo = eventInfo & description
'Check if any errors occurred enumerating the event Information
If Err.Number <> 0 Then
LogError "Enumerating Event Properties from the " & DQ(logName) & " event log on " & DQ(hostName)
errorCount = errorCount + 1
Err.Clear
Exit Do
End If
'Remove all Tabs and spaces.
eventInfo = Trim(Replace(eventInfo, vbTab, " "))
Do While InStr(1, eventInfo, " ", vbTextCompare) <> 0
eventInfo = Replace(eventInfo, " ", " ")
Loop
'Add the Event Information to the Dictionary object if it doesn't exist.
If Not eventsDict.Exists(eventInfo) Then
eventsDict(eventsDict.Count) = eventInfo
End If
Loop Until True
Next
On Error Goto 0
If errorCount <> 0 Then
Exit Function
End If
results = eventsDict.Items
QueryEventLog = True
End Function
'Name : ConvertWMIDateTime -> Converts a WMI Date Time String into a String that can be formatted as a valid Date Time.
'Parameters : wmiDateTimeString -> String containing a WMI Date Time String.
'Return : ConvertWMIDateTime -> Returns a valid Date Time String otherwise returns a Blank String.
Function ConvertWMIDateTime(wmiDateTimeString)
Dim integerValues, i
'Ensure the wmiDateTimeString contains a "+" or "-" character. If it doesn't it is not a valid WMI date time so exit.
If InStr(1, wmiDateTimeString, "+", vbTextCompare) = 0 And _
InStr(1, wmiDateTimeString, "-", vbTextCompare) = 0 Then
ConvertWMIDateTime = ""
Exit Function
End If
'Replace any "." or "+" or "-" characters in the wmiDateTimeString and check each character is a valid integer.
integerValues = Replace(Replace(Replace(wmiDateTimeString, ".", ""), "+", ""), "-", "")
For i = 1 To Len(integerValues)
If Not IsNumeric(Mid(integerValues, i, 1)) Then
ConvertWMIDateTime = ""
Exit Function
End If
Next
'Convert the WMI Date Time string to a String that can be formatted as a valid Date Time value.
ConvertWMIDateTime = CDate(Mid(wmiDateTimeString, 5, 2) & "/" & _
Mid(wmiDateTimeString, 7, 2) & "/" & Left(wmiDateTimeString,
4) & " " & _
Mid(wmiDateTimeString, 9, 2) & ":" & _
Mid(wmiDateTimeString, 11, 2) & ":" & _
Mid(wmiDateTimeString, 13, 2))
End Function
'Name : NewDictionary -> Creates a new dictionary object.
'Parameters : None ->
'Return : NewDictionary -> Returns a dictionary object.
Function NewDictionary
Dim dict
Set dict = CreateObject("scripting.Dictionary")
dict.CompareMode = vbTextCompare
Set NewDictionary = dict
End Function
'Name : SQ -> Places single quotes around a string
'Parameters : stringValue -> String containing the value to place single quotes around
'Return : SQ -> Returns a single quoted string
Function SQ(ByVal stringValue)
If VarType(stringValue) = vbString Then
SQ = "'" & stringValue & "'"
End If
End Function
'Name : DQ -> Place double quotes around a string and replace double quotes
' : -> within the string with pairs of double quotes.
'Parameters : stringValue -> String value to be double quoted
'Return : DQ -> Double quoted string.
Function DQ (ByVal stringValue)
If stringValue <> "" Then
DQ = """" & Replace (stringValue, """", """""") & """"
Else
DQ = """"""
End If
End Function
'Name : IsoDateTimeString -> Generate an ISO date and time string from a date/time value.
'Parameters : dateValue -> Input date/time value.
'Return : IsoDateTimeString -> Date and time parts of the input value in "yyyy-mm-dd hh:mm:ss" format.
Function IsoDateTimeString(dateValue)
IsoDateTimeString = IsoDateString (dateValue) & " " & IsoTimeString (dateValue)
End Function
'Name : IsoDateString -> Generate an ISO date string from a date/time value.
'Parameters : dateValue -> Input date/time value.
'Return : IsoDateString -> Date part of the input value in "yyyy-mm-dd" format.
Function IsoDateString(dateValue)
If IsDate(dateValue) Then
IsoDateString = Right ("000" & Year (dateValue), 4) & "-" & _
Right ( "0" & Month (dateValue), 2) & "-" & _
Right ( "0" & Day (dateValue), 2)
Else
IsoDateString = "0000-00-00"
End If
End Function
'Name : IsoTimeString -> Generate an ISO time string from a date/time value.
'Parameters : dateValue -> Input date/time value.
'Return : IsoTimeString -> Time part of the input value in "hh:mm:ss" format.
Function IsoTimeString(dateValue)
If IsDate(dateValue) Then
IsoTimeString = Right ("0" & Hour (dateValue), 2) & ":" & _
Right ("0" & Minute (dateValue), 2) & ":" & _
Right ("0" & Second (dateValue), 2)
Else
IsoTimeString = "00:00:00"
End If
End Function
'Name : LogMessage -> Writes a message to a log file.
'Parameters : logPath -> String containing the full folder path and file name of the Log file without with file extension.
' : message -> String containing the message to include in the log message.
'Return : None ->
Function LogMessage(message)
If Not LogToCentralFile(scriptLogPath & ".csv", IsoDateTimeString(Now) & "," & message) Then
Exit Function
End If
End Function
'Name : LogError -> Writes an error message to a log file.
'Parameters : logPath -> String containing the full folder path and file name of the Log file without with file extension.
' : message -> String containing a description of the event that caused the error to occur.
'Return : None ->
Function LogError(message)
If Not LogToCentralFile(scriptLogPath & ".err", IsoDateTimeString(Now) & "," & BuildError(message)) Then
Exit Function
End If
End Function
'Name : BuildError -> Builds a string of information relating to the error object.
'Parameters: message -> String containnig the message that relates to the process that caused the error.
'Return : BuildError -> Returns a string relating to error object.
Function BuildError(message)
BuildError = "Error " & Err.Number & " (Hex " & Hex(Err.Number) & ") " & message & ". " & Err.Description
End Function
'Name : LogToCentralFile -> Attempts to Appends information to a central file.
'Parameters : logSpec -> Folder path, file name and extension of the central log file to append to.
' : message -> String to include in the central log file
'Return : LogToCentralFile -> Returns True if Successfull otherwise False.
Function LogToCentralFile(logSpec, message)
Dim attempts, objLogFile
LogToCentralFile = False
'Attempt to append to the central log file up to 10 times, as it may be locked by some other system.
attempts = 0
Do
On Error Resume Next
Set objLogFile = objFSO.OpenTextFile(logSpec, ForAppending, True)
If Err.Number = 0 Then
objLogFile.WriteLine message
objLogFile.Close
LogToCentralFile = True
Exit Function
End If
On Error Goto 0
Randomize
Wscript.sleep 1000 + Rnd * 100
attempts = attempts + 1
Loop Until attempts >= 10
End Function
'Name : PromptScriptStart -> Prompt when script starts.
'Parameters : None
'Return : None
Function PromptScriptStart
MsgBox "Now processing the " & DQ(Wscript.ScriptName) & " script.", vbInformation, scriptBaseName
End Function
'Name : PromptScriptEnd -> Prompt when script has completed.
'Parameters : None
'Return : None
Function PromptScriptEnd
MsgBox "The " & DQ(Wscript.ScriptName) & " script has completed successfully.", vbInformation, scriptBaseName
End Function
ThanksHere is a script that will copy the previous days events and save them to "C:\". The file name be yesterdays date ex "04-18-2010-Events.csv"
Const strComputer = "."
Dim objFSO, objWMIService, colEvents, objEvent, outFile
Dim dtmStartDate, dtmEndDate, DateToCheck, fileDate
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
Set dtmEndDate = CreateObject("WbemScripting.SWbemDateTime")
'change the date form "/" to "-" so it can be used in the file name
fileDate = Replace(Date - 1,"/","-")
Set outFile = objFSO.CreateTextFile("C:\" & fileDate & "-Events.csv",True)
DateToCheck = Date - 1
dtmEndDate.SetVarDate Date, True
dtmStartDate.SetVarDate DateToCheck, True
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where TimeWritten >= '" _
& dtmStartDate & "' and TimeWritten < '" & dtmEndDate & "'")
For each objEvent in colEvents
outFile.WriteLine String(100,"-")
outFile.WriteLine "Category = " & objEvent.Category
outFile.WriteLine "ComputerName = " & objEvent.ComputerName
outFile.WriteLine "EventCode = " & objEvent.EventCode
outFile.WriteLine "Message = " & objEvent.Message
outFile.WriteLine "RecordNumber = " & objEvent.RecordNumber
outFile.WriteLine "SourceName = " & objEvent.SourceName
outFile.WriteLine "TimeWritten = " & objEvent.TimeWritten
outFile.WriteLine "Type = " & objEvent.Type
outFile.WriteLine "User = " & objEvent.User
outFile.WriteLine String(100,"-")
Next
outFile.Close
MsgBox "Finished!"
v/r LikeToCode....Mark the best replies as answers. -
Unable to view SQL Request in Log files
Hi Folks,
I am facing an issue which I am unable to find out the solution to view the physical query generated in log files in Presentation Services.
Below is the SQL Request generated but I want to view the exact physical query i.e SQL Request which is hitting DB.
So please guiude me to resolve this issue, I guess it is because of Initialization blocks created which is blocking to view the SQL request.
-------------------- SQL Request:
set variable LOGLEVEL = 7;SELECT "- Policy Effective-Start Date"."Start Quarter" saw_0, "- Insurance Policy Facts".Revenue saw_1, "- Insurance Policy Facts"."# Insurance Policies" saw_2, "Insurance Policy".Status saw_3, "Insurance Policy".Type saw_4 FROM "Insurance Policies" WHERE ("Insurance Policy".Type = 'Policy') AND ("- Policy Effective-Start Date"."Start Julian Day Number" BETWEEN VALUEOF(CURRENT_JULIAN_DAY)-365 AND VALUEOF("CURRENT_JULIAN_DAY")) ORDER BY saw_0, saw_3, saw_4
/* QUERY_SRC_CD='rawSQL' */
Regards
DjThere is no Enterprise Edition of SSMS. There is SSMS Basic and SSMS Complete. Prior to 2012 sp1, only SSMS Basic were available with Express Edition - but as of 2012 sp1 Expredd also offers SSMS Complete. SSMS Complete is selected bu default when you install
SSMS (unless you are prior to 2012 sp1 and are using Express, of course).
However, even SSMS Basic *should* show Agent assuming you have permissions for that. This is hearsay, but from trusted sources. Here is what to do:
Check what is installed for the machine from where you are running SSMS. You can do that using SQL Server Installation Center - see this blog post: http://sqlblog.com/blogs/tibor_karaszi/archive/2011/02/10/what-does-this-express-edition-look-like-anyhow.aspx
(towards the end).
On that machine try both this problematic account as well as an account which is sysadmin. Does the sysadmin account see Agent? If so, you know permissions aren't granted properly. If not, then you know the tool is the problme.
Also try the problematic account from a machine where you know you see Agent normally. Again, this will help you assess whether the problem is the tool (SSMS) or permissions for the account.
Tibor Karaszi, SQL Server MVP |
web | blog -
Dear All,
We have 10gR2 RAC with Physical Data Guard environment using ASM and both have same disk group names. Lets say the primary database name is prim and stand by database name is stdby. We are getting the following errors in alert log file of standby:
Clearing online redo logfile 9 +DG_DATAFILES_AND_FB/prim/onlinelog/group9_2a.rdo
Clearing online log 9 of thread 2 sequence number 0
Errors in file c:\oracle\product\10.2.0\admin\stdby\bdump\stdby1_mrp0_4288.trc:
ORA-00313: Message 313 not found; No message file for product=RDBMS, facility=ORA; arguments: [9] [2]
ORA-00312: Message 312 not found; No message file for product=RDBMS, facility=ORA; arguments: [9] [2] [+DG_DATAFILES_AND_FB/prim/onlinelog/group9_2a.rdo]
ORA-17503: Message 17503 not found; No message file for product=RDBMS, facility=ORA; arguments: [2] [+DG_DATAFILES_AND_FB/prim/onlinelog/group9_2a.rdo]
ORA-15173: entry 'prim does not exist in directory '/'
Errors in file c:\oracle\product\10.2.0\admin\stdby\bdump\stdby1_mrp0_4288.trc:
ORA-00344: Message 344 not found; No message file for product=RDBMS, facility=ORA; arguments: [+DG_DATAFILES_AND_FB/prim/onlinelog/group9_2a.rdo]
ORA-17502: Message 17502 not found; No message file for product=RDBMS, facility=ORA; arguments: [4] [+DG_DATAFILES_AND_FB/prim/onlinelog/group9_2a.rdo]
ORA-15173: entry 'prim' does not exist in directory '/'The errors show that the standby is trying to find files in directory +DG_DATAFILES_AND_FB/prim/onlinelog which apparently doesn’t exist on standby. Below is the result of query for redo logs on standby:
SQL> SELECT group#, status, member FROM v$logfile where member like '%prim/%'
GROUP# STATUS MEMEBER
9 +DG_DATAFILES_AND_FB/prim/onlinelog/group9_2a.rdo
1 +DG_DATAFILES_AND_FB/prim/standbylogs/sredo1.rdo
10 +DG_DATAFILES_AND_FB/prim/onlinelog/group10_1a.rdo
2 +DG_DATAFILES_AND_FB/prim/standbylogs/sredo2.rdo
3 +DG_DATAFILES_AND_FB/prim/standbylogs/sredo3.rdo
4 +DG_DATAFILES_AND_FB/prim/standbylogs/sredo4.rdo
11 +DG_DATAFILES_AND_FB/prim/onlinelog/group11_1a.rdo
12 +DG_DATAFILES_AND_FB/prim/onlinelog/group12_2a.rdo
8 rows selected. How we can get rid of this error?
Best regards,Generally when we setup standby, are these directories created automatically (i mean '+DG_DATAFILES_AND_FB/prim and '+DG_DATAFILES_AND_FB/stdby) on standby? My understanding is that by default only '+DG_DATAFILES_AND_FB/stdby is created.
What if i want to put all logs (that are in stdby and prim) in +DG_DATAFILES_AND_FB/stdby?What is the value of DB_CREATE_FILE_DEST and you also set DB_CREATE_ONLINE_LOG_DEST_<> value?
Also i don't know whether it is relevant or not, but we performed a roll forward for standby using metalink doc id: 836986.1 (Steps to perform for Rolling forward a standby database using RMAN incremental backup when primary and standby are in ASM filesystem). But i am not sure whether the error started coming after that or not.
But in the beginning for sure, there were no such errors. Just trying to put as much information as i can.Even though you are using same disk groups, But the sub directory names such as "prim","stby" are different,
After you changed the values of DB_FILE_NAME_CONVERT/LOG_FILE_NAME_CONVERT have you bounced database ? They are static parameters.
Bounce it and then start MRP, initally errors are expected even it happens during RMAN duplicate.
logfile member shows in database but not on physical disk, not match
if you haven't used RMAN duplicate then drop and create redo logs, this can be done at any time. -
Issue with compounding characteristics in the query
Hello guyz
I have an issue with 2 chars one compounding the other in the query. The 2 chars are : Action Type and Action Reason in HR. Action type is the compounding char. for action reason.
For example: we have
Action Type Action Reason
01 A1
01 A2
02 A1
02 A2
Now I want to restrict a key figure based on specific action reasons and types. But when I pick AT: 01, AR: A1, it selects AT: 02, AR: A1. The reason why it does this is because, there are 2 A1s under action reason and it picks the one at the end (ie last record with value A1 in the table)
But my compounding works when i create variables for the same and have them as user entry variables.
My question: How do i pick specific action reasons for specific action types (for restricting key figures) in the above example?
Thanks.Well.. thank you Ashish for your help so far.
Now, these Chars. are coming directly from a data source to the cube. From my previous example again, the thing that i dont understand is:
When i try restrict the KF with AR, on the left hand side of the pop up window i see:
AR
[01, A1] --> Very good
[01, A2] --> Good
[02, A3[ --> OK
[02, A4] --> Bad
[02, A1] --> Very Bad
But, when i drag 'A1' (Very Good) to restrict on the KF on the right hand side of the window, I only get:
A1 (Very good), what i want to drag is [01, A1] --> very good.. action type value should come along with action reason.. right??
when i save the query, logout and log back in, I see:
A1 (Very Bad)
Question: Why dosen't Action type char come along with action reason on the right hand side.. its a compounding char right?? So it should determine what value action reason takes?
Any idea?? -
Log entries in Service Consupmtion Layer Application Logs of Duet Enterpr
Dear all,
I need your inputs to solve the below mentioned issue,
There is a communication developed between MS sharepoint and SAP.
By using Mapper Classes for each and every operations the conversion of data format from Sharepoint to SAP and viceversa happens.
We can see the message or error logs created during the conversion process using the T-code /iwfnd/view_log.
But i want my custumized messages has to come in that log for that i used the following code in the mapper class Post method but still my logs are not coming in the T-code /iwfnd/view_log.
DATA: lo_logger TYPE REF TO /iwfnd/cl_logger,"logger singleton
lo_message_container TYPE REF TO /iwfnd/if_message_container,"message container
lv_message TYPE bapi_msg,
lv_log_material TYPE symsgv,
lv_log_plant TYPE symsgv,
lv_instance_counter TYPE i,
lv_previous_pur_doc TYPE char10.
CONSTANTS gc_log_agent_name TYPE /iwfnd/sup_iw_agent VALUE 'Dev Guide Purchase Req'.
CONSTANTS gc_log_msg_id TYPE symsgid VALUE 'ZDUET_SCL_PR'.
Get logger
CALL METHOD /iwfnd/cl_logger=>get_logger
RECEIVING
ro_logger = lo_logger.
initialize the post mapper log step
lo_logger->log_step_init(
EXPORTING iv_msg_number = 000 "Post Mapping started for Purchase Req Header Query
iv_msg_id = gc_log_msg_id " message class
iv_system_alias = iv_system_alias "Backend System Alias
iv_agent = gc_log_agent_name "Dev Guide Purchase Req
RECEIVING
rv_msg_handle = lv_msg_handle ).
lo_logger->log_message(
EXPORTING
iv_msg_type = /iwfnd/cl_logger=>info " Message Type
iv_msg_id = gc_log_msg_id " Message Class
iv_msg_number = 006 " Message Number
iv_msg_v1 = lv_instance_counter " Message Variable
iv_system_alias = iv_system_alias " System Alias
iv_agent = gc_log_agent_name " IW Agent
Else
read through the input parameters for logging query parameters
READ TABLE it_parameters INTO ls_parameters WITH KEY attr_name = 'MATERIAL'.
lv_log_material = ls_parameters-low.
READ TABLE it_parameters INTO ls_parameters WITH KEY attr_name = 'PLANT'.
lv_log_plant = ls_parameters-low.
get the message container to add messages
lo_message_container = io_request_data->get_message_container( ).
set the request result code to failed so a fault message can be created
CALL METHOD io_request_data->set_result_code
EXPORTING
iv_result_code = /iwfnd/if_srd_request_context=>cs_result_code-failed_permanent.
add the message to the message container, this will create an error log entry automatically
CALL METHOD lo_message_container->add_message
EXPORTING
is_object_key = ls_key
iv_msg_type = 'E' "Error
iv_msg_id = gc_log_msg_id
iv_msg_number = 004 "Query for Material &1 and Plant &2 returned no results.
iv_msg_v1 = lv_log_material
iv_msg_v2 = lv_log_plant
iv_is_leading_message = abap_true
iv_message_creator = gc_log_agent_name.
Endif.
end this post mapper log step
lo_logger->log_step_completion( EXPORTING
iv_msg_type = /iwfnd/cl_logger=>info
iv_msg_id = gc_log_msg_id
iv_msg_number = 002 "Post Mapping finished for Purchase Req Header Query
iv_system_alias = iv_system_alias
iv_agent = gc_log_agent_name
iv_msg_handle = lv_msg_handle ).
please let me know the answe for this issue.
Many thanks in Advance,
HarishHi Girimurugan,
I am currently working with SAP Gateway related stuffs and I need a clarification regarding the application log.
Hope you are very busy and please clarify the doubts if you can spare few minutes towards this query.
Appreciate your valuable advise towards this.
Query:
Can we log any of the different types of logs (I Info / W Warning / A Abort or Cancel / E Error ) into Application Log(/IWFND/APPS_LOG) of the Gateway system in a Hub deployment model ?
How the logging can be achieved?
What are the scenarios, wherein the Application logs are preferred?
Also I have already raised a query in the SCN with this link: http://scn.sap.com/message/15477543. But could not get much details about it.
Can you please clarify the same?
Thanks & Regards,
Mohamed Meeran -
Fetch client IP addresses from the Netlogon.log file of all domain controllers in the domain
Hi,
The event ID 5807 is logged in the system logs of domain controllers as a result of which the IP addresses for the missing subnets are logged in Netlogon.log under %systemroot%/debug. The end goal is to fetch the IP addresses along with rest of the respective
attributes from the Netlogon.log for all the domain controllers in the domain. I have the following script however, it gives me a 0KB file despite the fact that the Netlogon.log on the DC contains ample entries from last two months.
function GetDomainControllers {
$DCs=[system.directoryservices.activedirectory.domain]::GetCurrentDomain() | ForEach-Object {$_.DomainControllers} | ForEach-Object {$_.Name}
return $DCs
function GetNetLogonFile ($server) {
$path= '\\' + $server + '\c$\windows\debug\netlogon.log'
try {$netlogon=get-content -Path $path -ErrorAction stop}
catch { "Can't open $path"}
#reverse the array's order to the end of the file
[array]::Reverse($netlogon)
$IPs=@()
foreach ($line in $netlogon) {
#split the line into pieces using a space as the delimiter
$splitline=$line.split(' ')
#Get the date stamp which is in the mm/dd format
$logdate=$splitline[0]
#split the date
$logdatesplit=($logdate.split('/'))
[int]$logmonth=$logdatesplit[0]
#last month and this month
if (($logmonth -eq $thismonth) -or ($logmonth -eq $lastmonth)) {
#only push it into an array if it matches an IP address format
if ($splitline[5] -match '\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b'){
$objuser = new-object system.object
$objuser | add-member -type NoteProperty -name IPaddress -value $splitline[5]
$objuser | add-member -type NoteProperty -name Computername -value $splitline[4]
$objuser | add-member -type NoteProperty -name Server -value $server
$objuser | add-member -type NoteProperty -name Date -value $splitline[0]
$objuser | add-member -type NoteProperty -name Time -value $splitline[1]
$IPs+=$objuser
} else {
#break out of loop if the date is not this month or last month
break
return $IPs
#Get last month's date
$thismonth=(get-date).month
$lastmonth=((get-date).addmonths(-1)).month
#get all the domain controllers
$DomainControllers=GetDomainControllers
#Get the Netlogon.log from each DC
Foreach ($DomainController in $DomainControllers) {
$IPsFromDC=GetNetLogonFile($DomainController)
$allIPs+=$IPsFromDC
$allIPs | Sort-Object -Property IPaddress -Unique | Export-Csv "E:\bin\NetlogonIPs.csv"
PLEASE HELP!!Hi jrv,
Thanks a lot for your help.
I understand you cannot keep on iterating the code for me. However, I am stuck at this error :-
ERROR : Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid DateTime."
After the following code finishes executing, I get the following output :-
$csv=cat c:\windows\debug\netlogon.log |
%{'{0}|{1}' -f $_.SubString(0,14),$_.SubString(15,$_.Length-15)}|
ConvertFrom-Csv -Delimiter '|' -header time,message
time message
04/14 01:18:45
NO_CLIENT_SITE: ServerX 10.x.x.x
04/14 01:17:45
NO_CLIENT_SITE: ServerY 10.x.x.x
04/14 01:17:44
NO_CLIENT_SITE: ServerY 10.x.x.x
04/14 01:17:43
NO_CLIENT_SITE: ServerX 10.x.x.x
However, I get the above mentioned error at the following line :-
$csv|%{$_.time=[datetime]::Parse(($_.time -replace ' ','/2015 '))}
I would later want to run the query just for logs from past day.
Entire code is as follows :-
function GetDomainControllers {
$DCs=[system.directoryservices.activedirectory.domain]::GetCurrentDomain() | ForEach-Object {$_.DomainControllers} | ForEach-Object {$_.Name}
return $DCs
function GetNetLogonFile ($server) {
$path= 'C:\Test\netlogon.log'
try {$netlogon=get-content -Path $path -ErrorAction stop}
catch { "Can't open $path"}
#reverse the array's order to the end of the file
[array]::Reverse($netlogon)
foreach ($line in $netlogon) {
$csv= $netlogon | %{'{0}|{1}' -f $_.SubString(0,14),$_.SubString(15,$_.Length-15)}| ConvertFrom-Csv -Delimiter '|' -header time,message | Out-Gridview
$csv|%{$_.time=[datetime]::Parse(($_.time -replace ' ','/2015 '))}
#get all the domain controllers
$DomainControllers=GetDomainControllers
#Get the Netlogon.log from each DC
Foreach ($DomainController in $DomainControllers) {
GetNetLogonFile($DomainController)
Please help!! Any help will be highly appreciated.
Maybe you are looking for
-
Having Problems opening After Effects CC
Having Problems opening After Effects CC - wont open and I get an error message 0cx00000005
-
Modvat accounts not maintained for CEIV
Dear Experts, We are getting error Modvat accounts not maintained for CEIV for excise group while cancelling excise invoice thru J1IH, cancel excise invoice. The same error is not appearing in production system. its happening in development & accept
-
Problem with date format parameter in SSRS2012 after migration from SSRS2008
Hello, We are migration from Reporting Services 2008 on Windows 2008 server to Reporting Services 2012 with Always On on Windows 2012 server. I have a report that expects a date in the querystring: "...&DateTo=17/09/2014" This use to work in the prev
-
How can I upgrade it to the latest version?
-
Problem deploying Duke's Bookstore JavaEE5 example
Hello everyone, I am having problems deploying the Duke's Bookstore example. I am trying to follow the tutorial. I have already updated the information concerning AS_ADMIN_PASSWORD on the file "build.properties". It took me some times... by the way i