Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come risolvere l’errore di stabilire una connessione al database in WordPress

Viene visualizzato l’avviso “Errore nello stabilire una connessione al database” in WordPress?

Si tratta di un errore fatale che rende il sito inaccessibile agli utenti. Si verifica quando WordPress non è in grado di stabilire una connessione al database. Poiché diversi fattori possono influire su questa connessione, l’errore può essere un po’ difficile da risolvere per i principianti.

In questo articolo vi mostreremo come risolvere facilmente l'”Errore nello stabilire una connessione al database” sul vostro sito WordPress, passo dopo passo.

Fix the Error Establishing a Database Connection in WordPress

Cosa causa l’errore di stabilire una connessione al database in WordPress?

Un database è un software che facilita l’archiviazione, l’organizzazione e il recupero di dati da altri software.

Come sistema di gestione dei contenuti, WordPress utilizza un database per memorizzare tutti i contenuti e gli altri dati del sito web. Si connette quindi al database ogni volta che qualcuno visita il vostro sito web.

WordPress ha bisogno delle seguenti informazioni per connettersi al database:

  • Il nome del database
  • Nome utente e password del database
  • Server di database

Queste informazioni sono memorizzate nel file di configurazione di WordPress, chiamato wp-config.php.

Se una di queste informazioni non è corretta, WordPress non riuscirà a connettersi al server del database e verrà visualizzato l’errore “Errore nello stabilire una connessione al database”.

Database connection error in WordPress

È uno degli errori più comuni di WordPress. Oltre alle credenziali errate, questo errore può comparire anche se il server del database è inattivo o i file del database sono corrotti.

Detto questo, vediamo come risolvere il problema “Errore nello stabilire la connessione al database” in WordPress con una risoluzione dei problemi passo dopo passo.

1. Controllare le credenziali del database di WordPress

Il motivo più comune per cui si verifica un errore di connessione al database è la presenza di credenziali errate. Se avete recentemente spostato il vostro sito WordPress su un nuovo host, è probabile che il problema sia questo.

Le credenziali del database di WordPress sono memorizzate nel file wp-config.php. È il file di configurazione di WordPress che contiene importanti impostazioni, tra cui le informazioni sul database.

Se non avete mai modificato un file wp-config.php, date un’occhiata alla nostra guida per principianti su come modificare il file wp-config.php per maggiori istruzioni.

Si cercheranno le seguenti righe nel file wp-config.php:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

In questo caso, è necessario assicurarsi che le informazioni relative al nome del database, al nome utente, alla password e all’host del database siano corrette.

Potete confermare queste informazioni dalla dashboard del vostro account di hosting WordPress. Per questo tutorial utilizzeremo Bluehost, ma la procedura sarà simile anche per altri pannelli di hosting.

Una volta effettuato l’accesso, fare clic sulla scheda “Sito web” nella colonna di sinistra e poi passare alla scheda “Avanzate”. Quindi, scorrere fino alla sezione “Database” e fare clic sul pulsante “Gestisci” accanto ad essa.

Click the Manage button next to the Database section

In questo modo si aprirà la pagina dei database MySQL in cPanel in una nuova finestra.

Qui, nella sezione “Database corrente”, si trovano il nome del database e il nome utente. Ricordate di copiare e incollare questi dati in un blocco note per poterli aggiungere al file wp-config.

Find your database name and username in the Current Databases section

Quindi, scorrere fino alla sezione “Utenti attuali”, dove è possibile fare clic sul link “Cambia password” accanto al nome del database.

Si accede così a una nuova schermata, in cui è possibile modificare la password del database secondo le proprie esigenze.

Change your database password

Una volta confermati tutti i dettagli del database, è possibile modificare le informazioni nel file wp-config.php, se necessario.

Quindi, provare a visitare nuovamente il sito web per verificare se l’errore di connessione al database è scomparso.

Se l’errore è ancora presente, significa che c’è qualcos’altro che non va.

2. Controllare le informazioni sull’host del database

Se si è certi che il nome del database, il nome utente e la password siano corretti, occorre assicurarsi di utilizzare le informazioni corrette sull’host del database.

La maggior parte delle società di hosting WordPress utilizza localhost come host del database. Tuttavia, alcune società di hosting WordPress gestite utilizzano server separati per ospitare i database. In questo caso, le informazioni sull’host del database non saranno localhost.

Ciò significa che dovrete contattare la vostra società di hosting WordPress per confermare questi dettagli.

3. Riparazione del database di WordPress

Ora potreste ricevere un errore diverso nella dashboard di wp-admin, come “Una o più tabelle del database non sono disponibili” o “Potrebbe essere necessario riparare il database”. In questo caso, è necessario riparare il database.

È possibile farlo aggiungendo la seguente riga nel file wp-config.php. Assicuratevi di aggiungerla subito prima della riga “Questo è tutto, smettete di modificare! Buon blog”:

define('WP_ALLOW_REPAIR', true);

Una volta fatto ciò, è possibile vedere le impostazioni visitando questa pagina: http://www.yoursite.com/wp-admin/maint/repair.php. Assicuratevi di sostituire yoursite.com con il vostro nome di dominio.

A questo punto, è necessario fare clic sul pulsante “Ripara database” per avviare il processo.

Repair WordPress database

Nota: non è necessario che l’utente sia connesso per accedere alla pagina di riparazione del database. Una volta terminata la riparazione e l’ottimizzazione del database, assicurarsi di rimuovere questa riga di codice dal file wp-config.php.

Tuttavia, se non volete aggiungere alcun codice al vostro sito, potete anche riparare il database dal pannello di controllo del vostro account di hosting.

Visitate il vostro account di hosting e aprite la pagina “Siti web” dalla colonna di sinistra. Quindi, passate alla scheda “Avanzate” e fate clic sul pulsante “Gestisci” nella sezione Database.

Click the Manage button next to the Database section

Si aprirà cPanel in una nuova scheda. Qui, scorrere fino alla sezione “Modifica database” e scegliere il nome del database dal menu a discesa “Ripara database”.

Una volta fatto ciò, è sufficiente fare clic sul pulsante “Ripara database” per avviare il processo.

Click the Repair database button

Il pannello di hosting riparerà automaticamente il database.

Una volta completato il processo, verrà visualizzato un messaggio di successo.

Database repair success message

Ora potete visitare il vostro sito WordPress per vedere se l’errore è stato risolto o meno.

4. Controllare se il server di database è inattivo

Se tutto sembra essere corretto e WordPress non riesce ancora a connettersi al database, è possibile che il server del database(server MySQL) sia inattivo.

Questo potrebbe accadere a causa del traffico intenso su un server. Il vostro server host non è in grado di gestire il carico (soprattutto se avete un hosting condiviso).

Per questo motivo, il vostro sito diventerà lento e potrebbe anche dare errore ad alcuni utenti. In questo caso, dovreste telefonare o chattare con il vostro provider di hosting e chiedere se il vostro server MySQL è reattivo.

Inoltre, se sullo stesso server sono in esecuzione altri siti web, è possibile selezionare questi siti per verificare che il server SQL sia giù.

Se non avete altri siti sullo stesso account di hosting, andate semplicemente nel vostro cruscotto di hosting e passate alla scheda “Avanzate”.

Successivamente, fare clic sul pulsante “Gestisci” accanto alla sezione phpMyAdmin.

Click the Manage button next to the PHPMyAdmin option

Si aprirà phpMyAdmin in una nuova finestra, dove si dovrà fare clic sull’opzione “Database” in alto.

Quindi, fare clic sul nome del database per accedere alle sue impostazioni. Se ci riuscite, è il momento di verificare se l’utente del database ha i permessi sufficienti.

Connect PHPMyAdmin with your database

Per farlo, occorre creare un nuovo file chiamato testconnection.php e incollarvi il seguente codice:

<?php
$link = mysqli_connect('localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysqli_error());
}
echo 'Connected successfully';
mysqli_close($link);
?>

Dopo aver incollato il codice, assicuratevi di sostituire il nome utente e la password con i vostri. Ora è possibile caricare questo file sul proprio sito web e accedervi tramite un browser.

Se lo script si è collegato correttamente, significa che l’utente dispone di permessi sufficienti e che l’errore è causato da qualcos’altro.

Ora è necessario tornare al file wp-config e analizzarlo per assicurarsi che tutti i dettagli siano accurati e senza errori di battitura.

Altre soluzioni che hanno funzionato per gli utenti

Se i suggerimenti per la risoluzione dei problemi di cui sopra non riescono a risolvere l’errore di connessione al database sul vostro sito web, potete provare questi ulteriori passaggi.

Come riportato dai nostri utenti, questi passaggi hanno aiutato alcuni di loro a risolvere l’errore di connessione al database sui loro siti web.

1. Aggiornare l’URL del sito WordPress

Potete provare ad aggiornare l’URL del sito WordPress utilizzando phpMyAdmin in cPanel.

È sufficiente accedere a phpMyAdmin dalla dashboard dell’account di hosting e selezionare il database di WordPress dall’elenco.

Quindi passate al menu SQL in alto e inserite la seguente query MySQL:

UPDATE wp_options SET option_value='YOUR_SITE_URL' WHERE option_name='siteurl'

L’aspetto dovrebbe essere il seguente:

Change site URL

Non dimenticate di fornire l’URL del vostro sito e di cambiare wp_options con il nome della vostra tabella, poiché potreste aver cambiato il prefisso della tabella di WordPress.

2. Riavvio del server Web

Gli utenti di server dedicati, server locali e server privati virtuali (VPS) possono provare a riavviare i loro server.

In questo modo si riavvia il server web e il database, che potrebbe risolvere alcuni problemi temporanei che causano l’errore.

3. Chiedere aiuto

Se tutto il resto non funziona, potrebbe essere necessario contattare la società di web hosting. Tutte le buone società di hosting WordPress vi aiuteranno a risolvere il problema, vi indicheranno la direzione giusta o addirittura lo risolveranno per voi.

Potete anche assumere sviluppatori WordPress utilizzando una piattaforma come WPBeginner Pro Services per aiutarvi a correggere questo problema a prezzi ragionevoli. Abbiamo un team dedicato di sviluppatori esperti di cui potete fidarvi per correggere qualsiasi problema di WordPress.

WPBeginner Pro Services

Inoltre, è possibile utilizzare il servizio per la manutenzione del sito, la riparazione di siti violati, l’ottimizzazione della velocità, la ricostruzione del sito web e l’ottimizzazione SEO.

Speriamo che questo articolo vi abbia aiutato a risolvere il problema “Errore nello stabilire una connessione al database” in WordPress. Potreste anche voler consultare la nostra guida alla risoluzione dei problemi di WordPress per avere suggerimenti su come risolvere i problemi di WordPress da soli, oppure la nostra selezione di esperti dei migliori strumenti per freelance e sviluppatori di WordPress.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

663 commentiLascia una risposta

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Edmundo Rubio

    Thanks it work.

  3. viraj

    Thank you, it worked for me while connecting database from phpmyadmin.

  4. Tom

    I’m trying to install wordpress on my local pc running window 10. I have installed Xampp, made all the changes to use port 8080. No problem starting Xampp. No problem starting Apache or Mysql. I can open phpmyadmin from the admin button without problem and was able to add a database. if I enter http://localhost:8080 it brings up the Xampp page. However when I enter http://localhost:8080/wp to install wordpress the web page times out, but does nothing. I extracted the wordpress files into the htdocs folder and made the changes to the wp-config.php file to use localhost:8080.
    At this point I have no other idea what to do to get the install done and could really use some help.

    • WPBeginner Support

      Hi Tom,

      You will need to copy paste WordPress files in /htdocs/wp/ folder instead of /htdocs/ folder.

      Admin

  5. Jude

    Unable to install word press on godaddy. Won’t even complete the installation. “Application has Errors”. – Need it urgently!! Please help

  6. Shubham Tiwari

    Hello WPBeginner,

    I am currently running Viral Website. Many viral websites have some plugins. I am attaching link of the screenshot Here

    In viral website niche, we need to see how many real time users are there on a particular story because, to see the viralness of new stories we need to see the real time users for a post. We use Google Analytics but Data Mining is too hard in google analytics to see if our story is going viral or not. By looking at the real time users for a particular story, we make conclusions that which of our story is going viral on social media.

    Can you please provide me details? How can i show my Live story readers on the story/article page. I want my users to see how many live users are reading this particular story.

    Is there any script code or any plugin for this type of feature?

  7. Richard

    Brilliant, this guided towards me getting this fixed!! Also had to change upload a new wp-settings.php file.

    Thanks

  8. Destiny

    To allow use of this page to automatically repair database problems, please add the following line to your wp-config.php file. Once this line is added to your config, reload this page.

    define(‘WP_ALLOW_REPAIR’, true);

  9. Ben Horle

    Massive thank you! 1st task fixed my site!

  10. Denis

    Thanks!!! Thanks to you my site work again!
    Happy

  11. Mike

    Had this error trying to install WP at home for testing on Windows laptop. Tried everything and then noticed that my character set in the wp-config.php file where i defined the parameters for accessing the database contained characters that were not standard. The apostrophe character was not the standard windows font character. Once i replaced and made them all the same character WP installed without issue.

  12. Nirav Jagad

    please someone connect my computer with teamwork and resolve my problem
    Error establishing a database connection

    • Bas Dost

      I have the same problem.
      Let me know if you have any suggestions.
      Thanks.

  13. ivano

    Worked for me by replacing “localhost” withe the IP you provided. Thank you!

  14. Michael

    [SOLVED] My databases were all working fine – turns out the problem was the password itself. The password contained three symbols &(= which I guess was messing with PHP. I’m not the best in PHP but I suspect the problem was with the symbol “=”. So once I changed the password, it worked just fine. Good luck, hope this helps.

  15. Wills Perkins

    Thanks guys, you’ve saved me from having a melt down

  16. murad

    Thanks. Solved my problem.

    • irnem

      What exactly helped? I checked everything – still doesn’t work. In the section “Check your Web Host (MySQL Server)” they are talking about testconnection.php file, what should I do after I created it and put on WP dir? how can i run this code? (sorry, i’m a beginner in this area)

  17. Ash

    What also can be really handy! Especially if you use WordPress on IIS6/7/8 on Windows Server.. Check if the MySQL service is running.. And also if it is running on the correct user account! Normally this should be just the Local System!

  18. Gwyneth Llewelyn

    Even those who are not exactly absolute beginners to WordPress get often stumped by this error! Thanks to your systematic approach, I managed to track down the ‘error’ in my installation — a corrupt MySQL database, which was anything but apparent, since all tables seem to be in the right place, and checking/optimizing them would give no errors… but clearly there was something very, very wrong.

    Dumping the database and re-importing it from a backup did the trick!

    Thank you so much :)

  19. Jeff

    Thank you so much for writing this and all of the comments. My site was fixed by replacing the line
    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘[some random numbers and letters]’);

    with
    /** MySQL database password */
    define(‘DB_PASSWORD’, [my usual wp-admin login password]’);

    Not sure if this is correct way to fix it but it did work.

  20. Brett

    I went back into my cpanel and re-inputted the same passwords for my 2 of 4 sites that weren’t working and that got them back up and running.

  21. STANISLAUS

    I am glad I was able to fix this issue on my site after 4 days. In my own case it said the wp-option table crashed. And I ran the repair, the result showed it was not successful but in actual sense, it was repaired.

    After I got that unsuccessful repair message, I initiated a like chat with my service provider but they checked the site and informed me that that my site was alive and I was happy.

    Thanks

  22. Jigar Shah

    I did tried all the above solution . But nothing worked out for me .
    Then I tried looking @apache logs . It was brute force attacks against xmlrpc.php from crashing my WordPress server.
    The simple solution that worked for me was to block the IP’s
    I found out here

  23. rahul

    My wordpress website is running but after some time it shows an error “Establishing database error” then i have to start “service mysqld start” please help me so that this type of error not come again. thanks

  24. Kristaps

    Thanks, i tried some things, but in the end, i found out, that my config file, generated random password, when i actually changed it to specific password.

  25. Jill

    This was so helpful. This along with people’s comments/experiences would be quite a handy resource or guide. I’ve noticed a few job posts for WordPress error testers and started researching and found this page.

  26. Lothre1

    Hello guys. Just because this is the first page of google on this subject I’m complementing the information. In my case i downloaded my wp-config from my prod website. At the end of the file right after “define(‘WP_DEBUG’, false);” i had the following configuration.

    define( ‘WP_ALLOW_MULTISITE’, true );
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    define(‘DOMAIN_CURRENT_SITE’, ‘MYDOMAIN.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);

    I tried to keep everything as it was but I replaced the mydomain.com with my ip + port.
    An hour later I realize that commenting the lines below fixed the problem:

    //define(‘MULTISITE’, true);
    //define(‘SUBDOMAIN_INSTALL’, false);
    //define(‘DOMAIN_CURRENT_SITE’, ‘MYDOMAIN.com’);

  27. Karina Jaramillo

    I tried logging in to maintain site but I get this error “Error establishing a database connection”. I also get that error when trying to access wp-admin. Nothing has been changed on our end. Help!

  28. Shirley

    Help!
    We get an error message on our wordpress for “Error establishing a database connection:
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    We’re puzzled how this happened. If you can help, that would be great. Thank you.

  29. jabr

    Thanks a lot. you really helped me get my website back to work

  30. SAMUEL

    Please, am having problems operating my wordpress dashboard. I have been updating my website through my dashboard for some days now. But just yesterday i began to receive this message…… Fatal error: Cannot call overloaded function for non-object in /home/content/n3pnexwpnas01_data02/34/3566434/html/wp-includes/capabilities.php on line 448……..can anyone tell me what to do or what was the cause of this plssssss.
    Sam.

    • WPBeginner Support

      Most likely this issue is caused by a WordPress plugin. Try these WordPress troubleshooting tips to find out the culprit.

      It is also possible that the error is caused due to incompatibility with the PHP version. Ask your WordPress hosting provider about the PHP version they are using and see if they can upgrade it. The minimum requirement is PHP version is 5.6 or greater for WordPress.

      Admin

      • SAMUEL

        thanks a lot, i only change the theme and that fix it, i so much appreciate.

        • WPBeginner Support

          Hey Samuel, we are glad you found it helpful :) Don’t forget to join us on Twitter for more WordPress tips and tutorials.

  31. Elijah

    I’m also having the same problem but mine is so terrible because I can’t access my cpanel. Please what should I do?

  32. James R

    After looking at this page and thinking “I have no idea what I’m doing”, I just rebooted the server and now everything’s hunky-dory again. Any idea why that was the case?

    The only thing I can think of that may have caused it is that I lost my internet connection whilst logging in, but why should it?

  33. Davo C

    THANK YOU VERY VERY MUCH. Had a corrupt db user, would have had no clue without this article.

    Life saver.

    Davo

  34. Sat

    When I cloned my MySQL database for setting up a staging site I received the same error. I found out that the MySQL user setup for the WP to access the database needs to be given permission to access the database through the CPanel -> Mysql databases -> add a user to the database option. Otherwise, you will get “Error Establishing a Database Connection” issue when trying to access the admin page through the URL.

  35. Anoop Arya

    Error establishing database connection .

    I did not work after trying few steps. I thought let’s wipe out all the information. S o reset MySQL deta base . Uploaded new WordPress. Now still it days error establishing database connection .any help and suggestions

  36. Ademide

    The second fix worked.
    Thank you so much.

  37. Karen

    This worked for me, thanks. I moved a five domain multisite with very little trouble. The only tweak was to the table_prefix of the database tables. For some reason mine weren’t prefixed with wpcc- . This was easily edited in wp-config.php. After that I had to do some wrangling with tech support to point the subdomains at the directory where wp was installed. They couldn’t understand why I’d want all of them pointing at the same place. Once they had given in and done as I asked it all worked fine.

  38. Manohar

    Thank you for providing this useful informatrion

  39. Emmanuel

    Thanks a whole bunch, You really saved my day

  40. Jeroen Thans

    I had the same problem,

    i also got after a restore from backup an error: Error establishing a database connection

    i checked the database with phpmyadmin under the database for wordpress and then wp_options. And there was no sign of something called siteurl

    So i pressed insert -> option_id = 1
    Option_name = siteurl
    Option_value = http://www.example.com

    and added it. Then went back to the website http://www.example.com/wp-admin and i could restore it

    hopefully it helps.

    Greetz J

  41. JCMill

    *Update to my earlier comment*

    I tried generating & applying new passwords via cPanel. On 3rd pw change I still got the can’t load the DB error but it allowed me to run the WP Repair.php !
    Everything showed as OK.

    Now the site is back.

    Highly irritating & weird.

  42. JCMill

    I just started seeing this error. None of the above works :(
    Also tried renaming the DB, & running the ‘check’ & ‘repair’ options in cPanel = ‘OK’ on all elements.
    I can access & edit the DB via phpmyadmin.
    wpconfig is byte for byte identical to my original (then working) backup.

    The testconnection.php has revealed this –
    ‘Could not connect: Connection using old (pre-4.1.1) authentication protocol refused (client option ‘secure_auth’ enabled)’

    Any ideas appreciated.

  43. Bim

    I seem to encounter the error on all other the pages except the main page. The main page loads fine but when i click a link to open another page that’s when I get the database connection error.

    Has anyone encountered this? Aren’t all the pages including the main page use the same database connection?

    • WPBeginner Support

      May be you are seeing a cached version of your main page? If not, then contact your web hosting service provider.

      Admin

  44. sohanpurohit

    Error 404 error403 same prob,how do repairinp this prob?

  45. djack

    it works inmediately after put the ip i’m receiving from the router 192.168.5.8 in my particular case.

    localhost, 127.0.0.1 weren’t working.

  46. David Draper

    I copied a PHP script I found online called testconnection.php. The script captures and echos the connection error. I ran the script from the command line using ‘php -f testconnection.php’. The error told me that there was a problem reading the mysql.sock file. When I checked the indicated location, there was no mysql.sock file. I created an empty file called mysql.sock in the indicated location using touch and ‘Voila!’ everything has worked fine since.

  47. SriMarv

    I had the same problem on my site too, i only changed the line for DN Host to

    define(‘DB_HOST’, ‘localhost’);

    in the config file, it was pointing to an IP address which happened to be the one for the cpanel.

  48. sudheer

    Please fix my issue. I am trying to restore a database backup from mysql server, But restore fails the following error32 will persists.

    TITLE: Microsoft SQL Server Management Studio
    ——————————

    Restore of database ‘PROD_SALES_DATABASE’ failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

    ——————————
    ADDITIONAL INFORMATION:

    System.Data.SqlClient.SqlError: The operating system returned the error ’32(The process cannot access the file because it is being used by another process.)’ while attempting ‘RestoreContainer::ValidateTargetForCreation’ on ‘C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\PROD_SALES_DATABASE.mdf’. (Microsoft.SqlServer.SmoExtended)

    For help, click:

    ——————————
    BUTTONS:

  49. Barbara

    Thank you so much : it worked instantly !!!
    Cheers
    Barbara

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.