PostgreSQL settings - database

I want to turn the standard_conforming_strings off in postgresql.
I enter the command "set standard_conforming_strings=off;" and then check it with "show standard_conforming_strings;" and everything is ok. When I quit and then open the client again the setting is switched back to on.
How can I permanently turn it off ?

Settings in Postgresql can be made on three levels:
As you have already discovered, you can change individual settings on a session basis using set.
You can set parameters persistently on a per-user basis using the ALTER ROLE command. This can be set for a single database or for all databases in the server.
To change settings on a global basis, persistently for all users, you can edit postgresql.conf. Later versions of postgresql also allow changing global config via the ALTER SYSTEM command. In addition, global configuration overrides can be made by adding command line options when starting the server.
Not all parameters can be changed per session or per user.
Changes to postgresql.conf will not take effect until you reload the server (pg_ctl reload, or via appropriate system init command). Some parameters require a complete restart to take effect.
This manual page describes the different methods in more detail.

In postgresql.conf you set
standard_conforming_strings=off
and load new conf with
pg_ctl reload
as in docs: http://www.postgresql.org/docs/9.2/static/config-setting.html

Related

Local Security Policies, System Group Policy Objects, and Active Directory values not updating Secedit.exe Sec.cfg

I am attempting to monitor the status of SeRemoteShutdownPrivilege and SeEnableDelegationPrivilege to determine if they have been updated/changed. When doing so, this configuration file doesn't seem to update. Are there any other locations where a variable would affect "Force shutdown form a remote system" and "Enable computer and user accounts to be trusted for delegation". I have already looked through Microsoft Registry key documentation. Here's the link I referred to: https://www.microsoft.com/en-us/download/details.aspx?id=25250 I have looked into using Get-GPRegistryValue, Get-GPOReport, and Get-GPO. The way I generated Sec.cfg was using "Secedit /export /cfg sec.cfg /log NUL".
Thank you for any help that you can provide.
• For the ‘Force Shutdown from a Remote System’ setting to apply effectively on a client system, kindly check whether the below group policy regarding this setting has been applied or not by executing the command ‘gpresult /h gpreport.html’ on the elevated command prompt on the client system. In the report, please check whether the above said group policy setting has been applied successfully or not.
Group policy setting: -
On the Group Policy Server, check the below group policy setting by checking the ‘Default domain policy’ or that policy which controls the below setting: -
Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment/Force shutdown from a remote system
To forcefully apply the domain group policy settings on the client system, execute the command ‘gpupdate /force’ on an elevated command prompt and restart the client system. Then check the client’s group policy report once again to check whether the setting has been applied or not.
• Also, I would suggest you to please make the above said modifications on a baseline client system through local group policy editor and export the settings in an ‘.inf’ template for installation via powershell script. Check for the below settings information in the ‘.inf’ file and then execute the below command by modifying the values for ‘.inf’ file and ‘.db’ file as appropriate: -
[Privilege Rights]
SeDenyServiceLogonRight = *S-1-1-0,*S-1-5-19, Administrators
secedit.exe /configure /cfg C:\customsettings.inf /db C:\WINDOWS\security\Database\customsettings.db /quiet
By doing the above, your issue should get resolved.

Logging in admin UI does not entries after changing settings

I am trying to debug a datimport and changed inside solr 7.7.1 admin UI the loglevel of dataimport from ERROR to ALL. This does not have any effect, furthermore the setting will go back to the original settings after restarting and reindexing.
How can I enable logging for dataimport INFO?
Any changes made in the web UI for logging are temporary changes and can't be persisted:
You can control the amount of logging output in Solr by using the Admin Web interface. Select the LOGGING link. Note that this page only lets you change settings in the running system and is not saved for the next run.
The easiest way to change the logging level might be to change it when starting Solr, either through the SOLR_LOG_LEVEL environment variable, or through the -v parameter to bin/solr:
bin/solr start -f -v
This will start Solr with the DEBUG log level by default.
More detailed, permanent logging configuration is done through the standard Log4j2 syntax, which can be configured in server/resources/log4j2.xml.

Change and Save Application-scope Settings for next application session In WPF

I'm using both user-scope and application-scope Settings in WPF.
My application usually connects to DB in localhost for developing, but occasionally I need to connect to remote DB server which final application should connect to.
DB Address settings are stored in application-scope Settings.
Application-level Settings cannot be changed during runtime, so I have to open and edit my .config files with Notepad every time whenever I need to before I start the application.
I want to update application-scope Settings in My application at runtime. But need not be applied for the current session, It is okay for the next(and after) application session.
Is there any easy solution to this? If not exist, is it ok to parse and write the .config file directly in my application?
You can have XML or JSON file as settings. Try to read the settings and display it in a window and save the contents again in JSON/XML files.
By the way you can achieve the Application settings read and edit during run time.

How to create web service using Database adapter in OSB Console?

I have a requirement to use OSB with DB Adapter as for given task, I believe BPEL Process will not be better performer than OSB. I have gone through some sites but all of them are demonstrating OEPE not OSB Console. Any response will be appreciated.
I have similar requirement in my project and I was wondering here and there. Here is final solution of the problem. I documented for you guys.
Steps in JDeveloper
1. Create DB Connection in JDeveloper.
2. Create a Generic Project.
3. Create Project as SOA project and use Empty Composite.
Steps to create DB Adaptor
Go to Composite Palette and choose AD Adaptor.
Drag and drop the DB Adaptor in the External Reference section (right side of Composite view).
It will open a wizard for selecting the connection and Other DB related process.
Give name to service that you want to create
Choose the DB Connection you have created already.
Move one with selecting your desired choice of Stored Procedure or Table (insert/Select) functionality that you want your web service to perform.
If you choose Table insert/Select then you can also choose the relation between tables as optional step.
Try to keep all steps default if you do not want any special features.
Once you finish all steps in wizard, then it will generate whole lot of files under your Project.
Look for 4 main files .jca, xsd/.xsd, *.mapping.xml, *.wsdl
If you see all these files generated well in your project then you are all set and we can move ahead. If not then look for the issue.
Steps in WLS Console
Create Data Source
1.Go to Left panel and choose Data Source.
2. Select New -- Generic Data Source
3. Give Name as you wish but for JNDI Name you have to use the connection name from the *.JCA file that you already have. Open the jca file and search for the ‘UIConnectionName’. This value will be used as JNDI name in data source creation.
4. Choose Driver as oracle.jdbc.xa.client.OracleXADataSource
5. Use the host and Port and other details that you had selected during DB Connection (in JDeveloper). This is obvious step.
6. Choose target AdminServer.
7. If you finish everything correctly. You are all set here and you can choose to test the connection and should be Test Success.
Configure the DB Adaptor
Go to Deployment on left hand panel.
In Deployed services. Search for DbAdaptor.
Click on the name DbAdaptor.
Select Configuration tab. And under it choose Outbound Connection Pool.
Here you will see (javax.resource.cci.ConnectionFactory)
Click on new.
Choose javax.resource.cci.ConnectionFactory
Next page will ask for JNDI Name. For this, you have to go to your *.jca file and choose the value which is already there for Connection-factory as Location (like connection-factory location=?). Use the value of Location as JNDI Name.
Transaction will be No Transaction. Choose this for now. This is need basis selection.
Leave other selection as is and then Finish.
Note : Once you finish. Go to Properties Tab again and look for a property name : xADataSourceName. Its value should be the same as UIConnectionName that you have in *.jca file. It should be populated. If not then you can set now as well. You have to double click on the value section and then write the name and press enter. Then Save it.
With above all steps we have set the DbAdaptor to point to same DB where we have our table/store procedure.
What we did above is:
• We Have JCA File and WSDL for our service. Along with DB Setting.
• We have a Data Source for our DB in WLS.
• We have the deployed DbAdaptor in WLS which is pointing to the same JNDI.
Steps in OSB Console
Create a Project.
Create 3 folders under Project. Like Resources, Proxy Service, Business Service.
Activate your project.
In Resources folder. We have to add JCA Mapping. Point it to the *.jca we already have from above steps (We had created it JDeveloper). Just give the path and Save. It may give you Error. Ignore for Now.
In Resources Folder. Add a WSDL and give the path of your *.wsdl. If it give Error. Then ignore for now.
In Resources Folder. Add a XSD and give path for the *.xsd we already have.
In Resources Folder. Add a XML and give path to the file *Mapping.xml.
Revisit resource WSDL again and click on its name. “Edit References”. Choose the XSD you already have and Save.
Revisit resource JCA and click on its name and edit reference and point it to the mapping.xml
By now you will see all errors gone.
Activate your project.
Go to Left hand side and select the Business Service and Create Business Service by selecting the wsdl project. On next page select Binding.
Then select JCA and give the ‘Location’ of IES (remember we have a value in connection-Factory in *.jca as Location. We had used it while creating DbAdaptor). Give that value here.
Move to next, next and next and finish.
Your business service is all set.
Now create a Proxy Service. Select Proxy Service and choose from B usiness Service option and do select the Business service you have create in above step.
Then click done
Activate your project.
That’s it we are all set. In proxy service you can click and see what is the End Point URl and keep it safe for your future reference. This is the url that we hav eto give on Client to call our service.
With this we all Done.
Call from Client.
Select SOAPUi for this purpose.
Create new project and give the end Point URL.
It will show all the services in it.
Select one service. Create Request.
Put the values in Request XML and Use the endpoint URL by appending your Localhost:port.
Click go and you will see the response back.
So, Finally : We are done with testing a OSB project with DB adaptor.
This looks long, but once you do it, its very easy for next services.
Thanks, Hope that will help.
The OSB Console does not support creation of the JCA DB Adapters, and neither does OEPE.
You need to create the DB Adapter in JDeveloper and then import it via OEPE/OSB Console. OEPE is easier ;-).
For a guide, see:
http://guidoschmutz.wordpress.com/2010/08/08/oracle-service-bus-11g-and-db-adapter-a-different-more-integrated-approach/
or
https://blogs.oracle.com/middleware/entry/using_jca_adapter_with_osb_11113

Managing (add/update) user specific configuration setting in WPF application

I want to manage user specific configuration settings in WPF application configuration file (app.config). While setup (.msi using custom action) I ask user to enter some of the configuration parameters and want to store it in app.config. Also allows user to update these settings through configuration window. I tried following two approaches but didn't working as per expectation.
Approach 1: I added configurable parameters to appSettings section of app.config file. While setup I accepts values for those parameters and write it to app.config using ConfigurationManager. It's working fine. Here configuration are common to all the users.
Issue: Due to Windows 7 OS security unable to write/update configuration parameters value when user run application and modify the same from the configuration window. Since the app.config file stored under "Program Files" Win 7 security not allowing it to modify. It is working fine if I use "run as administrator" option.
Approach 2: Stored configurable settings to Properties.Settings.Default (WPF Project -> Properties -> Settings) which added to app.config file under userSettings/WPFSamples.Properties.Settings section. It has resolved issue with Windows 7 security now user can change the values of configurable parameters from configuration window and it updated to user setting file (C:/Users/DevUser1/AppData/Local) using Properties.Settings.Default. This approach allows to store user specific configuration.
Issue: While setup I accepts configurable values but not able to write it to user configuration file using Properties.Settings.Default (Properties.Settings.Default.Save()). It didn't throwing any exception but it has not been written anywhere since the user settings file (C:/Users/DevUser1/AppData/Local) isn't created until user start the application, modify the configurable parameters and saves it.

Resources