Create New File
This wizard in Files Maintenance creates a new empty company file on the same SQL Server and transfers the data of the current file into it. The description in the list reads: "This process will create a new empty file and transfer data from current file to the new one, this process is used if there is problem in current database." The data of the current file stays as it is. For the practical steps see Create a new file and transfer data.
Opening the window
- Click File > Tools > Files Maintenance, select Create new file and transfer data, and click Run. The Files Maintenance window opens after the program closes the open windows and reserves the file for you alone.
- The item shows when your key includes accounting, a file is open, and the file does not work in multi-file mode (Available maintenance).
- The wizard also starts from the favorites menu on the Tools page, from Quick Launch search and from a Maintenance tile on the desktop. These routes check no permission of the operation either, and only the Files Maintenance window reserves the file.
- The program checks no permission of its own for this item when you run it from the window; the Files Maintenance permission guards the window. Its desktop tile shows only for a user who has a permission of the same name on the Operations page of Users Management.
- It shows in the list inside the warning frame "This operation is dangerous …".
How the wizard works
Four pages, which backup pages may precede:
| Order | Page | What you do |
|---|---|---|
| 1 | Backup | You choose a backup before you continue. It is the first page, and Back is disabled on it. |
| 2 | Create New File | You enter the descriptive name and the new database name. |
| 3 | File location | You choose the location of the new description file. |
| 4 | Create the file | You click Start and the file is created and the data transferred. |
Next, Back and Cancel work on the first three pages as described in When to use files maintenance. Back on the second page returns to the backup page.
The backup page
This wizard shows the backup page first, because it needs one before it transfers data. Make a backup explains the page and its options: hard disk, removable disk, and no backup. In the subscription edition a page that says no backup is needed shows instead (the cloud backup).
Create New File
The page title is "Create New File". The page shows the text: "This maintenance will create a new empty database file, then transfer data from current file to the new one. Note : this maintenance is risky because it may lead to work loss in case there is more than one user to access to the database at the same time."
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Descriptive Name | The name of the new file as it shows in the recent files list. | No | The name of the current file when the page opens. Free text. |
| New Database Name | The name of the database that is created on the server. | No | The program suggests AmnDb followed by a three-digit number greater than the highest number recorded in the list of files on the server, such as AmnDb002. If a database with the same name exists on the server, the number increases. Free text. |
The program fills both fields and does not check them, when you click Next or Start.
File location
This page chooses the folder where the description file (extension sdf) that points to the new database is created. It is the same page that the carry forward balances wizard uses, so its title and texts are written for that wizard.
Its title is "New Accounting Period Files Location". Its text: "When carrying balances forward, the program creates files for the new accounting period containing Accounts, Materials, Accounts Receivable, and balances found in the files of current accounting period." and "The program suggests a default location for these files. We recommend to accept this location, and you can select another location."
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Default Location | Uses the location that the program suggests and writes it under the option. | One of the two options | Selected when the page opens. The suggested location is a file named data.sdf inside a new folder named data00, or data01 and so on if that exists, under the data folder of the program. |
| Selected Location | Uses a location that you type. | One of the two options | When selected, a text box and a Browse... button show. |
| Text box | The full path of the new description file. | Yes if you selected Selected Location | The program fills it with the default location. |
| Browse... | Opens a save file window with the types "Store data files (.sdf)" and "All files (.*)", and puts the name you choose in the text box. | No |
When you click Next:
- If you chose Selected Location and left the box empty, "File Name Missing" appears.
- The folder where the file will be created must not exist, and the program creates it. The program checks this for the default location and shows "The selected folder already exists. Files must always be created in new folder. You have to give a name of not existing folder. So that the file will be created in it." and the wizard stays on the page. It does not check the path you type yourself on Next, so make sure its folder does not exist.
- Cancel on this page asks "Do you want to cancel Carrying Balances Forward process?", because the page is shared with the carry forward wizard. Yes closes the create new file wizard.
Create the file
Its title is "Create New File" and it shows the same note as the names page. In the middle is a list where the program writes each stage, and under it a progress bar. The list shows when the program starts working.
| Button | What it does |
|---|---|
| Start | Starts the creation and the transfer with no confirmation question. |
| Back | Returns to the location page. It is disabled during the run. |
| Next | Disabled: this is the last page. |
| Cancel | Before the start, asks "Are you sure you want to exit and cancel the maintenance operation?". It is disabled during the run, so you cannot stop the operation. |
What the operation does
- Connection check. The program counts the other connections to the database of the file, from other computers or from other programs on this computer. If there is more than one, the message "Database is Opened By Users :" appears with their SQL Server login names under it (not the names of the program's users), then "Please check that all users logged out then try again." The operation stops. One other connection does not stop it.
- Check of links to other systems. The program writes "Check the file relations with other modules". If the file is linked to the replication system, the profit centers system or the HR module, the message "The file is linked to another system" appears, and under it the text "Can't apply this maintenance on this file." and a line that names the system: "The file is linked to Al-Ameen Replication Manager-ARM.", "The file is linked to profit centers system" or "The file is linked to HR module". The operation stops.
- Creating the new file. The program writes the stages: "Initializing...", then "Create Database: " and its name, "Create Description File Folder", "Create basic procedures", "Create Tables", "Indexing", "Create External Keys", "Create Stored Procedures", "Create Description File". Then it records the descriptive name that you entered.
- Transferring the data. "Copying the tables data": it copies the content of all the tables of the current file into the new one, then creates the relations again ("Create External Keys").
- Auditing the new file. In the new file it recalculates the balances and prices of materials ("Audit Materials Balances and Prices"), then the balances of accounts ("Audit Accounts Balances"), then shrinks the database ("Shrink Database"). The program shows no errors of this stage.
- Copying custom fields. "Copy specified fields value if any".
- Adding the file to the recent files list under its descriptive name. The current file stays open. If the current file has scheduled tasks, "Warning: the scheduled tasks will not be transferred from current file to the new one" appears. Then "Operation successfully completed" appears.
If a stage fails after the new database is created, "An error was encountered while performing the operation." appears. The program does not delete the database it created and does not add it to the recent files list. When you try again it suggests a new database name if the first one is still on the server.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| Are you sure you want to exit and cancel the maintenance operation? | You clicked Cancel on the names page or the create page. | Yes closes the wizard. |
| Do you want to cancel Carrying Balances Forward process? | You clicked Cancel on the location page. | Yes closes the wizard. |
| File Name Missing | You chose Selected Location and left the box empty. | Type the path or click Browse.... |
| The selected folder already exists. Files must always be created in new folder … | The folder where the file will be created exists. | Choose the name of a folder that does not exist. |
| Database is Opened By Users : | More than one other connection to the database of the file exists when you click Start. The names listed are SQL Server logins. | Ask them to leave, then run it again. |
| The file is linked to another system | The file is linked to the replication system, profit centers or HR. | This maintenance cannot be applied to the file. |
| Cannot create the file to: | The program could not create the folder of the description file in the path shown. | Choose a location where you can write. |
| Warning: the scheduled tasks will not be transferred from current file to the new one | The current file has scheduled tasks. | Create the tasks in the new file. |
| Operation successfully completed | The transfer finished. | Click OK, and open the new file from the recent files list. |
| An error was encountered while performing the operation. | One of the stages failed. | Read the message before it and try again. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.