When I register a sole proprietorship in Denmark and then as the sole proprietor sign a contract for providing software development services for business partner and in this contract it's written that all copyright for created content during execution of the contract should be passed to the business partner, is the copyright automatically passed from the me as the natural person to my sole proprietorship so it can be passed to the business partner according to the contract?
The comments and another answer address the question of whether the copyright is indeed transferrable from the true author of the work to you or a third-party under Danish copyright law.
But, whether or not this is the case, the distinction you make between a sole proprietorship and you individually is not a distinction that obviously exists. Generally speaking, a true sole proprietorship is you as an individual, so anything that the sole proprietorship owns is owned by you individually.
Normally, your registration as a sole proprietorship would simply authorize you to do business, either in your own name, or under a trade name, without giving rise to a separate legal entity that is separate from you. This is what "sole proprietorship" means in English.
While many countries in continental Europe, and no doubt Denmark among them, do require "merchants" to register with authorities and to follow certain practices with respect to their business income and expenses and banking (such as depositing all revenues into a single business account disclosed to authorities), these requirements don't actually give rise to a truly separate entity or divest you as a sole proprietor of ownership of the sole proprietorship's property (unless, of course, "sole proprietorship" is an inapt translation of some form of true limited liability entity with a single owner).
It is going to depend on the wording of the agreement.
According to the FAQ on Copyright for Denmark from the EU Intellectual Property office (EUIPO):
Copyright always originates in the natural person who has created the literary or artistic work. Many copyrightable works are created in the course of employment. For instance, a daily newspaper employs journalists to write articles for the newspaper. In such a situation, the copyright originates in the individual journalist, who then owns the copyright. However, it would be an untenable situation if the daily newspaper had to ask the journalists’ permission to publish their articles in the newspaper. Therefore, the courts have created a rule according to which copyright on works created in the course of employment is transferred to the employer to the extent necessary for the ordinary running of the employer’s business. In other situations, the assignment of copyright from one person to another requires an agreement. For instance, when a person has commissioned an artist to make a painting, and has received the painting and paid for it, copyright in the painting still remains with the artist. Many authors, in exchange for remuneration, enter into agreements on the assignment of their rights with commercial entities, which are more able to exploit the value of the works in the market. Thus, authors often assign copyright in their manuscripts to publishers, and composers assign copyright to phonogram producers, etc.
Initially copyright will be held by the content creator. An agreement could transfer it directly to a business associate, or to a company or entity owned by the creator.
The question seems to envisage a situation in which copyright is first passed to the entity (sole proprietorship) and then to the business associate. I suppose an agreement could set up such a situation, but I see no value. In any case the copyright will be initially owned by the natural person who created thye work, if I understand Danish copyright law correctly. It can then be transferred by a separate later agreement, or automatically by a pre-existing agreement. The terms of such an agreement govern, provided that they are not contrary to law.
Moreover, this only makes sense if by "sole proprietorship" the OP means some sort of legal entity such an an LLC with a single owner. But as the answer by ohwilleke explains, that is not the normal meaning of the term "sole proprietorship" in legal English.
Unlike US law, in Danish law the initial holder is never a company or othr entity, it is always a natural person. This is true in most EU countries, perhaps in all of them. Some EU countries (particularly Germany) do not permit the transfer of copyright at all, but do permit granting an exclusive license, which has most of the same effects. Others permit transferring copyright ownership, but not authorship nor the moral (as opposed to economic) rights that go with authorship. This is the case with Denmark.
In the US, unlike the EU, it is possible for the copyright to be initially held by the employer or commissioning entity, and for that entity to be legally the author.