How to set multiple JNDI names in Weblogic wlst Offline - weblogic

I want to add 2 jndi names to one data source.This is my code.
cd('/JDBCSystemResource/primelogDataSource/JdbcResource/primelogDataSource')
create('primelogDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')java.lang.String('abcDataSource','cdaDataSource'))
set('GlobalTransactionsProtocol', java.lang.String('None'))
This won't work. But if i add only one jndi name like below, it is working.
cd('JDBCDataSourceParams/NO_NAME_0')java.lang.String('abcDataSource'))
I must mention that this is offline python script. I am looking for help.

At the top in weblogic you have a 'record' button. Take a session, click the record button, do your changes, click the record button again and it will write a script to the filesystem that does the actions you recorded

Related

Set define off permanent

When running queries in SQL Developer and using the character & in my literals, a popup appears asking me to provide a variable. I then execute SET DEFINE OFF; and I can run my query for the rest of the session.
Is there any way to configure Oracle so it can never ask for manual variables when containing the & character?
Create a text file on your PC which contains set define off and any other set-up instructions you might want.
Then in SQL developer, go to the Tools menu and pick the Preferences... option. In the panel on the left click on Database.
Then either type the path to the file you created, or click Browse and navigate to the file in the 'Select connection startup script' dialog that appears.
That script will then be run every time you connect to any database.
Put SET DEFINE OFF into
login.sql (so that it works for you only, i.e. use user profile file), or
glogin.sql (so that its affect is global, i.e. use site profile file)

Squirrel - changing driver properties not possible

I use Squirrel 3.8.1 and try to configure a connection to Amazon Redshift via driver RedshiftJDBC42-1.2.1.1001.jar.
However, I am not able to change the properties of the driver which are listed in tab Driver properties.
I check the Specify box and in the column Value a ? appears. But the field is not editable.
I just come across the same problem with the Athena driver. Found a workaround to the problem you describe above. Right click the properties table then select 'Add', you can then add the relevant properties, just make sure you click the 'Specify' box for the new value.

How to get the SQL query from a file in SSIS

I'm new to SSIS. I have a DataBase from which i'm getting the data. Suppose DB is the source and destination may be anything. (I tried DB to Excel and it worked fine)
In the source i have a custom query to get the data. I have written that in the properties.
Now i want to change it. I want to put it in some configuration file (xml file). i.e., i want to
get the query of the source from the xml file. How can i do this?
I'm a complete newbie trying the things. So please give your answer specifically.
UPDATE:
This is my package
I double clicked the OLE DB source. Now This is what i written there
I want to put the query (select id, age from emp where exp > 4), in a configuration(xml) file.
Create a package level variable for your query:
Change your source editor to use SQL command from variable (with appropriate variable) instead of SQL command:
Go to the SSIS menu and click "Package Configurations..." then click the checkbox to Enable package configurations, then click the "Add..." button.
... By default, it uses an XML Configuration file, which is probably easiest to work with. Specify a filename - the file extension is .dtsConfig. If the file doesn't exist on your machine, it will create one for you. Click Next.
Find your Variable, find the Value property for the variable, and check the box for it. Click Next.
Choose a name for your configuration. Click Done, then click Close in the Package configuration list, making a note of where on your file system you saved your configuration file.
Find the configuration file on your file system. Right-click and edit with an XML editor as needed.

Is it possible to change the Windows cursor scheme with the command prompt?

I would like to know if it is possible to change the cursor scheme of Windows 8 with a command prompt. I want to have it run on start up, since I can't seem to figure out how to change it permanently. If there is any other way to change it permanently, please let me know. The problem I am having is that I cannot copy my custom cursor files to C:\Windows\Cursors, because it says I don't have permission even though I am the administrator of the computer, and the only user on the computer.
Try going to the file "C:\windows\cursors" file in explorer. Right click on it and go to properties. Then move to the security tab and the click on add button to add a your list to the permissions if you are not already on the list. Make sure it is your specific user name and not just the administrator group.

Sharepoint External Content Type authentication mode - what to choose?

My scenario is simple: i have a list of employees in some database, I would like to display it in sharepoint for everyone to see (read only, no updates).
So I created SQL external content type and then created external list based on it. But I can't get how to handle the autnetication. On creating the external content type you get to choose authentication mode: user's identity, windows impersonated and custom impersonated. I don't want my sharepoint (AD) users to have access to the database so the first option is out. I just want everyone to see the list in sharepoint and I have an sql user and password to get there, but i don't know how to provide it. I've read a lot about the authentication modes but I still don't understand it.
I was recently faced with a similar scenario, and, after much research here is the procedure I cobbled together:
(1) In SharePoint Designer 2010, create the external content type. For the connection identity information, select "Connect with Impersonated Custom Identity" and for the Secure Store Application ID provide the username that you usually use for database connections. Hopefully the connection is successful. If it is, set up the ECT the way you want it and save. If not, you can try one of the other authentication options (or, in my case, I had to connect through a VPN).
(2) After you've created the ECT and it's showing up in the External Content Types list, right-click on it and select "Export BDC Model." The exported BDC model is just an xml file, which you will edit in step 4 below.
(3) Once you've exported the BDC model, delete the ECT that you just created in SharePoint Designer. From here on out you'll be using the exported BDC model, and if you keep the one you created in SharePoint Designer you'll get a conflict.
(4) Now open up the exported BDC model (it will have extension .bdcm) in a text editor. Locate the element (it will say , where "YourDatabase" is your database name). Delete everything between the opening and closing tags of the element, and replace it with the following:
<Property Name="AuthenticationMode" Type="System.String">PassThrough</Property>
<Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property>
<Property Name="RdbConnection Data Source" Type="System.String">YOURDATASOURCE</Property>
<Property Name="RdbConnection Initial Catalog" Type="System.String">YOURDATABASE</Property>
<Property Name="RdbConnection Pooling" Type="System.String">True</Property>
<Property Name="RdbConnection User ID" Type="System.String">YOURUSERNAME</Property>
<Property Name="RdbConnection Password" Type="System.String">YOURPASSWORD</Property>
<Property Name="RdbConnection Integrated Security" Type="System.String">False</Property>
<Property Name="ShowInSearchUI" Type="System.String"></Property>
Of course, replace the YOUR values with your actual values.
(5) Then, go to the SharePoint Central Admin console, and, under Application Management, click on Manage Service Applications, and then click on Business Data Connectivity Service.
(6) Then, click the Import button (upper left hand corner). In the import dialog box, browse for the .bdcm file you modified in step 3 above. For "File Type," make sure "Model" is selected. For "Advanced Settings," check off all three options (Localized Names, Properties, and Permissions). Then click the gray Import button.
(7) You should now see your BDC model in the list. Hover over it with your mouse until you see the dropdown menu arrow. Click on that and select "Set Permissions."
(8) Select the user(s) or group(s) to give permissions to (and be sure to click the "add" button), and click OK. Then hit the add button, and you'll see the possible permissions in the permissions box. Check off the permissions you want to grant, and then click OK.
(9) Finally, the ECT is ready to use. Go to your SharePoint site, click on Site Actions > More Options, and select External List and click on the Create button. In the Data Source Configuration area, click on the icon to the far right of the External Content Type field ("Select External Content Type"), select the ECT you just set up, and
click on Create. If all goes well, you should see the data from your SQL database. If there's a problem, you'll get a very unhelpful error message.
I hope this is helpful to someone.