Discover sql server logs in event viewer, include the articles, news, trends, analysis and practical advice about sql server logs in event viewer on alibabacloud.com
Tags: c blog http a int widthHow SQL Server truncates (Truncate) and shrinks (Shrink) transaction log classifications: SQL Server database backup restore 2010-01-25 14:321,708 people read comments (4) ReportWhen SQL Server truncat
Tags: blog http strong IO data art Code DIVSummary: When I log in to a new user in SQL Server, there are three errors, 18456, 15128, 4064, respectively, of the error codes-----------------------------------Body-----------------------------------First, the experimental environmentWindows 7SQL Server 2008The DB instance name is TestDB and the new user name is TestU
1. Right-click the database to which logs are cleared, such as "TestDB", and click [new query (Q)]2. Enter the following SQL statement. "TestDB" indicates the database name.
Dump transaction TestDB WITH NO_LOG
3. Execute the SQL statement. After successful execution, continue with the following operations:
4. Right-click the database node and choose [task (T)]
When the log file is full and the SQL database cannot write to the file, there are two methods available:
One way: Empty the log.
1. Open Query Analyzer, enter command
DUMP TRANSACTION database name with NO_LOG
2. Then open Enterprise Manager-right you want to compress the database-all tasks-shrink the database-shrink the file-Select the log file-in the shrink option to shrink to XXM, this gives you a minimum m number that you want to shrink to, just
Methods that apply to SQL Server 2005 1 backup log Dnname with no_log 2 go 3 dump transaction Dnname with no_log 4 go 5 use Dnname 6 dbcc shrinkfile (2 ) 7 go Description: Because SQL Server 2008 has been optimized for file and log management, the above statements can be run in SQL2005 but hav
Backing up and restoring databases with Ms sqlserver increases the size of database backup files, and sometimes it is difficult to explain the backup files to the customer.
I. How to back up a database
1,View the physical path of the database, open "Enterprise Manager", and findCMSDatabase, right-click it and view its properties. The "Database" option allows you to view the storage location of database files, and the "transaction log" option allows you to view the storage location of transac
Precautions:1, the main from the server to add new system users and set a good password;2, the master-slave server is turned on the SQL Server Proxy service, and set to boot automatically3. In database configuration management, set the login information of SQL
Method One:1, open Query Analyzer, input command
BACKUP LOG database_name with NO_LOG
2, then open Enterprise Manager-right key to compress the database-all tasks-shrink the database-shrink the file-Select the log file-in the contraction method to choose to shrink to XXM, here will give a permit to shrink to the minimum m number, directly enter this number, OK.
Method Two:Set checkpoints, automatically truncate logs
In general, the contraction of t
SQL Server 2008 methods to delete or Compress database logs 2010-09-20 20:15Because the database log growth is set to "unlimited", so the time a long log file will inevitably be very large, a 400G database actually has 600G log file, seriously occupy the disk space. Because the main is to do OLAP, so the database itself will not have a big change, so the log will
MS SQL Server logs grow very fast, after a long time, log files will be large, take up a lot of hard disk space, so you need to periodically clear the log, you can use the following four ways:
Method One:
1, open Query Analyzer, input command
BACKUP LOG database_name with NO_LOG
2, then open Enterprise Manager-right key to compress the database-all tasks-shri
database is relatively large, this restore to wait a long time, go out to suck a few fresh air, the merit will be gaocheng.3. After the database restore is successful, this stateDisplay (Restoring ... ), restore the transaction log to the SHUA2, which is the database right-click Task.If you fill in, first fill in the beginning of the backup log C:\shua_log.bak, and then tick [restore], the most important thing is to choose a point in time, but this point of time can not select milliseconds, so
Due to weeks of company database migration led to work in Monday, the database connection is not a problem, tinkering with the old, on-line Niang finally found the problem point.Describes the difference between "login" and "User" in SQL Server, "logon" for user authentication, and database "user" account for database access and permission validation. The login is associated with the user through a security
to wait a long time, go out to suck a few fresh air, the merit will be gaocheng.3. After the database restore is successful, this stateDisplay (Restoring ... ), restore the transaction log to the SHUA2, which is the database right-click Task.If you fill in, first fill in the beginning of the backup log C:\shua_log.bak, and then tick [restore], the most important thing is to choose a point in time, but this point of time can not select milliseconds, so I chose 29 seconds, this time 29 seconds ag
Tags: alter restore backup DBCC LCM LTE dump window managementRunning SQL Server commands in Windows requires the use of SQLCMD commands, which are installed when you install SQL Server. Use SQLCMD to enter interactive mode: The previously used commands are: DatabaseName With No_log --Empty log
databasename with no_lo
. Change the recovery mode to # #完整 # #However, the mirror cannot be restarted because the host's database log and the standby database log do not agree.The operation at this time is:>-the full backup database on the host-Copy the backup file to the standby, cancel the image of the standby machine, then restore the database, in the options, select**Do not perform any operations on the database ...**After the host executes the ' SQLALTERDATABASEShishanSETPARTNER='tcp://192.168.1.2:5022';```if the
--clearing the log in SQL2008 must be done in simple mode, and then back to full mode when the purge is complete.Use [master]GO--gpslocus is the name of the database to clear the logALTER DATABASE [Jm-fmis] SET RECOVERY simple with no_waitGOALTER DATABASE [Jm-fmis] SET RECOVERY Simple--Easy modeGOUse [Jm-fmis]GO--gpslocus_log is a log file name and can be queried by sys.database_files table--select file_id, name from sys.database_filesDBCC shrinkfile (N ' Jm-fmis_log ', 11,truncateonly)GOUse [ma
import of log data, create a unique clustered index on recordid,machinename and logname using Ignore_dupe_key=onNext go back to the DC Server configuration Event ServiceFirst, you need to configure WinRM to display the available listenersWinRM e Winrm/config/listenerPerform winrm get Winrm/configCheckAllowremoteaccess = TrueIn the log source server (we only have
When the log file is full and the SQL database cannot write to the file, there are two methods available:
The first method: empty the log.
1. Open Query Analyzer, enter command
The following is a reference fragment:DUMP TRANSACTION database name with NO_LOG
2. Then open Enterprise Manager-right you want to compress the database-all tasks-shrink the database-shrink the file-Select the log file-in the shrink option to shrink to XXM, this gives you a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.