infinspan for SQL server - sql

I need a template infinispan for sql server.
Or a tutorial that explains each and every tag, a sample that points h2 database, or tutorial that explains each and every tag a sample that points h2 database.
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd
urn:infinispan:config:jdbc:6.0 http://www.infinispan.org/schemas/infinispan-cachestore-jdbc-config-6.0.xsd"
xmlns="urn:infinispan:config:6.0">
<namedCache name="persisted_repository">
<persistence passivation="false">
<stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:6.0"
fetchPersistentState="false"
ignoreModifications="false"
purgeOnStartup="false">
<connectionPool
connectionUrl="jdbc:h2:file:target/content/db;DB_CLOSE_DELAY=-1"
driverClass="org.h2.Driver"
username="sa"/>
<stringKeyedTable
prefix="ISPN_STRING_TABLE"
createOnStart="true"
dropOnExit="false">
<idColumn name="ID_COLUMN" type="VARCHAR(255)"/>
<dataColumn name="DATA_COLUMN" type="BINARY"/>
<timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT"/>
</stringKeyedTable>
</stringKeyedJdbcStore>
</persistence>
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.DummyTransa`c`tionManagerLookup"
transactionMode="TRANSACTIONAL"
lockingMode="OPTIMISTIC" />
</namedCache>
</infinispan>

If you want to connect to MySQL, the only thing you have to change is the connectionPool:
<connectionPool
connectionUrl="jdbc:mysql://mysql.example.com:3306/my_db"
driverClass="com.mysql.jdbc.Driver"
username="db_user"
password="db_pwd" />

Related

Alter cube dimension by using XMLA

By using XMLA how to access WriteEnabled dimension property and modify it?
Here is a sample I'm using for that
<Alter ObjectExpansion="ExpandFull" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>DB</DatabaseID>
<DimensionID>My dimension</DimensionID>
</Object>
<ObjectDefinition>
<Dimension xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100">
<WriteEnabled>false</WriteEnabled>
<ID>My dimension</ID>
<Name>Dimension name</Name>
<Attributes>
<Attribute>
<Name>Attribute name/Name>
</Attribute>
</Attributes>
</Dimension>
</ObjectDefinition>
</Alter>
Running this script I'm getting following error: Errors in the metadata manager. The 'My dimension' dimension has either zero or multiple key attributes.
What is missing in a script above?
Seems the key columns node and Name columns nodes for your attribute have missing:
Here is an example for a dim attributes node, hope it helps:
You can create a cube manually, and then check the alter script by right click the cube name for a reference also.

Is it possible to create multiple data source objects under the same database executing a single xmla script?

I want to create multiple data source objects under the same database executing the single XMLA script only once.I have tried the below script but it did not work.If I define only a single node, the script executes successfully.But when I add the another same node it gives error. I am newer to this.Please guide.
<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ParentObject>
<DatabaseID>Test Database</DatabaseID>
</ParentObject>
<ObjectDefinition>
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RelationalDataSource">
<ID>Test Datasource1</ID>
<Name>Test Datasource1</Name>
<Description>A test datasource1.</Description>
<ConnectionString>Provider=SQLNCLI11.1;Data Source=servername;User ID=user;Password=pass;Initial Catalog=SqlDb</ConnectionString>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateServiceAccount</ImpersonationMode>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>
</DataSource>
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RelationalDataSource">
<ID>Test Datasource2</ID>
<Name>Test Datasource2</Name>
<Description>A test datasource2.</Description>
<ConnectionString>Provider=SQLNCLI11.1;Data Source=servername;User ID=user;Password=pass;Initial Catalog=SqlDb</ConnectionString>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateServiceAccount</ImpersonationMode>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>
</DataSource>
</ObjectDefinition>
</Create>
Is there a batch element wrapper you can use?

Cruise Control .NET Security

I am attempting to implement LDAP authentication, along with the required permissions.
<internalSecurity>
<cache type="inMemoryCache" duration="60" mode="sliding" />
<audit>
<xmlFileAudit location="D:\Logs\CCNet_Audit.xml"/>
</audit>
<auditReader type="xmlFileAuditReader" location="D:\Logs\CCNet_Audit.xml"/>
<users>
<ldapUser name="*username*" domain="*localdomain*"/>
</users>
<permissions>
<rolePermission name="Admin" forceBuild="Allow" sendMessage="Allow" startProject="Allow" changeProject="Allow" viewSecurity="Allow" modifySecurity="Allow" viewProject="Allow" viewConfiguration="Allow" >
<users>
<userName name="*username*"/>
</users>
</rolePermission>
</permissions>
Inside my project I have the following XML:
<project name="TestProject" description="TestProject" queue="Q7">
<security type="defaultProjectSecurity" defaultRight="Deny">
<permissions>
<rolePermission name="Admin" ref="Admin"/>
</permissions>
</security>
My log at (D:\Logs\CCNet_Audit.xml) is saying that I am "Denied"
<event><dateTime>2015-08-17T09:30:41.7973762-04:00</dateTime><user>*username*</user><type>Login</type><outcome>Deny</outcome></event>
and the project is unavailable within CC Tray.
My username is correct and I have the domain correct within the configuration (I just don't want to share it).
One thing I have noticed is that There seems to be a case issue within the username that Cruise Control is getting c-Joe.smith versus the english "normalization" of c-Joe.Smith . . . and yes I have tried it both ways.
Any help?
Try setting defaultRight="Allow" for your admin group.
<rolePermission name="Admin" defaultRight="Allow" forceBuild="Allow" sendMessage="Allow" startProject="Allow" changeProject="Allow" viewSecurity="Allow" modifySecurity="Allow" viewProject="Allow" viewConfiguration="Allow" >
<users>
<userName name="*username*"/>
</users>
</rolePermission>

Batch processing Google Contact Groups with API (php)

I'm trying to do batch processing of Google Contact groups. I have batch processing working for the actual contacts, but groups are not behaving. The XML that I send to Google is:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:gContact='http://schemas.google.com/contact/2008'
xmlns:gd='http://schemas.google.com/g/2005'
xmlns:batch='http://schemas.google.com/gdata/batch'>
<entry>
<batch:id>create</batch:id>
<batch:operation type='insert'/>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#group'/>
<title type='text'>Status:Followup 1</title>
<content type='text'>Status:Followup 1</content>
</entry>
</feed>
The response I got back from google was:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:batch="http://schemas.google.com/gdata/batch"
xmlns:gContact="http://schemas.google.com/contact/2008"
xmlns:gd="http://schemas.google.com/g/2005">
<id>https://www.google.com/m8/feeds/contacts/awallace%40ihouseweb.com/full/batch/1430425819721000</id>
<updated>2015-04-30T20:30:19.721Z</updated>
<title type="text">Batch Feed</title>
<entry gd:etag=""SHs-ezVSLit7I2A9XRVTFE8PTwU."">
<batch:id>create</batch:id>
<batch:operation type="insert"/>
<batch:status code="201" reason="Created."/>
<id>http://www.google.com/m8/feeds/contacts/awallace%40ihouseweb.com/base/4b9f4f69095d670d</id>
<updated>2015-04-30T20:30:19.553Z</updated>
<app:edited xmlns:app="http://www.w3.org/2007/app">2015-04-30T20:30:19.553Z</app:edited>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#contact"/>
<title/>
<content>Status:Followup 1</content>
<link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*"
href="https://www.google.com/m8/feeds/photos/media/awallace%40ihouseweb.com/4b9f4f69095d670d"/>
<link rel="self" type="application/atom+xml" href="https://www.google.com/m8/feeds/contacts/awallace%40ihouseweb.com/full/4b9f4f69095d670d"/>
<link rel="edit" type="application/atom+xml"
href="https://www.google.com/m8/feeds/contacts/awallace%40ihouseweb.com/full/4b9f4f69095d670d"/>
</entry>
</feed>
(note, there were actually 4 groups in my batch, but the results were identical).
The groups in my account were unchanged. I have successfully added and deleted groups one at a time (without the batch syntax/url). The result XML here says explicitly that the group was created (), but the title element is empty in the return. ()
Any ideas?
Thanks,
Andy
I had a similar problem when batch creating groups. My problem was I had no entry for gd:extendedProperty:
eg:
<?xml version="1.0"?>
<feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gContact="http://schemas.google.com/contact/2008" xmlns:batch="http://schemas.google.com/gdata/batch">
<entry>
<batch:id>create</batch:id>
<batch:operation type="insert"/>
<atom:category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#group"/>
<atom:title type="text">Test 1</atom:title>
<gd:extendedProperty name="Test 1">
<info>Test 1</info>
</gd:extendedProperty>
</entry>
...
</feed>
The XML markup you have appears to be for updating an existing group. Have a look at the documentation for more info:
https://developers.google.com/google-apps/contacts/v3/#batch_operations_for_contact_groups

How do I update my SQL database using XML?

I have the following XML file:
<?xml version="1.0" encoding="utf-8"?>
<Patients>
<Patient EMail="LeBron#James.com">
<FirstName>LeBron</FirstName>
<LastName>James</LastName>
</Patient>
<Patient EMail="Kobe#Bryant.com">
<FirstName>Kobe</FirstName>
<LastName>Bryant</LastName>
</Patient>
<Patient EMail="Allen#Iverson.com">
<FirstName>Allen</FirstName>
<LastName>Iverson</LastName>
</Patient>
</Patients>
I want to store it in a SQL database which I have done successfully/
I then added some more data to the same XML File:
<?xml version="1.0" encoding="utf-8"?>
<Patients>
<Patient EMail="LeBron#James.com">
<FirstName>LeBron</FirstName>
<LastName>James</LastName>
</Patient>
<Patient EMail="Kobe#Bryant.com">
<FirstName>Kobe</FirstName>
<LastName>Bryant</LastName>
</Patient>
<Patient EMail="Allen#Iverson.com">
<FirstName>Allen</FirstName>
<LastName>Iverson</LastName>
</Patient>
<!-- New data starts here -->
<Patient EMail="trtr#Iverson.com">
<FirstName>tr</FirstName>
<LastName>rson</LastName>
</Patient>
<Patient EMail="wewn#Iverson.com">
<FirstName>Awerwren</FirstName>
<LastName>Iveww</LastName>
</Patient>
</Patients>
But it does not update in SQL database at runtime.....
What am I doing wrong?
Based on what you've posted, I'm guessing that perhaps there's a primary or unique key on the Patient table's FirstName and LastName columns, and the second time you try to insert data into the database this constraint is causing the inserts to fail.
Just a guess. Post more information and perhaps we can narrow it down a bit for you.
Share and enjoy.
Delete the previous database. Create a new database with the new XML.