Tuesday, September 23, 2014

DB Restore Error: Restore failed for server 'ServerName'. (Microsoft.SqlServer.SmoExtended):

I created a testing environment(test1_MSAX) for one of my Live-Organisation through Import Organization in the deployment Manager. For some further RnD purpose, I wanted to create yet another test organization (test2_MSAX) for the same Live-Organization on the Same server where I already had previous test1_MSAX.
Error:
 
Solution:
  • Click on Options.
  • At right side, Under ‘Restore the database file as:‘ section. The first column represent the original file names of file type .mdf and .ldf and right most column represents the file name which you want to provide and restore the DB file as.


  • Click on the browse button and scroll all the way to see the file name and change it to your preferred name(test2_MSAX.mdf and test2_MSAX.ldf).
     
    After changing the restore database file name as, my DB restore succeeded.

     

    Friday, September 19, 2014

    Downgrading a SQL Server 2012 database to SQL Server 2008 R2

    Different Databases for Ax 2012 in Sql Server


    Databases include the Microsoft Dynamics AX DataBaseModel, and the Baseline database.

    1. The AOS connects to the Microsoft Dynamics AX database to process transactions.
    2. The AOS connects to the model store to display application elements such as forms and reports.
    3. The baseline database contains a model store that is used to upgrade X++ code to Microsoft Dynamics AX 2012. The baseline database is used to analyze application updates before they are applied.
    Other Microsoft Dynamics AX components, such as Enterprise Portal and Reporting Services extensions, also include databases. The additional databases are created when you install those components and their prerequisites.

    SalesOrder and PurchaseOrder classes and Tables

    SalesOrder Classes and Tables:
    SalesTableType and SaleslineType classes will get called while creating the SalesOrders.
    SalesFormLetter_Confirm
    SalesFormLetter_Invoice
    SalesFormLetter_PackingSlip
    SalesFormLetter_PickingLlst
    classes will be used to post the sales order at various document status (packing, invoice etc).
    Tables:
    SalesTable contains all SalesOrder headers regardless whether they have been posted or not.
    The SalesParmTable and SalesParmLine contains detailed information regarding posting sales headers and Lines.
    CustConfirmJour and CustConfirmTrans tables contains all Sales Confirmation headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.
    CustPackingSlipJour and CustPackingSlipTrans tables contains all sales PackingSlip headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.
    CustInvoiceJour and CustInvoiceTrans tables contains all sales all Sales Invoice headers and Lines posted in Dynamic Ax originating from Sales Orders and Lines.

    PurchaseOrder classes and Tables:
    PurchTableType and PurchTableLine classes will get called while creating the PurchaseOrders.
    PurchFormLetter_PurchOrder
    PurchFormLetter_ApproveJournal
    PurchFormLetter_Invoice
    PurchFormLetter_PackingSlip
    PurchFormLetter_ReceiptsList
    classes will be used to post the PurchaseOrder at various document status (packing, invoice etc).
    Tables:
    PurchTable contains all purchase order headers regardless whether they have been posted or not.
    PurchParmTable and PurchParmLine contains detailed information regarding posting Purchase headers and Lines.
    VendPackingSlipJour and VendPackingSlipTrans tables contains posted packingslip headers and lines.
    VendInvoiceJour and VendInvoiceTrans tables contains all invoiced purchase order headers and Lines.
    VendReceiptsJour and VendReceiptsTrans tables contains posted receipt header and lines.
    VendPurchOrderJour and VendPurchOrderTrans tables contains Purchase requisition headers and lines.

    How to create SalesOrder :
    http://www.dynamicsaxtraining.com/dynamics-ax-trade-and-logistics-training/create-sales-order
     

    Wednesday, September 10, 2014

    Table Level Best Practices

    When you create a new table, set the relevant table properties in the property sheet.
    Incorrect table property settings can negatively affect performance and manageability.

     

    Monday, September 8, 2014

    How to check sql server is running which bit (32 or 64 bit) version

    by using @@version :

    Open SQL Server Management Studio>right click on the DB Server> select New Query

    select @@version

    Result:

    Microsoft SQL Server 2008 R2 (RTM) - 10.50.1617.0 (Intel X86)   Apr 22 2011 11:57:00   Copyright (c) Microsoft Corporation  Developer Edition on Windows NT 6.1 <X64> (Build 7600: ) (WOW64)

     Server Name:

    select @@servername

    Service Name:

    select @@servicename
     

    Thursday, September 4, 2014

    Collection Classes

    In AX collection classes have been designed for storing objects.
    The classes are implemented in C++ to achieve the maximum performance (they are system classes).
    collection classes are extended with Object class.

    Array: Similar to the X++ language array type except that it can hold values of any single type, including objects and records. Objects are accessed in a specific order.

    http://msdn.microsoft.com/EN-US/library/array.aspx

    List: Contains any number of elements that are accessed sequentially.
    Lists are structures that can contain values of any X++ type.
    All the values in the list must be of the same type.

    http://msdn.microsoft.com/EN-US/library/list.aspx

    Map: The Map class allows you to associate one value (the key) with another value.
    Both the key and value can be any valid X++ type, including objects.
    The types of the key and the value are specified in the declaration of the map.
    The way in which maps are implemented means that access to the values is very fast.

    http://msdn.microsoft.com/EN-US/library/map.aspx

    Struct:  A struct holds several values of any X++ type, to group the information about a specific entity.

    http://msdn.microsoft.com/EN-US/library/struct.aspx

    Set:The Set class is used for the storage and retrieval of data from a collection in which the values of the elements contained are unique and serve as the key values according to which the data is automatically ordered.

    http://msdn.microsoft.com/EN-US/library/set.aspx

    Changes to the Collection Classes in Dynamics AX 2012

    http://blogs.msdn.com/b/x/archive/2011/09/07/changes-to-the-collection-classes-in-dynamics-ax-2012.aspx



     

    update_recordset with joins

     update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...