Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

"Database is being accessed by other users" - how to use the database manager GUI?

Odebírat

Get notified when there's activity on this post

This question has been flagged
4 Odpovědi
25011 Zobrazení
Avatar
Peter Nietz

I installed a fresh Odoo and created a DataBase, installed all modules I need and made the admin an admin.

Now I want to duplicate this db, but I always get "Database is being accessed by other users".

How can I duplicate a database with the database manager GUI of odoo?

If I stop odoo service the simple line of sql does the job:

CREATE DATABASE whatever_db WITH TEMPLATE base_deb OWNER db_owner;

If it isn't possible without entering a console, what use does this function have at all?

Thx Peter

0
Avatar
Zrušit
Avatar
Ludo - 21South
Nejlepší odpověď

This is due to postgres keeping track of the connections, even if they are not closed correctly (just killing the browser for example). Probably the thing to do is restart Odoo. Right after that, the connections should be gone and you should be able to duplicate.

For some mysterious reason it sometimes works over here after pressing the button multiple times. I am clueless as to why that is.

By the way, the client-dump of the database is not always fool-proof we have found out. I still rely on the pg_dump, if only to ensure the type of dump and the other options such as the no-owner flag. Furthermore, when using legacy postgres to update to a new postgres, the client will not do the job correctly.

1
Avatar
Zrušit
Avatar
Nirav Jani
Nejlepší odpověď

Hello

You Can restart postgres service.
 

0
Avatar
Zrušit
Peter Nietz
Autor

with postgres I know what to do ... stop odoo, enter postgres, duplicate ... but that's not using the database manager of odoo! And what use of a database manager if I have to restart the underlying database?

Nirav Jani

you can use this command: ps -ax | grep server. you get list process name. then you kill process the command is : kill -9 [proces_name].

Peter Nietz
Autor

thx, I know how to do this, of you can use top or htop or whatever! but how to do it WITHOUT ENTERING THE CONSOLE? If I use the console, there is no use of the database manager gui of odoo!

Avatar
Rui Andrada
Nejlepší odpověď

That is a good question and I guess there's no answer for that, no answer like you want.

Like you want, only wait for Oddo disconnect from db and after you can do database operations.

After some time testing and using Odoo, I think the "database manager" feature needs more work.

I can only do database operations after use SQL query to postgresql disconnect any user from specific database which I'll work.
Here the query useful sometimes, to kill connections: 

SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'database_name'
  AND pid <> pg_backend_pid();

Change 'database_name' for your needs and all connections to db will be closed.

 

0
Avatar
Zrušit
Peter Nietz
Autor

thx ... if I stop odoo, the simple line CREATE DATABASE whatever_db WITH TEMPLATE base_db OWNER username; works for me ...

Rui Andrada

If you are in multi user environment you'll need this query. You'll execute query CREATE DATABASE..TEMPLATE, why not execute before and kill all connections to specific db? Thanks for your comment.

Rui Andrada

I give to you the only answer as you ask for, you don't need to enter in console you only need psql or any connections to postgresql.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now