Backupeventlog not working for remote system in PowerShell

I have the following code snippet that works if I specify localhost or the name of the local computer, but does not work if set to a remote server. I am running the script as Administrator using my Domain Admin account. Both local and remote systems
are Windows Server 2012 and in the same domain. PowerShell version = 3.0.
Param(
[parameter(Mandatory=$true,ValueFromPipeline=$true)]
[ValidateScript({Test-Connection $_ })]
[String]
$Server,
[parameter(Mandatory=$true,ValueFromPipeline=$true)]
[String]
$LogFileName,
[parameter(Mandatory=$true,ValueFromPipeline=$true)]
[ValidateScript({Test-Path $_ -PathType 'Container'})]
[String]
$OutputFolder
$EventLog = Get-WmiObject win32_nteventlogfile -ComputerName $Server -Filter "LogFileName = '$LogFileName'" -ErrorAction SilentlyContinue -ErrorVariable $ResultError
If ($ResultError)
Write-Host "ERROR: unable to event logs from $Server."
} Else {
Write-Host "Backing $Server."
$EventLog.backupeventlog("$OutputFolder\$Server.evtx")

After spending some more time troubleshooting this and doing some more research I found the link below. I found it strange the hoops the author went through to handle event logs on remote systems until I realized that the path for "backupeventlog"
is relative to the remote system, not the system running the script. So I checked the other systems and found that the event log backups had been created. This would explain the returnvalue of 80. What's worse is that the path for "backupeventlog"
can't be a UNC -- I tried, it didn't work.
Back Up Your Event Logs with a Windows PowerShell Script
https://technet.microsoft.com/en-ca/magazine/2009.07.heyscriptingguy.aspx
I decided to re-read Microsoft's documentation and found the magical text that I had over-looked:
BackupEventlog method of the Win32_NTEventlogFile class
https://msdn.microsoft.com/en-us/library/aa384808(v=vs.85).aspx
In addition, you must make backups to the local computer; you cannot save a backup of the event logs on Computer A to Computer B. Backups are implemented by using the LocalSystem account, which does not have the network credentials necessary to access remote
computers. If you want to save backups to a central repository, modify the script to first perform the backup, and then move the backup file to the central repository.
jrv:
I would mark your post of Wednesday, March 04, 2015 9:45 PM as helpful if this option were available. Your comment got me to dig into this deeper and discover
the root cause.
Thanks.

Similar Messages

  • SWN_CREATE_SHORTCUT not working for Unicoded system

    The FM "SWN_CREATE_SHORTCUT" is working fine for a non-unicoded system. While for an unicoded system the shortcut created is not working. Is there any parameter i need to set for an unicoded system or do we have to use another FM for it..?
    *"Create shortcut for transaction ZMSABSR02_NEW.
      CALL FUNCTION 'SWN_CREATE_SHORTCUT'
        EXPORTING
          I_TRANSACTION               = c_tran
          I_SYSID                     = SY-SYSID
          I_CLIENT                    = SY-MANDT
          I_USER                      = SY-UNAME
          I_LANGUAGE                  = SY-LANGU
          I_WINDOWSIZE                = c_window
          I_TITLE                     = c_title2
        IMPORTING
          SHORTCUT_STRING             = w_string
        EXCEPTIONS
          INCONSISTENT_PARAMETERS     = 1
          OTHERS                      = 2.

    Hello,
    I had the same problem today.
    I'm in a unicode system, the "SO_NEW_DOCUMENT_ATT_SEND_API1" FM creates a unicode shortcut that doesn't work fine.
    Solution : Add the following lines to your code:
    DATA: wlt_object_header TYPE TABLE OF solisti1,
          wls_object_header TYPE solisti1.
    REFRESH wlt_object_header.
    CLEAR wls_object_header.
    wls_object_header = '&SO_FORMAT=ASC'.
    APPEND wls_object_header TO wlt_object_header.
    And add the internal table wlt_object_header to the TABLES parameters object_header of the "SO_NEW_DOCUMENT_ATT_SEND_API1" FM call :
      TABLES
        object_header              = wlt_object_header
    Now, the shortcut is non-unicode and works fine.
    For information, my saplogin.ini gives : "DEFAULT_NON_UNICODE".
    Best regards,
    -Olivier-

  • WHENEVER SQLERROR does not work for remote db?

    Hi,
    I've encountered a problem that an error on a remote db (called via db link) does not force SQL*PLUS to exit and report the error.
    Local machine: Sun Solaris
    Local db: 8.1.7.2
    Remote machine: Windows NT, 2000 or XP (I don't know).
    Remote db: 9.2.0.5
    Call to SQL*PLUS: sqlplus /NOLOG @$BASE_DIR/tools/bin/xxx.sql
    Relevant piece of code in xxx.sql:
    connect cemis/cemis@loc9280
    whenever sqlerror exit SQL.SQLCODE
    set heading off
    set trimspool on
    SET PAGES 0
    SET LINESI 250
    SET ECHO OFF
    SET VERIFY OFF
    set termout off
    set feedb off
    set recsep off
    rem *** Do the work ***
    whenever sqlerror exit SQL.SQLCODE
    rem Get rid of old data
    TRUNCATE TABLE local_table;
    rem fill table via db-link
    INSERT INTO local_table
    col1,
    col2
    SELECT
    rem_col1,
    rem_col2
    FROM rem_user.rem_table@dbl_name
    COMMIT;
    spool file.csv
    SELECT 'Spalte1' || chr(9) || 'Spalte2'
    FROM dual;
    SELECT col1, col2 FROM local_table;
    spool off
    exit 0
    In our environment the script runs through without any error. After execution the file.csv is not there. No errors in the log file.
    I tried to select data from the remote db manually and ran into this:
    'ORA-01017: invalid username/password; logon denied' followed by
    'ORA-02063: preceding line from dbl_name'.
    Do you have any idea why this error does not cause sql*plus to exit?
    Does the WHENEVER... only work properly with local errors?
    I would be grateful for any information regarding this.
    Regards,
    Guido

    I believe this is a limitation in SP3, but tell me, are you running with a simple producer or a complex producer?

  • Torque control is not working for my system using analog feedback

    In the test bed, we are testing a brushless DC motor and a load motor generates torque to the test motor. The test motor is running with torque control scheme. They were connected together and I measured the torque signal to feedback the signal and control it. However, I just realized it only control when the torque was static. If I commanded a certain torque value (in this case, counts command), it kept generating that value. However, it did not generate the same torque in different position. I heard NI motion controller could develop torque values by mapping the torque signal with encoder signal. If it's true, the torque generation based on analog feedback, also, needs constraint by rotor position, right? W
    hen I turned on the load machine with constant speed (50 RPM), the torque from the test motor did not provide the constant torque that I commanded. It generated the fluctuated torque values. This means the max torque was generated at one point and decreasing by rotating the shaft and increasing the torque. Keep going in this way. Could you please tell me if this is the correct response when we are using analog torque feedback?
    Thank you.

    Try the following:
    1.-Set your test motor to encoder feedback instead of analog feedback.
    2.-Load a velocity move on the axis for the test motor.
    3.-Set the following error limit on you axis to 0 (disable following error).
    4.-Use the load torque limit function to limit the amount of torque the 73xx PID loop will generate,this value is in volts, so you will need to do a correlation between the voltage output from the controller and the torque reported by your torque cell.
    5.- Start the load motor.
    6.-Engage the cluch.
    7.-Start the velocity move on the test motor, you will see the torque ramp up to the torque limit.
    8.-Call the load torque limit function on the fly to vary the torque setpoint to where you want it.

  • Link does not work for-End-of-Sale and End-of-Life Announcement for the Cisco Secure Access Control System 5.4

    Link does not work for
    End-of-Sale and End-of-Life Announcement for the Cisco Secure Access Control System 5.4
    How do we get Cisco to fix?
    see attachment

    Give it a couple of days - it looks like they just sent out the notification before the notice was published on the public page.
    Once the ACS 5.4 EoS/EoL notice is published you should see it linked from this page.

  • I started the OS system from a backup hard drive. Now My Adobe products doesnt work. "the licensing does not work for this product" Error code 150:30. Help me please!!

    I started the OS system from a backup hard drive. Now My Adobe products doesnt work. "the licensing does not work for this product" Error code 150:30. Help me please!!

    Reinstall the software properly. migration/ backups do not work due to the specific requirements of the activation system.
    Mylenium

  • Wake on Demand: Not working for some services, others OK

    I haven't been able to figure this problem out... Wake on Demand for a previous generation Mac mini running Snow Leopard 10.6.8 works for things like a CrashPlan automated backup but does not work for things like remote SSH login or Screen Sharing. In all cases, the services are being originated on a latest generation iMac running Mac OS X Lion (10.7.2).
    While it's not an earth-shattering event to get off my backside and walk over to the Mac mini across the house to press its Shift key to waken the thing, it gets rather old to have to keep doing so, especially since CrashPlan automated backups are taking place while the Mac mini is otherwise asleep (the sleep indicator is slowly pulsing).
    I've been through the Apple tech notes regarding Wake on Demand for Snow Leopard 10.6 and have ensured that AirPort and its network are at the top-most position in their respective lists. Other than that, I'm not sure what else I can do. Wake on Network is enabled in the Snow Leopard Mac mini's network System Preferences and there doesn't seem to be any on/off option in the AirPort Extreme base station (just recently updated to 7.6 firmware).
    Any thoughts... hints... suggestions?
    One final note: this Mac mini is new as of July 2011; just days before the latest generation of Mac mini came out. It came pre-installed with Snow Leopard and, as soon as the users of this mini find software replacements for the old PPC style applicaitons they're used to using, will be upgraded to Lion. However, I feel a bit unsettled in making the move to Lion if I can't get a Snow Leopard feature to work properly. There's no telling if the Lion upgrade will actually fix this behavior or make it worse.
    Thanks in advance.

    I don't think you can wake on network with a closed lid. Try keeping the lid open and putting the machine to sleep. Does it work?

  • Key genaration for remote system

    Hi,
    I want to genarate number ranges for remote system like
    a100 to z999.
    But in Console its allowing me to enter only numaric values only.
    could you please suggest me to achive this functionality.
    Thanks in Advance.
    Kiran.G

    Hi Kiran,
    I want to genarate number ranges for remote system like
    a100 to z999.
    But in Console its allowing me to enter only numaric values only.
    could you please suggest me to achive this functionality.
    If in Console, you are not able to put in Alpha numeric Numbers, then I can suggest you a workaround.
    If you want to get the range a100 to z999,
    then only take the numeric part in the range.
    Try using an Assigment in the Data Manager. And Concatenate the Alplanumeric part to the numeric part.
    I am not sure, whether it will work. But still try out.
    Hope it helps.
    Thanks and Regards
    Nitin jain

  • Out of office replies in Exchange 2013 not working for external recipients

    Hi,
    Few days ago a couple of company workers went to vacation. They set up OOF automatic replies in OWA 2013. However automatic replies are not working for external recipients (outside of company). Internal users (company users) receive OOF notification.
    I'm using smart host in sender connector configuration (SMTP server of internet provider) to deliver emails. Any clues about this problem ? Please find below part of the transaction log. For testing purposes i set up administrator account
    to be on vacation.
    HARED... SMTP    
    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    RECEIVE  SMTP    
    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    DROP     ROUTING 
    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    AGENT... AGENT    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    HARED... SMTP    
    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    RECEIVE  SMTP    
    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    AGENT... AGENT    [email protected]           
    {[email protected]}             Automatic reply: vacation test
    TRANSFER ROUTING  [email protected]           
    {[email protected]}             Automatic reply: vacation test
    FAIL     SMTP    
    [email protected]           
    {[email protected]}             Automatic reply: vacation test

    Hi Informus,
    Please check if it is allowed in AllowedOOFType of the Remote Domain *
    In Exchange 2013, the only way to see or change the current configuration for automatic replying and forwarding to the Internet is via the Exchange Management Shell (EMS) with PowerShell commands.
    To get the currently configured Remote Domains, use:
    Get-RemoteDomain
    Name                           DomainName                                  
    AllowedOOFType
    Default                        *                                           
    External
    Get-RemoteDomain Default | fl AllowedOOFType, AutoReplyEnabled, AutoForwardEnabled
    AllowedOOFType     : External
    AutoReplyEnabled   : False
    AutoForwardEnabled : False
    To change the settings, use the Set-RemoteDomain command.
    Enable automatic replies
    Set-RemoteDomain -AutoReplyEnabled $true
    Enable automatic forwards
    Set-RemoteDomain –AutoForwardEnabled $true
    Enable OOF for Outlook 2003 and previous (for Exchange 2007 and 2010 support)
    Set-RemoteDomain –AllowedOOFType $ExternalLegacy
    To change all these properties at once, you can use:
    Set-RemoteDomain Default -AutoReplyEnabled $true –AutoForwardEnabled $true –AllowedOOFType $ExternalLegacy
    Note:
    Valid settings for the AllowedOOFType property are:
    External
    This is the default and only allows for the new style OOF messages as introduced in Outlook 2007.
    ExternalLegacy
    This settings allows for both the new style and old style OOF messages and needs to be set if you want to enable external OOF support for Outlook 2003 as well.
    None
    This setting doesn’t allow for the use of OOF messages at all (both internal and external).
    InternalLegacy
    This setting only allows for internal OOF messages to be sent for all Outlook versions.
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Mail not working for local users

    I have sunOS 5.9 running on sun sparc
    mail is not working on this system even for local users.
    I have tried from the command prompt
    mail username
    Test email
    ^D
    nothing happens after control D, I don't get command prompt.
    I also tried
    mail username
    Test email
    nothing happens
    sendmail daemon is not running on this system but my understanding is that sendmail is not required. I need mail to work only for local users to receive emails for failed cron jobs etc, it is not required for this system to send or receive emails to/from outside world.
    Can someone guide or point in right direction to fix mail functionlality for local users?

    Actually, with recent versions of sendmail, you do need sendmail running to be able to send mail.
    You never used to, but since they made sendmail no longer setuid root, you do.
    Sendmail has essentially been split into 2 daemons a local queue runner with handles sending sent by local users.
    And a listener daemon with listens for remote connections.
    If you want to be able to send mails but not have sendmail listening, you have a couple of options.
    You can either run only the local queue runner and not run the listener. In this case you have to configure the local queue runner to send mails onto a external mail host for processing. This requires editing /etc/mail/submit.cf
    Alternately, you need to configure the local listener to only bind to the localhost port so it can't be contacted from external sources.
    This requires editing sendmail.mc and regenerating a new sendmail.cf
    I tend to favour the latter option as the former limits your ability to do things like local aliases of root: [email protected] to send all your root mail to a central account.
    This is the sendmail.mc you will need
    divert(0)dnl
    VERSIONID(`@(#)main.mc 1.5 (Sun) 08/10/00')
    OSTYPE(`solaris8')dnl
    DOMAIN(`solaris-generic')dnl
    DAEMON_OPTIONS(``Port=smtp, Addr=127.0.0.1, Name=MTA'')dnl
    FEATURE(`no_default_msa')dnl
    MAILER(`local')dnl
    MAILER(`smtp')dnl

  • HT5649 Version 11.1.4 Does Not Work on my system

    I had itunes version 11.1.3.8 and it was working just fine. I believe this version is the 32 bit version.
    itunes sent me version 11.1.4 which is a 64 bit version and it DOES NOT work on my system.
    Some how this important file was deleted. And I keep getting this message.
    The following is the message I get everytime I turn on my computer
    I can close it and my computer works fine except for itunes. I can not get into Itunes at all.
    MSVCR80.dll is missing. Itunes was not installed correctly please reinstall itunes.
    ERROR 7 windows error 126
    How do I remove version 11.1.4 completely and Reinstall version 11.1.3.8
    And do I remove everything to do with APPLE and reinstall.
    I have tried numerous times to uninstall Version 11.1.4 and it is removed but when I
    reinstall it is always Version 11.1.4 I would like Version 11.1.3.8
    Please advise Jeff Beez

    Hello there, Jeff.
    The following Knowledge Base article offers up the instructions on how to resolve the very issue you're describing:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/ts5376
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Outlook autodiscover is not working for some users in coexistence

    Hi
    We are doing exchnage 2013/2010 coexistence
    Most everything is ok BUT outlook autodiscover is not working for some exchange 2010 users now that 2013 is in the front!!!.  We end up creating the profiles manually.  It has affected some but not all the users.
    I followed the instructions here but it didn't help.
    http://blogs.technet.com/b/tips_from_the_inside/archive/2012/01/11/autodiscover-fails-for-one-or-more-users.aspx
    Using outlook 2010, 2013, patches, .... didn't make a difference
    Would you please help?
    Thank you

    Hi 
    If it is affecting only few handful of users i could suspect a mailbox corruption and would recommend to move mailbox and see the results.
    Also you can try below
    You need to set the values MaxFieldLength, MaxRequestBytes & MaxTokenSize to below on Exchange 2010 CAS servers as well as Exchange 2013 CAS servers
    Path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
    Name: MaxFieldLength
    Type: DWORD
    Value: 65534
    Path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
    Name: MaxRequestBytes
    Type: DWORD
    Value: 16777216
    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters
    Name: MaxTokenSize
    Type: REG_DWORD
    Value: 48000 
    Just reboot the servers once its done and you will be good to go.
     References
    https://social.technet.microsoft.com/Forums/en-US/cc2929ac-4d36-4e84-a567-ce9b3bec1398/http-400-bad-request-on-iis-8-exchange-2013-cu2-on-windows-server-2012-autodiscovery-is-not?forum=exchangesvrgeneral
    http://blogs.technet.com/b/kristinw/archive/2013/03/28/recommended-changes-and-enhancements-to-support-exchange-in-an-enterprise-environment-whew.aspx
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • Software Update Point Switching is not working for some Clients

    Hi there,
    I found nothing similar here and I hope this is the right section.
    I´m running ConfigMgr 2012 R2 where one of the Site Systems from one of the Primaries is located in an untrusted Forest in a perimeter Network. The Site System there has the MP, SUP and DB Roles. In general it works great. The Systems in that untrusted Forest
    get the SCCM Agent pushed, see and can install published Software packages and receive Windows Updates. But there are a few systems where everything works, except Windows Updates.
    So I had a deeper look at what is happening and found out that the SUP switching is not working for them. They always try to contact the SUP from the Primary, which they cannot reach (this is intended).
    From how I understand SUP switching as described here
    http://blogs.technet.com/b/configmgrteam/archive/2013/03/27/software-update-points-in-cm2012sp1.aspx#pi140062=1
    the Windows Update Agent tries to connect to a SUP every 30 minutes and after 4 failed attempts he will try to connect to the next one until he finds one which works.
    As I said before, this seems to work for most systems in the untrusted forest, but some do not make any intentions to switch the SUP.
    So my next step was to find out from where the Update Agent can get the information of the available SUPs. I think they either don´t receive the information that other SUPs exist, or if the Information is there, they don´t realize that there´s an error and
    make no attempt to switch.
    I used the System Center Support Center to gather all Information from some of the systems with that problems (Log Files, WMI information, registry information, policies etc.) but I cannot find where SCCM or the Update Agent store the information which SUPs
    are available in my environment.
    I´m sure the problem is on the Systems which fail to connect to the right SUP and not in the SCCM infrastructure itself, because for most of the systems everything is working just perfect. Unfortunately in the Blog Post above there´s also no information
    where this information is stored and how it is obtained by the clients. In the comments there´s even one post which describes the same problem I have here, but there was no answer. I hope someone can point me into the right direction, because I´m stuck currently.
    Things I tried additionally to all the log file / WMI / registry sniffing:
    Removing the Software Distribution Folder and restarting the Windows Update Agent
    Removing the WindowsUpdate Registry folder in the HKLM\SOFTWARE\Policies\Windows section in the Registry and restarting the Windows Update Agent.
    Tried to reset the WUAgent with wuauclt /Resetauthorization additionally to the steps above.
    I also tried to manually set the WUServer and WUStatusServer Keys in the registry to the new Server, but as soon as the next Update Scan cycle runs, the value is set back to the URL of the Primary Sites SUP
    Is someone having additional ideas? It seems to me older systems are more affected (which were configured for a standard WSUS before SCCM 2012 was deployed) than newer ones which were installed when SCCM was in place already. But I don´t know what else to
    "reset" on those machines without reinstalling them.

    Thank you very much for your response. I must have missed that one by looking through numerous Logfiles. In this, there´s indeed a list of all available SUPs. So according to the LocationServices.log the machine should have a choice.
    The WMI Key however, contains just one entry and this is the URL of the Primaries SUP which is not reachable in the untrusted forest. Is it OK that the WMI entry includes only one entry? If yes, what process is putting the results from the LocationServices
    into WMI? It seems like the Windows Update Agent is feeded from the WMI Key then. If this is the case my problems seems to be the "communication path" between these two components.
    Is this the job from the SCCM Agent, the Windows Update Agent or maybe some third component I´m not aware of? I wonder how I can fix this.

  • Sharepoint web application is not working on client system

    my sharepoint we application is working on premises but it is not working on local system 

    I assume you mean its working on the server, but not on your client.  If so, make sure that you have registered the URL for the web application in your Domain Name Server (DNS).  If you can't resolve the name you won't be able to reach the web
    application.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Auto_lexer (stemming) not working for other languages(other than english)

    Hi All,
    We are planning to use AUTO_LEXER instead of MULTI_LEXER and observed that stemming is not working for German where as it is working for English when I use AUTO_LEXER. I even used query templates but of no use.
    But when i use MULTI_LEXER, creating sub lexers for German and Enlgish, Stemming is working for German also after changing the session language and setting stemmer of wod list to German (Which is expected).
    Following is the code for AUTO_LEXER creation:
    CREATE TABLE test_auto_lexer(pkey NUMBER(5,0),
    lang_index VARCHAR2(3),
    content_text CLOB,
    CONSTRAINT test_auto_lexer_pk primary key (pkey))
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (1,'eng','I drive a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (2,'eng','I drove a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (3,'eng','I have driven a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (4,'eng','Just check for other things')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (5,'eng','always drive a car')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (6,'eng','it is nothing')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (7,'ger','Ich fahre ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (8,'ger','Ich fuhr ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (9,'ger','Ich habe ein Fahrrad gefahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (10,'ger','Aktivieren Sie einfach für andere Dinge')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (11,'ger','immer Auto fahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (12,'ger','es ist nichts')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (13,'ger','sprechen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (14,'ger','sprach')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (15,'ger','gesprochen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (16,'ger','tale')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (17,'ger','Indlæg')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (18,'ger','tales')
    BEGIN
    ctx_ddl.create_preference('auto_lexer1', 'auto_lexer');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','index_stems','yes');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','language','danish english german');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','alternate_spelling','german');
    END;
    CREATE INDEX test_auto_lexer_ix1
    ON test_auto_lexer(content_text)
    INDEXTYPE IS ctxsys.context
    PARAMETERS ('datastore ctxsys.direct_datastore filter ctxsys.null_filter lexer auto_lexer1')
    select to_char(content_Text) from test_auto_lexer where contains(content_text,
    '<query>
    <textquery lang="ger" grammar="context">
    $fahren
    </textquery>
    <score datatype="integer"/>
    </query>') > 0
    this doesnt work even after changing the session language. My default Sesson language is AMERICAN.
    Could any one help me with this, in case I am missing something here. I would be really thankful.
    Edited by: Nagendra Prasad on Jan 23, 2010 12:05 AM

    In the future, please begin a new thread for a new question and provide a link to a related question.
    According to the online documentation, Oracle only supports stemming for English, Dutch, French, German, Italian, Spanish, and Japanese. Oracle does not support Russian stemming, although you may have gotten some accidental results, due to identifying it as a different language and applying stemming rules for that language. The following manual sections show the languages available for the index_stems attribute of the basic_lexer and stemmer attribute of the basic_wordlist:
    Basic_lexer attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#CIHHBAAD
    Basic_wordlist attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#g1019326
    Also, please see the following note:
    Features not available in 11.2.0.3:
    http://docs.oracle.com/cd/E11882_01/readmes.112/e22488/toc.htm#BABDGGDB
    "Certain Oracle Text functionality based on third-party technologies, including AUTO_LEXER and CTX_ENTITY, have been disabled in this release (reference Bug 12618046). For BASIC_LEXER, the usage of the INDEX_STEMS attribute values that depend on third-party technologies, is also affected. If this impacts an existing application, contact Oracle Support Services for guidance."
    Also, the auto_lexer has been replaced by the world_lexer, which only has one attribute:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#BHCJEGFJ
    I don't work for Oracle, so I don't know why they do things the way they do.
    So, you need to stick with the basic_wordlist for stemming, not the lexers. However, you may get better performance by combining the multi_lexer with the basic_wordlist, as the multi_lexer eliminates time spent on automatic language detection. But, you need to remember not to use the index_stems with your lexer, since it will conflict with the wordlist. I am not experiencing any time problems as you have. Please see the demo below. I have provided the whole script below that, so that you can reproduce it on your system. If you still have problems, then it may be due to differences in versions.
    -- demo:
    SCOTT@orcl_11gR2> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl_11gR2> select value from v$nls_parameters
      2  where  parameter = 'NLS_CHARACTERSET'
      3  /
    VALUE
    AL32UTF8
    1 row selected.
    SCOTT@orcl_11gR2> DROP TABLE news
      2  /
    Table dropped.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> CREATE TABLE news
      2    (pkey            NUMBER,
      3       lang            VARCHAR2 (2),
      4       short_content  CLOB)
      5  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO news (pkey, lang, short_content)
      3    VALUES  (1, 'en', 'I drive a bike.')
      4  INTO news (pkey, lang, short_content)
      5    VALUES  (2, 'en', 'I drove a bike.')
      6  INTO news (pkey, lang, short_content)
      7    VALUES  (3, 'en', 'I have driven a bike.')
      8  INTO news (pkey, lang, short_content)
      9    VALUES  (4, 'en', 'I always drive a car')
    10  INTO news (pkey, lang, short_content)
    11    VALUES  (5, 'en', 'This is nothing')
    12  INTO news (pkey, lang, short_content)
    13    VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    14  INTO news (pkey, lang, short_content)
    15    VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    16  INTO news (pkey, lang, short_content)
    17    VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    18  INTO news (pkey, lang, short_content)
    19    VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    20  INTO news (pkey, lang, short_content)
    21    VALUES  (10, 'de', 'Es ist nichts.')
    22  SELECT * FROM DUAL
    23  /
    10 rows created.
    SCOTT@orcl_11gR2> BEGIN
      2    -- word list:
      3    ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      4    ctx_ddl.set_attribute      ('my_wordlist',   'stemmer',           'auto');
      5    -- english lexer:
      6    ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      7    -- german lexer:
      8    ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      9    ctx_ddl.set_attribute      ('german_lexer',  'composite',       'german');
    10    ctx_ddl.set_attribute      ('german_lexer',  'alternate_spelling', 'german');
    11    ctx_ddl.set_attribute      ('german_lexer',  'mixed_case',       'no');
    12    ctx_ddl.set_attribute      ('german_lexer',  'base_letter',       'yes');
    13    -- multi_lexer:
    14    ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
    15    ctx_ddl.add_sub_lexer      ('global_lexer',  'default',            'english_lexer');
    16    ctx_ddl.add_sub_lexer      ('global_lexer',  'german',            'german_lexer');
    17  END;
    18  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index search_news
      2  on news (short_content)
      3  indextype is ctxsys.context
      4  parameters
      5    ('lexer            global_lexer
      6        language column  lang
      7        wordlist       my_wordlist')
      8  /
    Index created.
    SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> COLUMN short_content FORMAT A30
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
      2  /
    Session altered.
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drive') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drove') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
      2  /
    Session altered.
    Elapsed: 00:00:00.01
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fahr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.07
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fuhr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.16-- script for you to reproduce the demo on your system:
    select * from v$version
    select value from v$nls_parameters
    where  parameter = 'NLS_CHARACTERSET'
    DROP TABLE news
    EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    CREATE TABLE news
      (pkey           NUMBER,
       lang           VARCHAR2 (2),
       short_content  CLOB)
    INSERT ALL
    INTO news (pkey, lang, short_content)
      VALUES  (1, 'en', 'I drive a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (2, 'en', 'I drove a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (3, 'en', 'I have driven a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (4, 'en', 'I always drive a car')
    INTO news (pkey, lang, short_content)
      VALUES  (5, 'en', 'This is nothing')
    INTO news (pkey, lang, short_content)
      VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (10, 'de', 'Es ist nichts.')
    SELECT * FROM DUAL
    BEGIN
      -- word list:
      ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      ctx_ddl.set_attribute     ('my_wordlist',   'stemmer',            'auto');
      -- english lexer:
      ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      -- german lexer:
      ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      ctx_ddl.set_attribute     ('german_lexer',  'composite',          'german');
      ctx_ddl.set_attribute     ('german_lexer',  'alternate_spelling', 'german');
      ctx_ddl.set_attribute     ('german_lexer',  'mixed_case',          'no');
      ctx_ddl.set_attribute     ('german_lexer',  'base_letter',         'yes');
      -- multi_lexer:
      ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'default',             'english_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'german',              'german_lexer');
    END;
    create index search_news
    on news (short_content)
    indextype is ctxsys.context
    parameters
      ('lexer            global_lexer
        language column  lang
        wordlist         my_wordlist')
    EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    COLUMN short_content FORMAT A30
    ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
    set timing on
    select * from news
    where  contains (short_content, '$drive') > 0
    select * from news
    where  contains (short_content, '$drove') > 0
    ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
    select * from news
    where  contains (short_content, '$fahr') > 0
    select * from news
    where  contains (short_content, '$fuhr') > 0
    /

Maybe you are looking for

  • Itunes 11.1 crashes on Windows 7 when using the new radio

    Sometimes it will take 30 minutes or more.  Once it happens itunes player CANNOT be used unless you reboot.  I believe the new radio maybe be using a port that Microsoft Lync uses.  I have tried killing the process, but iTunes will not come back.

  • Itunes will not display my existing photos and I cannot rebuild them either

    Hey IPhoto will not display my photos aand will not let me rebuild them from any existing library or back up file?

  • Query Output problem

    Dear All, We have a query developed in BI 7.0 version. Today when i excuted the query I couldn't able to see to output for any selections. The same query fetches result when I exeute in RSRT transaction. The query is created on a infocube.  I have on

  • QuickTime ruined Flash *.swf in web and doesn't show most trailers

    Hello there, Guys I've big problem with QuickTime 7.1.3 most of flash games in the web and flash ads.. totaly flash website Does not work at all with this last version of Quiktime also most of the movies trailers doesn't work take this e.g. http://ww

  • Why is it showing "go" button in the page of R12?

    Who encount the situation that sometimes page shows a "go" button behind some item which has fireAction in the EBS R12. how can I close the function. I think whether it is about profile? Thanks;