Idus, thanks for the feedback. I’ve responded inline below.

On Feb 25, 2013, at 2:08 PM, Ildus Hakov <[email protected]> wrote:

> Thanks for the responses. But looks like to move dbs and servers to prod or 
> qa from the dev env, not an easy task:
> - backups very sensitive, does not work on diff. platforms or something else. 
> (I have both platform winnt, architecture one Intel another And).

Backups are platform-specific. To move database contents across platforms you 
should look at mlcp’s copy command 
<http://docs.marklogic.com/guide/ingestion/content-pump#id_42430>. It can 
migrate documents and metadata (permissions, collections, quality) between two 
databases without having to maintain an intermediate export or write any custom 
code.


> - export/import supports only configurations.

Yes, the Configuration Manager in v6 only supports app server and database 
settings, such as indexes and fields. To bootstrap forests and hosts, for 
example, you’ll have to invoke the Admin API 
<http://docs.marklogic.com/guide/admin-api/usingAPI#chapter>.


> - the application to be moved needs to be packaged manually, there is no way 
> to create deployment file.

Yes, as of v6 there is no way to package up application code. Best practice for 
production environments, however, is to keep code in a modules database. You 
can migrate this content using mlcp copy just like you’d do with other data. 
Same with Security, Triggers, and Schemas.

> 
> So I have to manually create all dbs, servers.
> So as for a data I had to write the xqy to save all docs from db to disk, 
> copy them to target box, then run document-insert.
> Then I believe I can load config files. Ahhh:(
> Then manually save all application files, copy and insert to the target or 
> may be I can do the same thing as I did for the data?
> 
> And then the all these steps for production. 
> 
> ildus

We’re actively working on making these steps simpler and more automated (and 
automatable, if that’s a word). Your feedback is greatly appreciated.

Justin Makeig

Justin Makeig
Director, Product Management
MarkLogic Corporation
[email protected]
www.marklogic.com


> 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> [email protected]
> Sent: Monday, February 25, 2013 3:00 PM
> To: [email protected]
> Subject: General Digest, Vol 104, Issue 83
> 
> Send General mailing list submissions to
>       [email protected]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://developer.marklogic.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>       [email protected]
> 
> You can reach the person managing the list at
>       [email protected]
> 
> When replying, please edit your Subject line so it is more specific than "Re: 
> Contents of General digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Single transaction and rollback on   failure (Michael Blakeley)
>   2. Re: Getting Bad word size during restore db (Michael Blakeley)
>   3. Re: Getting Bad word size during restore db (Danny Sokolsky)
>   4. Re: Getting Bad word size during restore db (Michael Blakeley)
>   5. Re: Asyncronous Status Updates (Tim)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 25 Feb 2013 09:53:54 -0800
> From: Michael Blakeley <[email protected]>
> Subject: Re: [MarkLogic Dev General] Single transaction and rollback
>       on      failure
> To: MarkLogic Developer Discussion <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=iso-8859-1
> 
> Which version of the server are you using?
> 
> You haven't said what's going wrong. What's the problem? If you have an error 
> message it's always a good idea to paste that in.
> 
> I suspect that you're seeing something like "XDMP-MULTIDBSTMT: Cannot process 
> different-database requests with same-statement isolation". If so the error 
> message says it all: you can't update two different databases in the same 
> statement. This is covered at 
> http://docs.marklogic.com/guide/app-dev/transactions#id_24388
> 
>> You may not use same-statement isolation when using the database option of 
>> xdmp:eval orxdmp:invoke to specify a different database than the database in 
>> the calling statement's context. If your eval/invoke code needs to use a 
>> different database, use different-transaction isolation.
> 
> Using different-transaction isolation means that you're really committing two 
> transactions, each atomic in its own database but discrete from each other. 
> You can try to structure your update sequence so that the first update will 
> be the sensitive one, and will automatically keep the second one from running 
> if it throws an error. But I can't think of a way to update two different 
> databases in a single ACID transaction. I don't think multi-statement 
> transactions will help. You could try XA, I suppose, but that gets 
> complicated quite quickly and I wouldn't recommend it.
> 
> At this point I would back up and revisit the design. Why do you want to 
> update two databases at once? If two documents need to participate in a 
> transaction, maybe they should be in the same database. Then you wouldn't 
> need any invokes at all.
> 
> In passing, the xdmp:quote($input) is probably unnecessary. I imagine you 
> added that in an attempt to work around XDMP-MULTIDBSTMT, but it won't.
> 
> -- Mike
> 
> On 25 Feb 2013, at 07:50 , Jonna Marry <[email protected]> wrote:
> 
>> Hi,
>> 
>> I have a scenario to insert 2 different documents in 2 different databases 
>> in single transaction.If either one fails, I need to roll back the insert 
>> operation.
>> I tried using "xdmp:transaction-mode" and 
>> "<isolation>same-statement</isolation>   " options. It would be helpful if I 
>> get some suggestion to resolve this issue.
>> 
>> 
>> xquery version "1.0-ml";
>> declare option xdmp:transaction-mode "update";
>> 
>> let $_1 := xdmp:invoke( ("/aa.xqy")), 
>>                                        (
>>                                            xs:QName("input"), 
>> xdmp:quote($input),
>> 
>>                                        ),
>>                                        <options xmlns="xdmp:eval">           
>>                                                                              
>>   
>>                                           
>> <isolation>same-statement</isolation>  
>>                                  
>> <database>{xdmp:database("test1")}</database>                   
>>                                         </options>
>>                                        ) let $_2 := xdmp:invoke( 
>> ("/aa.xqy")),
>>                                        (
>>                                            xs:QName("input"), 
>> xdmp:quote($input),
>> 
>>                                        ),
>>                                        <options xmlns="xdmp:eval">           
>>                                                                              
>>   
>>                                           
>> <isolation>same-statement</isolation>   
>>                                          
>> <database>{xdmp:database("test2")}</database>                 
>>                                         </options>
>>                                        ) return "success"
>> note :
>> 
>> Regards,
>> Jonna.
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 25 Feb 2013 10:24:03 -0800
> From: Michael Blakeley <[email protected]>
> Subject: Re: [MarkLogic Dev General] Getting Bad word size during
>       restore db
> To: MarkLogic Developer Discussion <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=us-ascii
> 
> That error probably means you should contact support.
> 
> Support may ask you to check the integrity of the files you transferred: some 
> files might have been truncated or bits flipped. Many tools aren't 
> particularly good about checking for errors or handling timeouts. I generally 
> use rsync to move important files, because it is resumable and uses checksums.
> 
> For configuration of a new system, look into 
> http://docs.marklogic.com/guide/admin/export-import
> 
> -- Mike
> 
> On 25 Feb 2013, at 09:45 , Ildus Hakov <[email protected]> wrote:
> 
>> Hi,
>> 
>> I am trying to replicate the db from one box to another using backup/restore 
>> ML functionality. The source db is 5.04 and a target db is 6.0.
>> I did backup, copied them to target box and did restore on target box. 
>> Then got a message: Bad word size
>> 
>> What does it mean could not find.
>> Also question/suggestion: Looks like I need to create first db, forest, 
>> modules databases on target box with exact names which is not convenient  
>> then do a restore. Still no go.
>> 
>> Thanks,
>> ildus
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 25 Feb 2013 18:27:36 +0000
> From: Danny Sokolsky <[email protected]>
> Subject: Re: [MarkLogic Dev General] Getting Bad word size during
>       restore db
> To: MarkLogic Developer Discussion <[email protected]>
> Message-ID:
>       <d4f697174c071d46b891b38bfc6eafa606e...@exchg10-be01.marklogic.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> Also, make sure the 2 machines are the same platform and architecture:
> 
> xdmp:platform(), xdmp:architecture()
> 
> databases from one platform/architecture cannot be just moved to use on 
> another platform/architecture.  If you need to do that, use mlcp (or xqsync).
> 
> -Danny
> 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Michael Blakeley
> Sent: Monday, February 25, 2013 10:24 AM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Getting Bad word size during restore db
> 
> That error probably means you should contact support.
> 
> Support may ask you to check the integrity of the files you transferred: some 
> files might have been truncated or bits flipped. Many tools aren't 
> particularly good about checking for errors or handling timeouts. I generally 
> use rsync to move important files, because it is resumable and uses checksums.
> 
> For configuration of a new system, look into 
> http://docs.marklogic.com/guide/admin/export-import
> 
> -- Mike
> 
> On 25 Feb 2013, at 09:45 , Ildus Hakov <[email protected]> wrote:
> 
>> Hi,
>> 
>> I am trying to replicate the db from one box to another using backup/restore 
>> ML functionality. The source db is 5.04 and a target db is 6.0.
>> I did backup, copied them to target box and did restore on target box. 
>> Then got a message: Bad word size
>> 
>> What does it mean could not find.
>> Also question/suggestion: Looks like I need to create first db, forest, 
>> modules databases on target box with exact names which is not convenient  
>> then do a restore. Still no go.
>> 
>> Thanks,
>> ildus
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Mon, 25 Feb 2013 10:30:45 -0800
> From: Michael Blakeley <[email protected]>
> Subject: Re: [MarkLogic Dev General] Getting Bad word size during
>       restore db
> To: MarkLogic Developer Discussion <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=us-ascii
> 
> Good point: that's even more likely than a file integrity problem. It's easy 
> to accidentally install 32-bit on one box and 64-bit on another.
> 
> -- Mike
> 
> On 25 Feb 2013, at 10:27 , Danny Sokolsky <[email protected]> 
> wrote:
> 
>> Also, make sure the 2 machines are the same platform and architecture:
>> 
>> xdmp:platform(), xdmp:architecture()
>> 
>> databases from one platform/architecture cannot be just moved to use on 
>> another platform/architecture.  If you need to do that, use mlcp (or xqsync).
>> 
>> -Danny
>> 
>> -----Original Message-----
>> From: [email protected] 
>> [mailto:[email protected]] On Behalf Of Michael 
>> Blakeley
>> Sent: Monday, February 25, 2013 10:24 AM
>> To: MarkLogic Developer Discussion
>> Subject: Re: [MarkLogic Dev General] Getting Bad word size during 
>> restore db
>> 
>> That error probably means you should contact support.
>> 
>> Support may ask you to check the integrity of the files you transferred: 
>> some files might have been truncated or bits flipped. Many tools aren't 
>> particularly good about checking for errors or handling timeouts. I 
>> generally use rsync to move important files, because it is resumable and 
>> uses checksums.
>> 
>> For configuration of a new system, look into 
>> http://docs.marklogic.com/guide/admin/export-import
>> 
>> -- Mike
>> 
>> On 25 Feb 2013, at 09:45 , Ildus Hakov <[email protected]> wrote:
>> 
>>> Hi,
>>> 
>>> I am trying to replicate the db from one box to another using 
>>> backup/restore ML functionality. The source db is 5.04 and a target db is 
>>> 6.0.
>>> I did backup, copied them to target box and did restore on target 
>>> box. Then got a message: Bad word size
>>> 
>>> What does it mean could not find.
>>> Also question/suggestion: Looks like I need to create first db, forest, 
>>> modules databases on target box with exact names which is not convenient  
>>> then do a restore. Still no go.
>>> 
>>> Thanks,
>>> ildus
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> http://developer.marklogic.com/mailman/listinfo/general
>> 
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>> 
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Mon, 25 Feb 2013 13:39:43 -0500
> From: "Tim" <[email protected]>
> Subject: Re: [MarkLogic Dev General] Asyncronous Status Updates
> To: "'MarkLogic Developer Discussion'"
>       <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hi Charles,
> 
> I actually do this and keep them is a separate directory URI, but I keep the 
> most current status available at all times while keeping a copy of each new 
> status record for historical purposes.  And they are small as you recommend.
> 
> 
> 
> If I didn't keep a current copy of the status, I'm not sure how I would be 
> able to avoid contention for the latest record which I would still be 
> required to access.  It would avoid locking, but I wouldn't be guaranteed to 
> get the latest copy of the status nor to keep it current when updating it.
> Admittedly I haven't looked into how to choose the transaction isolation.
> 
> I suppose best and customary practices are dependent on system requirements, 
> but can you provide an example of the implementation you describe?  
> 
> 
> 
> Thanks!
> 
> 
> 
> Tim
> 
> 
> 
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Charles Greer
> Sent: Monday, February 25, 2013 12:40 PM
> To: [email protected]
> Subject: Re: [MarkLogic Dev General] Asyncronous Status Updates
> 
> 
> 
> Hi Tim,
> 
> To follow on what Damon's suggesting-- you might also want to make the status 
> documents very small, such that each update is really an insert.
> We've seen this approach a lot; accessors will aggregate the status documents 
> for examination, but each recorded fact is its own document.  "A
> document is a row, not a table."   No update locking contention in this
> scenario, and you can choose the transaction isolation or synchronous/asynch 
> to address other requirements in the system.
> 
> Partitioning these status documents from the rest of the database, by 
> collection or directory, would help organize them.`
> 
> Charles
> 
> 
> 
> 
> 
> --
> Charles Greer
> Senior Engineer
> MarkLogic Corporation
> [email protected]
> Phone: +1 707 408 3277
> www.marklogic.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://developer.marklogic.com/pipermail/general/attachments/20130225/394ae7b8/attachment-0001.html
>  
> 
> ------------------------------
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> End of General Digest, Vol 104, Issue 83
> ****************************************
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to