-
Database composition: sqlserver database is composed of two files, one is a data file and one is a log file; The data file saves all the data of the system, and the log file saves all the modification details of the database; Normally, log files grow much faster than data files, and after a period of time, we need to clean up the log files, otherwise once the log files exceed the free space size of the disk, the database service will not work normally, and all operations on the database will fail. View the location of the 2 files that make up the database:
Go to Enterprise Manager, find the database you want to view, right-click the pop-up menu, and select Properties.
1. Clear the logs
1. Select the data "djabc", right-click the pop-up menu, and select "All Tasks" and "Detach Database".
2. Separate databases:
If there are other programs that are currently connecting to this database, click the "Clear" button to clear all connections and press it.
OK button to complete the separation of the database.
3. Delete the log files of the database: Once the database is separated, you can directly delete the log files of the database.
4. Additional databases: Select the menu "Databases" "All Tasks" and "Additional Databases" in turn, and the system will pop up the additional database window.
5. Select the data file and the name of the attached database, and press OK to re-add the newly separated database to the current sqlserver server.
6. After all is completed, the system will re-create the log file, the size of the newly created log file is 1k, and then execute the above log clearing process when it grows to a large size in the future.
2. Backup. In Enterprise Manager, SQL Server -NorthWind -Right Click -All Tasks -Back Up the Database, and then do the corresponding operations under the graphical interface, which is very simple and secure.
-
Database right-click properties --File --Log file --Autogrow setting does not limit file growth.
Database right-click task --shrink--file--file type: log file.
-
Combined with the Heatsone Backup backup and recovery software, Microsoft SQL Server will intercept the information related to the current task, send a copy to the Heatsone Backup log, and display it with other Heatsone Backup task information. The Microsoft SQL Server plug-in module improves the usability of applications by quickly backing up SQL databases in Windows NT and 2003, 2008, etc. Its broad features include hot backups, multiple backup operations, and advanced logging capabilities.
-
This is a server problem, and I guess you won't understand it, but this transaction log can be deleted. However, if you want to use a database tool to delete it, it is recommended that you find yonyou software to solve the security.
-
Click on the operation log and login log to make all clear. Directly above. I won't buy tofu.
-
In the maintenance of the set of accounts, there is a function of "shrinking the set of accounts", which is to process log files.
-
Yes, you go to the database installer and find that file, and just delete it.
-
db right-click on the property -> file -> to add a log file, the following will not be abnormal, but to prevent the next exception, you need to collect the log file.
-
Use the following statement to compress the database, adjust the databasename in the script, and change it to the corresponding database name.
dump transaction databasename with truncate_only
godbcc shrinkdatabase (n'databasename', 0,truncateonly)go
-
Tools Material: Management Studio.
1. First, on the desktop, click on the "Management Studio" icon.
2. Then in that interface, double-click on the database that is offline due to the transaction log being full.
3. After that, in the interface, select the "Log" option in "File Type".
4. Then, in the interface, select "Reorganize pages before freeing up unused space" in the "Shrink Operation", and modify the shrinkage size to 1MB.
5. Finally, in the interface, click the "OK" button at the top left.
-
Right-click on the database name, open the database properties dialog box, and select the second item "File", as shown in the following figure.
Then press the button next to Autogrow Maximum Size of the log file to open the dialog box as shown below.
Select Enable auto-growth and modify its Chinese growth.
-
The remaining space is not much, right, in SQL, even query, delete, will also generate logs. Your database computer's file system won't be fat32.
-
If the space is insufficient, the data operation will not be normal. The database and logs are compressed before use.
-
Find the location where the file is stored and delete it directly.
-
Clear the contents of the file in the log.
Create a database.
Select the Program Management SQL Server 2008 SQL Server Management Studio command in the Start menu to open the SQL Server Management Studio window and establish a connection using Windows or SQL Server authentication. >>>More
The database is generally composed of many tables, for example, the school builds a database, which can build a student table (including the student's name, age, student number, class, date of birth), a teacher table (including the teacher's name, age, teaching class, teaching category), a report sheet (including the student's student number, and the grades of each subject), etc. These are the ways in which the files are stored in the database, and try to make sure that the items in a table are closely related and have the same attributes, if this condition cannot be met, a table must be built (the redundancy of the built table has 4 levels). In order to meet the user's query needs, we also need to make a number of views, for example, you can make a view of his items have the name of the student, age, grades of each subject, and the teacher of each subject, etc., we can also export new items according to the existing items, for the purpose of simplicity, for example, the view can add an average grade, we add different permissions and roles to each view, and provide it to different people to query to protect the security of the database. >>>More
select ,from emp e left jion dept don ;
Left Company. The left link is, the left side prevails, and the right side is useless to make up for it. >>>More
It seems that there is something called triggers in the DB, and there seems to be another thing called transactions.
When changes to data affect the index, the information in the index can be spread out across the database. Reindexing reorganizes the storage of indexed data (and in the case of clustered indexes, table data) and defragments it. This improves disk performance by reducing the number of page reads required to obtain the requested data. >>>More