Discount to zero DB user with a script

Hi all

I'm doing a script to change the password of a user in DB.
I have this now:
cd /oracle/VIS/db/tech_st/11.1.0/
. ./VIS_linux4.env
sqlplus / as sysdba
alter user xxtestuser identified by xxtestuser;
exit
When I run the script that the user alter is not executed, it stops after you start sqlplus.

What should I change in my script?

Thank you.

You need a "here document".

CD /oracle/VIS/db/tech_st/11.1.0/
. ./VIS_linux4.env
sqlplus / as sysdba<>
change xxtestuser user identified by xxtestuser;
output
EXPRESSIONS OF FOLKLORE

Hard directories-code is error prone and subject to additional when maintenance you upgrad. You use better $ORACLE_HOME or $ORACLE_BASE

------------
Sybrand Bakker
Senior Oracle DBA

Tags: Database

Similar Questions

  • Assigned to the user of the script is not running

    Hello

    I have a problem with running scripts assigned to Quest Console (7.6). In resources/Scripts, I have 2 scripts (a VBS and other CMD). The scripts are located on a UNC resource that is accessible by all users. Script executed manually works perfectly. But not automatically runs in desktop computers running with Windows 7 SP1 VDI.

    Any ideas?

    Hi Carlos,

    I saw a similar problem before, in my case the script run perfectly when I run manually but not happen the result when running via a GPO.

    I did some research and learned that it could be caused by settings on the system UAC, you test the policy. With active UAC will be running all scripts that are run from a policy, but in a different security context of the user. When this OPTION is enabled, logon session/logoff scripts are executed by an administrative user, the office can load it later as the user.

    A suggestion to solve the problem was first to apply this registry setting:

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem\\\

    EnableLinkedConnections = (dword) 1

    Scripts Google UAC and logon and you will find more information and proposed solutions.

    I hope this helps

    David

  • Printer problem install with VB Script

    Hi all

    I hope you guys can help me with a problem I have. For a customer, we are trying to install printers via a script run when connecting. We got it working on 32-bit workstations, but I won't work on 64-bit workstations.

    We know that the problem is by removing the printer before connecting. With the script we have now it works only in 32 bits, but we need a solution that works on both. Or a script that checks the architecture of the en PC runs the script for 32 or 64 bit.

    The script:

    Option Explicit
    Dim FSO, strUserName, WSHNetwork, strUserDomain, ObjGroupDict, varenv, strVarUserName
    Dim objNetwork, strComputer, objWMIService, colInstalledPrinters, objPrinter, strLocal
    Dim strUNCPrinter1, strUNCPrinter2, strUNCPrinter3, strUNCPrinter4
    Dim strUNCPrinter5
    Sun printers
    Dim counter

    Set WSHNetwork = WScript.CreateObject ("WScript.Network")
    Set varenv = WScript.CreateObject ("WScript.Shell")
    Set FSO = CreateObject ("Scripting.FileSystemObject")
    strVarUserName = EnvVar.ExpandEnvironmentStrings("%username%") "

    "Wait for the user to connect

    strUserName = «»
    While strUserName = «»
    WScript.Sleep 100
    strUserName = WSHNetwork.UserName
    Wend
    strUserDomain = WSHNetwork.UserDomain

    Set ObjGroupDict = CreateMemberOfObject (strUserDomain, strUserName)

    'Create printers '.

    strUNCPrinter1 = "\\s-exch\P50 - A4 Dubbel (Kleur)"
    strUNCPrinter2 = "\\s-exch\P50 - A4 Dubbel (Z - W)"
    strUNCPrinter3 = "\\s-exch\P50 - A4 Enkel (Kleur)"
    strUNCPrinter4 = "\\s-exch\P50 - A4 I (Z - W)"
    strUNCPrinter5 = "\\s-exch\P50 - TCE - Briefpapier (Z - W)" "

    'Delete printers '.

    Set objNetwork = CreateObject
    objNetwork.RemoveWindowsPrinterConnection "\\s-exch\P50 - A4 Dubbel (Kleur)"
    objNetwork.RemoveWindowsPrinterConnection "\\s-exch\P50 - A4 Dubbel (Z - W)"
    objNetwork.RemoveWindowsPrinterConnection "\\s-exch\P50 - A4 Enkel (Kleur)"
    objNetwork.RemoveWindowsPrinterConnection "\\s-exch\P50 - A4 I (Z - W)"
    objNetwork.RemoveWindowsPrinterConnection "\\s-exch\P50 - TCE - Briefpapier (Z - W)" "

    ' Create printermappings based on groupmembership

    If MemberOf (ObjGroupDict, "P50" ") then
    Set objNetwork = CreateObject
    objNetwork.AddWindowsPrinterConnection strUNCPrinter1
    End If

    If MemberOf (ObjGroupDict, "P50" ") then
    Set objNetwork = CreateObject
    objNetwork.AddWindowsPrinterConnection strUNCPrinter2
    End If

    If MemberOf (ObjGroupDict, "P50" ") then
    Set objNetwork = CreateObject
    objNetwork.AddWindowsPrinterConnection strUNCPrinter3
    End If

    If MemberOf (ObjGroupDict, "P50" ") then
    Set objNetwork = CreateObject
    objNetwork.AddWindowsPrinterConnection strUNCPrinter4
    End If

    If MemberOf (ObjGroupDict, "P50" ") then
    Set objNetwork = CreateObject
    objNetwork.AddWindowsPrinterConnection strUNCPrinter5
    End If

    Function MemberOf (ObjDict, strKey)
    MemberOf = CBool (ObjGroupDict.Exists (strKey))
    End Function

    Function CreateMemberOfObject (strDomain, strUserName)
    Dim objUser, objGroup
    Set CreateMemberOfObject = CreateObject ("Scripting.Dictionary")
    CreateMemberOfObject.CompareMode = vbTextCompare in
    Set objUser = GetObject ("WinNT: / /" & strDomain & "/" & strUserName & ", user")
    For each objGroup in objUser.Groups
    CreateMemberOfObject.Add objGroup.Name, «»
    Next
    Set objUser = Nothing
    End Function

    Hello Miesjel,

    Welcome to the Microsoft Community Forum.

    The question you posted would be better suited to the Technet community. Please visit the link below to find a community that will provide the support you want.

    Microsoft TechNet
    http://social.technet.Microsoft.com/forums/scriptcenter/en-us/home?category=scripting

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

    Happy new year!

    Thank you

  • Discoverer 11.1.1.7.0 against 12.1.3 with OAM 11.1.2 EBS to request the password for the user with Ondaaah

    Hello

    Oracle has not been able to help me to do this job; 2 open of SR for weeks and no good answer.  They referred me to the people of onlinappsdba and various other public Internet sites.  We run EBS 12.1.3 and Disco 11.1.1.7.0 with 10g SSO and Ondaaah and SSL.  That works very well, users, identity is established through Ondaaah on our corporate network, with zero sign - on.  I'm replacing 10gSSO by OAM 11.1.2.  OAM/OID works very well for EBS and OBIEE, always zero sign - on with the OID 11.1.1.7.0 and AccessGate piece (and a webgate for both).  (Too many servers to SSO support in my view, if something goes wrong, too many places to look.)  For Disco, I created the osso.conf in OAM 11.1.2 installed in a folder on the Disco and bounced of Disco.  This works OK if in OAM authentication method is based authentication forms, with OAM inviting the user to signon, OID and then passes the user name and password through the OID in Active Directory, and connect on Disco invites to indicate the user name, and then gives access to workbooks.  No prompt for password clubbing.  But when I try to activate Ondaaah as an authentication method in the OAM, discoverer invite first the "Oracle Applications" connection for a user name and the EUL.  But Disco then prompts the user a password, that no longer exists in fnd_user. because authentication is external.  Connections fail.  I am also unable to create a private connection; This dialog box Disco also invites a user password.  At the login page of Disco, the user session went to OAM and fact authentication successful via Ondaaah.  I can tell from follow-up to the session through Fiddler.  Transmitted to the disco but Disco missing something and password prompts.  Support OAM at Oracle seems to think that OAM is not send the cookie to Discoverer, although I'm not sure.

    First of all, Ondaaah with Disco should work with OAM, right?  Any thoughts on what might be missing?  I went through the MOS notes a few times, closely followed the tutorial onlinappsdba on it.

    Thank you very much.

    Tom

    The hotfix is described in Note 1616228.1 problem with mod_osso and custom authentication plugins.  Disco can work very well, with zero sign - we and OAM.

  • User with multiple rights to the pool, opens a session automatically on a specific pool

    I have a user with 2 + benefits pool - when it connects to a zero client, it is automatically connected to a desktop computer in one of the pools (let's call it 'Pool-A'), rather than receive a selection of pool screen.  If it is deleted from the Active Directory the right to 'Pool-A' group, then it is presented with the selection of normal pool screen.  As soon as it is added to the Active Directory group, his account is automatically connection to a desktop 'Pool-a' again.  What would cause this?  Other users the right to several pools (including a ' pool-A') receive pool selection screen, as I know that it is only this account of a user who is almost like an account of "kiosk".

    Any ideas or things to check? I already checked the connection's server/pool tags...

    It seems that the user can check the automatic connection to the desktop of a Windows Client (maybe?)

    This is a good post on this subject. It may be interesting to check:

    PCoIP zero client does not display an Horizon view Client user of the window for one (and only one)

    See you soon,.

    JesusM

  • SQL Plus - guest user with: "do you want to continue?

    I am running a script, PL/SQL using SQL more. In the middle of the script, I would essentially like to have the following logic:

    Request to the user: "do you want to continue?
    IF the user types 'Y', continue with script (run update instructions)
    ELSE IF
    types user 'n' end script

    What is the best way to do it? Thank you!

    You cannot ask for PL/SQL code. The PL/SQL code runs in a process on the database server and can interface with the end front of the customer.
    You must use a front-end interface for this apart from any PL/SQL code. SQL * Plus offers a basic intervention, but you would be better using a good front-end such as Application Express, .NET, Java etc. or maybe even a Windows command/batch file.

  • Why is a user with the DBA privilege necessary side SQL Server to migrate?

    Greetings

    Project to migrate a SQL database to Oracle using SQL Developer.

    The docs say that a user with DBA privileges is required in the SQL Server database when you run the migration of the side Oracle.

    Why?

    Why a user with only READ access to SQL Server data would be necessary?

    Thank you very much!!

    -gary

    The DBA privilege at the source database is required because SQL Dev Migration is also collect information from SQL Server system tables, which a normal user is not always possible to query. It is mandatory that the migration is trying to build an Oracle schema which corresponds as much as possible the source database.
    But this requires having become DBA in the foreign database to avoid permission problems. If you SQL Server admin does not want the DBA privilege, you can also do a Migration offline - here the ADMINISTRATOR must run the generated scripts offline in-> Migration-> 3rd capture in the database offline party

  • 5.1.7 server on El Capitan: create a user with a personalized folder location

    I've recently upgraded to El Capitan on my server once an apple advisor told me that 5.1.7 server had a bunch of bug fixes for Open Directory(which I plan on using down the road). Given that the Working Group Manager is not compatible with 10.11...

    Is there a way to create a user with a personalized folder location? When I create a user on the server, I can choose to create a home folder, with or without limitation in the disc or make the service of the user only. My problem is that I have no way (that I know) in the window of creating user to change the location of this folder.

    I tried to create a model of a user with a basic 'tailor-made' folder location (Volume/promised Pegasus/Home 2016 / etc...) but when I create the user, the home folder is not in the specified path.

    The "work around" I found for this batch of user is to create in the default location then move them on my raid Promise Pegasus, change the path to the advanced option to the each user and reassign the appropriate permissions.

    It is not so much a problem if I would deal with users 10. But I have to manage/create about 130-150 users every 5-6 months.

    I guess that there is an easier way to create a user with a custom home folder location. It would make sense that apple removes the Workgroup Manager and does not replace its characteristics.

    Best case scenario is that I do evil and do not hesitate to let me know if this is the case!

    Thank you

    Francis

    I may be wrong, but it seems that Workgroup Manager version 10.8 works under El Capitan: I can certainly start the application and query users / groups that are there.  I guess maybe it's on the machine as a rest to be updated periodically since days Lion... but it also shows that if you can find a copy, you may be able to run on your machine.

    HTH

  • Yosemite: Why 'Shares and Permissions' displays 2 all users with different privileges?

    Some folders and files inside my user folder sharing and permissions like this:

    I can remove the user from "search...". "(a user who has been deleted and no longer exists) but I don't know what to do on both"all"users with different permissions. I can't delete the one with custom privileges. Help!

    Solved by Leroy Douglas. See What are these custom privileges?

  • lately and I don't know why I see a pop up of a problem with the script. can some1 help me?

    There is a pop up of a problem with the script. He asked end and contuniue the script. I didn't have this problem before. Please help me this is getting really annoying. He asks a lot

    I changed a theme and almost never have a problem again...

  • Functions defined by the user with several parameters

    I set features three following user using "Define."

    UF1 takes a single patameter;

    UF2 takes two parameters;

    and UFX takes two parameters - with the second is 'X' in the definition.

    Œuvres F1.  F2 is the EVAL of F1 version and it works too.  User functions only seem to work fine.

    F3, a function of two user settings, produces a graph of NaN.

    F4 is the EVAL of F3 version.  Note that 'B 'is not replaced by 1'.  Also produces a NaN chart.

    F5 produces a graph of NaN.

    F6 is EVAL of F5.  The 'X' is not replaced (even with the ' B' above), and even if it looks like 'X * X', it also produces a graph of NaN.

    Is it possible to get defined by the user, with several parameters, features work by tracing the curve?

    Hi!, Fortin:

    If you download and install the ultimate Firmware with the version of the software: 2015 6 17 (8151), with the number of Version: 1.1.2 - 11, you can trace your examples of definition of the function, with curves and values, without NaN.

  • Enable or disable the write lock filter remote with a script

    Hello

    Is it possible to enable or disable the filter of writing EWF remotely with a script?

    Sending a command in a batch or the vbs.

    Thank you.

    In addition to HPDM, you can use the ewfmgr command in a script.  For example, ewfmgr c:-disable or ewfmgr c:-activate.  You will need describe reboots as well.

  • You need permission to perform this action - field user with file rights. Please advice

    You need permission to perform this action - field user with file rights.

    I can't access folder on drive network even with domain administrator of error do 'you need permission to perform this action. "
    I would be very grateful if you could please advice, I can't change folder\files in this folder, even with admin rights.
    Thanks in advance
    Saad Ali

    Hello

    I suggest you post the same question in the Microsoft Technet forum for assistance. We have a team to help you with this guy's questions.

  • Cannot delete the account of a user with administrator rights

    I want to remove a user who has administrator rights account.  Win XP machine has two users (Administrator and a user name) that both are of type of administrator account.

    I you as an administrator and should be able to change the other named to Limited user account, but for Limited is greyed out.  The option to delete the named account is not present.

    How can I delete this account, leaving only administrator?

    Often, I find that using the command line commands gives errors better when you can not do something.  Try the following:

    o bring a window prompt (start-> Run-> "cmd")

    o enter the following command in the window:

    net localgroup administrators

    o that it must return a list of all users with administrator privileges.  You should see the built-in user 'Administrator' and your other user (assuming that both have administrator privileges).  To remove administrator privileges from the user (assuming that this another username is "Joe"), then enter the following command:

    net localgroup administrators Joe/remove

    If this is not possible, an error no doubt will provide you with enough information.

    HTH,

    JW

  • User with limited XP Home Edition privleges can not access an external hard drive

    I can't set up an external hard drive in Windows XP Home Edition so that a user who has 'Limited' privleges can access.  The user receives the access denied message.  I tried to configure this by starting in safe mode.  I shared the unit with everyone.  If I'm the administrator user then it can access the drive.  The troubling question is that this system has been configured with the user having limited privleges as well as access to the external drive in the past.  I recently removed Norton antivirus and replaced by MS Security Essentials and I'm so glad I did.  But now it's problem arose.  Any help would be greatly appreciated.

    You probably just need to change permissions for access of the disk and/or subfolders.  The following article describes how to do this:

    "How to set, view, change, or remove special permissions for files and folders in Windows XP"
      <>http://support.Microsoft.com/kb/308419 >

    The bad news is that this article was written for XP Pro and you have XP Home.  This means that the 'Security' tab, which is at the heart of the management of permissions is not present during the implementation of the properties of file or a folder on your computer. (Or y at - it an option to disable Simple file sharing).  The good news is that if you start your computer in safe mode (repeatedly tap the F8 key when your computer starts) and log on as a user with administrator privileges, you can then obtain access to the security"" tab.  Once you have access to this tab, you can give "Everyone" permission to all of the disk if you wish.  Once you set the permissions as you like them, you can restart your machine in Normal mode.

    HTH,
    JW

Maybe you are looking for