Database Management
By default, all database files will be stored to the SQL Server installation folder. You can view or change the location of data in the Object Explorer of MS SQL Server Management Studio (SSMS).
To View or Change the Default Locations for Data and Log Files
1.Open MS SQL Server Management Studio (SSMS)
2.In Object Explorer in the left panel, right-click on your server and select Properties.
3.In the left panel on that Properties page, click the Database settings tab.
4.In Database default locations, view the current default locations for new data files, new log files, and backups. To change a default location, enter a new default path name in the Data, Log, or Backups field, or click the browse button to find and select a path name.
Note: After changing the default locations, you must stop and start the SQL Server service to complete the change.
To Move a Database to Another instance of SQL Server
You can move a PHDwin database from one instance to another by creating a @transfer file . Once the database has been successfully moved, you can delete it from the original instance of SQL Server.
To Delete a Database
You cannot delete a PHDwin database through the application, you must go to MS SQL Server Management Studio. Once the database has been deleted, it can not be recovered unless you have a backup or copy of the database.
1.Open up MS SQL Server Management Studio (SSMS) – this is an interface to manage all SQL databases. It may have been installed when you installed SQL (you can choose to add features upon installation). If SQL was installed on the server, not your local computer, or if you think it was not installed, you can search for the download file online.
2.Login to the server and instance of SQL where you created the PHDwin database.
3.By default, on the left-hand side of SSMS, there will be an Object Explorer, hit the plus button next to Databases to expand and see them all.
Note: Do not ever delete the PhdReports database unless you are planning to reinstall the entire program.
4.Right-click on the database and hit Delete.
To Delete Multiple Databases at Once
1.Open up MS SQL Server Management Studio.
2.Log in to the server that you’ve been using to create PHDwin databases.
3.On the left you will see the Object explorer, highlight Databases.
4.Press F7 on the keyboard to open the Object Explorer Details.
5.Select all of the PHDwin databases by using CTRL+ Click to highlight them all. All databases created by the application will begin in “Phd_”.
6.Right-click on any of the databases you’ve selected and then choose Delete.
To Remove a Database from the List on the Login Screen
If you don’t want a database to show up in the list when you log in to PHDwin, you can do one of two things.
1.Delete the database in MS SSMS. If you’d like to save a copy first, you can create a backup or @transfer file.
2.Rename the database using SQL Server Management Studio. When you create a database in PHDwin, the application will prepend “Phd_” to the database name. Upon login, the PHDwin application filters the list of databases that you can log in to by selecting the ones that begin with “Phd_”. If you do not want to delete a database, but you would like to remove it from the available list, you can remove the “Phd_” from the beginning of the name.
Renaming Databases
Renaming databases in management studio is not recommended unless you are an advanced user of MS SQL Server Management studio.
If you do rename a database in management studio, it only renames the database, not the physical files. This can be confusing, because the database name may not match the physical file names. You can view any files for a database in Management Studio by right-clicking on the database name, selecting Properties, and going to the Files tab.
If you try to create a PHDwin database with the same name as any existing physical database files, you will get an error.