We are preparing for the «1C: Expert»

We are preparing for the

Become a «1C: Expert» — means learning to think in several other categories, to understand and «feel» of systemic mechanisms work platform 1C. What you need, we try to understand.

Workplace

A properly configured workstation — 50% success rate. Using only printed (and electronic, of course) sources, you can prepare for the exam, «1C: Expert,» and even pass it, especially if you have access to the knowledge base on technology issues [2]. But it is in fact you do not have that expertise, which implies a given certificate.

Expert on technology issues — is primarily a man capable inside to analyze complex situations that arise in the operation of heavy duty systems to ensure business continuity and compliance performance. Without practical experience to solve these problems is simply impossible.

Suffice it easy to get acquainted with the locking mechanism, transaction isolation, the basics of SQL, but to understand how it all works together, you need to practice. The workplace itself will have to provide.

This will require:

gt; Enough high-performance computer — at least 4 GB of RAM and 2 cores. It is advisable to 8 GB and 4 cores

gt; VMware Workstation (or equivalent).

gt; The Windows 2008 Server and MS SQL Server 2008 and above.

gt; Server «1C: Enterprise» and a security key to it.

gt; Corporate toolkit (1C: TRC) [3].

gt; Some typical configuration 1C. For example, «1C: Trade Management 11» and «1C: Manufacturing Enterprise Management 1.3.»

All this must be installed on a virtual machine and configured for use. Properly organized workplace is required not only to prepare for the exam, but also to carry out experiments in the future.

Experiments with server «1C: Enterprise»

Server «1C: Enterprise» — a fairly simple application. His work is difficult to influence. But some features of its operation, however, to be seen in practice. Why is that? Because an unambiguous answer to the question of what to do in any given situation, there is seldom enough. Expert tend to intervene in a situation where we are talking not about a typical work: there is no standard means 1C for the analysis of such problems.

The first thing to learn how to configure and use technology magazine

Technology magazine in 1C just meant for experts. Not to say that it is often necessary to use in actual practice. On the basis of the work include the technological log is still not recommended. Is that at the beginning of the operation — to write exceptions.

To investigate the «fall» of the server 1C useful full, but if the error can not play in a test environment, then, as a rule, it is possible to localize and detect without the use of a magazine. But at least for the exam need to deal with it. The simplest thing you can do for it — download from the disc or site 1C: ITS processing «Setting Technology Magazine,» which allows you to generate various configuration files technological log (logcfg.xml). They can «slip» (placed in the directory conf) 1C server and see what is written in the output file. The file itself technological log settings can be viewed in a text editor. I think, in its structure, you will understand quite quickly.

Very helpful «drop» server 1C in any way (for example, putting in a request for selection of a subquery of the above), and understand the technological magazine, in which the module was made and where the code that led to the «fall» of the server.

«Drop» server 1C and see what would happen

The main experiment with the server «1C: Enterprise» — of course, to check how it behaves in difficult situations. To do this, at least need to run multiple workflows (hereinafter it comes to server «1C: Enterprise 8.2» in 1C 8.3 server has undergone significant changes). Ideally it needs to run a virtual machine on which the server is «1C: Enterprise» for the second time and add it to the cluster.

Then you can start the game. You start with 30-40 clients per cluster 1C. Observe how they are redistributed by the workflow. Through the Task Manager «kill» one worker process.

See what happens with customers and what processes will take place in the operating system (which process will begin to consume memory and CPU time at least). The more run client connections, the more interesting things you can learn. Here comes the understanding that the most important process server 1C — it rpmngr (cluster manager server 1C), and that its work depends on «our happiness and well-being.» I personally after all these experiments came to the firm conclusion that the workflow 1C (rphost) on the server should be the one to exclude the increased likelihood of malfunctions rpmngr. Of course, you can make your own conclusions.

Perform tests to recommend different numbers of users and with different variants server crashes. Run any number of user sessions can be, for example, using «standard load test» (CSP), which is included in the 1C: TRC. It is also highly desirable to cause the server to crash from memory leaks to understand how it happens, how the slow down and how to deal with it. Make it easy — just in any document to add a link to it and also to rewrite these documents many times. At the same time, you can still turn on the technological log and see in it the event LEAKS.

Experiments with MS SQL

Locks — this is perhaps the most necessary and important part of the exam will ask it clearly, but in real life from excessive locks usually is the highest number of problems in a multi-user system, and these problems are often hesitant to increase the capacity of equipment.

Before you start to experiment, be sure to read the article «blocking of data in» 1C: Enterprise 8 «[4], who have access to the knowledge base 1C on technology issues, or [5] — an alternative source of this article. Even I recommend reading my article «What are blocking» [6] Online infostart.ru. so the theory and purpose of the lock will not write. Let us just to experiment.

Actually, you need to check here the table (see. Table 1).

Table 1. Data Lock

Isolation level -Read uncommitted

Dirty read Yes, Nonrepeatable read Yes, Phantom Yes

Isolation level -Read committed

Dirty read No, Nonrepeatable read Yes, Phantom Yes

Isolation level -Repeatable read

Dirty read No, Nonrepeatable read No, Phantom Yes

Isolation level -Snapshot

Dirty read No, Nonrepeatable read No, Phantom No

Isolation level -Serializable

Dirty read No, Nonrepeatable read No, Phantom No

You can not check the isolation level Repeatable read, as in «1C: Enterprise», this isolation level is used. 1C uses isolation level Read commited, and 1C 8.3 has finally the transition to the isolation level Snapshot. First, create a database in which to conduct experiments with the command:

Create Database TestDB

Now create a table that will block:

CREATE TABLE TestTable (

ID int NOT NULL,

Value nvarchar (10))

In the table you need to add at least one line that we will block or modify: insert into TestTable values ​​(1, ‘strl’)

Next you need to open a second session of Management Studio (as you install it, and carried it up scripts from it, right?)

Now, in a single session, write about the following structure: use TestDB; set transaction isolation level Serializable begin transaction update TestTable set Value = ‘str2’ where ID = 1 commit on the other, respectively: use TestDB; set transaction isolation level Serializable begin transaction

Select * from TestTable Commit

Then you start debugging (the button Debug) in the first session and stay at Commit, and the second … he stops. What should happen, look at Fig. 1.

In this figure, MS SQL-Server is waiting on a lock.

At this time, you can run the third session MS SQL and execute any code it: exec sp_lock

A significant result is this: spid dbid ObjId IndId Type Resource Mode Status

52 9 245575913 0 TAB IS WAIT

55 9 245575913 0 TAB X GRANT

The first line shows that the transaction is waiting for a resource (IS — attempt to install a shared lock), the second — the fact that this resource is already set exclusive (X) lock.

And now I have one word in the code. Replace Serializable to Read uncommitted, and no stops will not be blocked. The most difficult level and insulation Read commited Snapshot. But this can be a separate article to write, the more that their behavior has changed from version to version of MS SQL Server.

And where is 1C, if while we were talking only about the MS SQL Server? In 1C experiments should be conducted under the same scenario:

gt; open two sessions in one database 1C;

gt; connect to both the debugger;

gt; put a breakpoint somewhere in the end of the module of the document that you want to explore;

gt; conduct of both sessions. «Stuck» is, if not to block, then breakpoint exactly;

gt; using sp_lock to get the name of a locked table.

sp_lock return object_id, both saw above. To get the name of the table, you need to perform design Select OBJECT_NAME (objectid). This structure must be called when set to use (use DatabaseName) of the database table is locked.

But this, of course, is the name of the table in terms of MS SQL Server. The expert has to get used to translate the names of the tables in terms of metadata objects. 1C is a function Get the storage structure database, which returns the matching table names MS SQL (as with other DBMS) and metadata objects 1C. For this function, the community has developed the interface, and not even the only one. An example of the most successful of them can be viewed at infostart.ru [7]. And, of course, you have to try to guess which tables are locked without the aid of this interface. Simply remember the structure of storage tables in the database 1C. Especially that for successful exam this information is not hurt. The description can be found, for example, here [8].

***

This, of course, not all the information you need to know to solve really complex technological questions, but after carrying out some experiments described here, you will feel much more confident in these matters. It is better to try once than read a hundred times.

1. http://www.1c.ru/rus/partners/training/files/exDert.html — recommended materials to prepare for the exam, «1C: Expert» online 1C.

2. http://kb.1c.ru — knowledge base on technological issues of major deployments 1C.

3. http://v8.1c.ru/expert/etp.htm — 1C: TRC (Corporate toolkit).

4. http://kb.1c.ru/articleView.jsp?id=30 — data lock in «1C: Enterprise 8».

5. http://1cexpo.ru/informacziya/27-blokirovki-dannyx-v-1spredpriyatii-8.html — an alternative source of articles about the data lock in «1C: Enterprise».

6. http://infostart.ru/public/91880 — article «What are the lock.»

7. http://infostart.ru/public/147147 — storage structure 1C.

8. http://help1c.com/faQ/view/673.html- description of the structure of storage tables 1C.

Like this post? Please share to your friends: