,t.text from sys.dm_exec_query_stats as s
-information about statements cross
apply Sys.dm_ Exec_sql_text (S.sql_handle) as T
ORDER by avgtotal Desc
--Evaluation of database IO
select * from Sys.dm_io_pending_io_requests --Request view of suspend IO
select * from Sys.dm_io_ Virtual_file_stats ((Select db_id (' AdventureWorks2014 '), null) --function returns I/O statistics for data and log files-
-The description file is suspended
Select S.file_id,r.io_pending from sys.dm_io_pend
For database applications, database security is crucial. SQL Server's security function can protect data from unauthorized leaks and tampering! Below is a summary of the security chapter!
The first is a summary of the security object! Let's take a look at this figure:
Here I will give you details about the fixed server role and the fixed database role!
1. Fixed serve
Tags: io sp c on r BS Management SQL asThe address space on the 64-bit machine is bigger than before, and it's causing a lot of changes.1, MemToLeave This word does not exist, because SQL Server to no longer do this reserved space, that is to say multiple page want to use how much! As long as it's there as long as you
...Recycling is revoke ... from ...For example revoke CREATE table from Arwen;Why do I have create session permissionsThere is a lot of controversy about this privilege. Because without this permission is actually possible, and it is easy to mislead people. For example, creating a user should not be able to login a bit of a common sense. There is no such permission in SQL Server. What does it do in Oracle?
SQL Server Management, do you do well? The following may be helpful to your work.
1. database files include. mdf. ndf. ldf files: mfd is the master database file, ndf is the slave database file, ldf is the log database file, each database mdf file has only one, and ndf files can have multiple.
2. The data page size is 8 k. One of the largest features of the
SQL Server Management, did you do a good job? These may help you with your work, and you may wish to take a patient look.
1. The database file has. mdf. ldf three kinds of files, MfD main database file, NDF is from the database file, LDF for log database files, each database MDF file only one, NDF file can have multiple.
2. Data page size for 8k,
index on a view, the result set of the view is stored, which can improve performance for a particular query, but it also severely reduces performance when the UPDATE statement is used, typically in a data warehouse with relatively stable data.8, maintenance Index After you have built the index, regular maintenance is important, using DBCC SHOWCONTIG to observe page density, scan density, and so on, timely use DBCC INDEXDEFRAG to organize the table or view index, when necessary with DBCC Dbreind
-) ----------------------------------------------------------------------------------------------------------- ------------------to add filegroups and data files to an existing database1. Add filegroups and data files under Views add filegroups and files using SQL statements1 UseE_market2 3----Add Filegroup FG14 ALTER DATABASEE_marketADDFILEGROUP FG15 GO6 7 ----add a data file for the newly created filegroup FG18 ALTER DATABASEE_marke
Filecursor Fetch Next From Filecursor Into @ Filepath While @ Fetch_status = 0 Begin Declare @ Delcmd Varchar ( 100 ) Set @ Delcmd = ( ' Del ' + @ Filepath ) -- User xp_role shell to delete the Bak Exec Xp_mongoshell @ Delcmd Fetch Next From Filecursor Into @ Filepath End Close Filecursor Deallocate Filecursor
Although this method looks very high-tech, we recommend that you use the first method unless
When I first installed SqlServer2008 on the server (Win2008), there was an error--must use"Role management Tools"Install or configureMicrosoft. NET Framework 3.5 SP1。 At first thought it was not installed 3.5, later looked at the server has installed the VS2010, and then ruled out this possibility. Google a bit, and then find a solution to the problem. (I've been
source_partition_number_expression
The switches a partition from one partitioned table to another partitioned table. alter [dbname]. [dbo] [tablename] switch partition source_partition_number_expression to [dbname]. [dbo] [staging_tablename] partition source_partition_number_expression
Switches a partition to an existing table.ALTER TABLE [dbname]. [dbo] . [TableName] SWITCH PARTITION source_partition_number_expression to [dbname]. [dbo] . [Staging
One, the Oracle 11g database download, installation:Download:Then, based on this hyperlink build your own user, database.Http://wenku.baidu.com/view/caa21c1a650e52ea551898e2.htmlSecond, Navicat Premium connect Oracle1. Review the Tnsnames.ora file in the installation directory (F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN).2, the connection, the first configuration option under the Oci file, download:Associated with the time,:OCI directory: D:\tools\instantclient-basic-nt-12.1.0.2.
time, we are forced to change the password first. at the beginning, you may wonder if the newly created user is locked. after oracle is installed, some users such as Scott are locked by default. you can unlock it like this.
AlterUserScott accountunlock;
If you want to lock Scott, it will naturally be alter user.Scott accountlock;
However, the new user does not belong to this situation or has no permission. only connecting to the database requires a separate permission. (This permission is not a
Meaning:
For a transaction to have a very clear start and end point, every data manipulation statement in SQL Server, such as SELECT, INSERT, update, and delete, is part of an implicit transaction. Even if there is only one statement, the system will take this statement as a transaction, either executing all the statements or doing nothing.
After the transaction begins, the operations of the firm are writ
operation of the transaction log, that is, checkpoint and lazy When writer occurs, only the dirty pages will be written to the MDF file) below to move a Song to see, slightly modified, very intuitive:Here are the main list of checkpoints and lazy writing between the differences, in fact, these differences are well known, but we still list the difference between the two for you to learn: Checkpoint and LazyWriter will be the buffer viscera pages written to disk; LazyWriter will update the buffer
Unable to manage the unit created by MMC. After searching online, the solution is as follows:
1. [start] --> [run] Regedit press ENTER2. Find the following registry subkeys:HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft SQL Server \ 80 \ tools \ clientsetup3. Right-click the clientsetup registry subitem and choose [new] --> [string value].4. Rename the Registry subitem, create sqlpath, and then press Enter.5.
If you need to manage sqlserver, you can add them to your favorites for future use.
If you need to manage SQL server, you can add it to your favorites for future use.
1. view the database version
Select @ version
2. view the operating system parameters of the machine where the database is located
Exec master .. xp_msver
3. view database startup parameters
Sp_configure
4. view the database startup time
Sele
Problem: The External host management platform appears when the database is activated.
Microsoft ole db provider for SQL Server Error '80040e87'
Conversion from string to datetime failed.
/ADM/admsql3.asp, row 271
Cause: You can view the logon information page.Local Structure timeAndOfficial structure timeThe reason is that the local structure time is inconsi
1. view the database version
Select @ version
2. view the operating system parameters of the machine where the database is located
Exec master .. xp_msver
3. view database startup parameters
Sp_configure
4. view the database startup time
Select convert (varchar (30), login_time, 120) from Master .. sysprocesses where spid = 1
View database server name and Instance name
Print 'server name ...... + convert (v
. nvarchar () double-byte storage. Text: Large space. C. Date data type: Datetime,smalldatetime D. Photo type: Image, generally not used, only the database record location.4. FOREIGN KEY constraintsRight-to-load, from table (foreign key table) to main table (primary key table).The data in the primary table cannot be deleted until the data in the child table is deleted.5. Check constraintsColumn value right--->check constraint--add keyword (email like '%@% ')6. Build diagramGraph right---Select
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.