.internal_objects_alloc_page_count>0or T1.user_objects_alloc_page_count >0or t1.internal_objects_dealloc_page_count>0or t1.user_objects_dealloc_page_count>0)ORDER BY T1.internal_objects_alloc_page_count DescView the amount of tempdb the database session occupies, and then view the details based on the SPID, and then investigate the specific information for the sessionAccording to the information I found a session that took up a lot of temporary space and looked at the details of the session. The
duration of the session rather than the creation level, and after the session that creates the global temporary table, the global temporary table no longer issues locks to new sessions, and the global staging table is destroyed after the existing session has finished releasing the lock.3. Create a global temporary table that does not belong to any sessionThe Global temporary table is maintained by SQL Server with a reference counter greater than 0 to ensure that it is not automatically deleted
Stulist column will have a comma, then the statement with the outer layer: SELECT b.sname,left (Stulist,len (stulist)-1) as hobby is to remove the comma, and give a meaningful listing! Reproduced from: http://www.cnblogs.com/doubleliang/archive/2011/07/06/2098775.html The following applications: City table: User table: Query cityids corresponding city name, as follows: Resolve sql: SELECT TOP [id]
, [UserName], [
password]
, [Islock]
, [ISAdmin]
, [nickna
packets read from the network since SQL started.
SELECT @ @PACK_SENT As W-Returns the number of output packets that have been written to the network since the last startup. SELECT @ @PACKET_ERRORS as W--returns from SQL startup,The number of network packet errors that occurred on the SQL connection.
SELECT @ @SERVERNAME as W--Returns the name of the running SQL Server. SELECT @ @SERVICENAME as W--Returns the registry key name under which SQL is running SELECT @ @TIMETICKS as W--the number of
instance login account:Finally, after confirming that all the information is correct, click "Finish" to complete the database mirroring configuration. :5. Complete the configurationOnce you have completed the above configuration, you will be prompted to ask if you want to start mirroring now. Click "Do not start mirroring" to return to the configuration dialog box. :in the Configuration dialog box, after verifying the configuration information, click "Start Mirroring":At this point the primary
making changes to data, and before a does commit, the data that is read by the new concurrent transaction is consistent with the data in the a transaction, thus avoiding non-repeatable reads. But before a transaction is finished, a B transaction can insert a new record into the table where data is located, and when another transaction is queried again with the same WHERE clause, the resulting number may be the last inconsistency, that is, the Phantom data.Serializable:An exclusive lock is place
To add data in bulk:An INSERT statement inserts multiple records in bulkA common INSERT statement that inserts only one piece of data into the database, one statement:INSERT INTO persons(Id_p, LastName, FirstName, City)VALUES (204, ' haha ', ' Deng ', ' Shenzhen ');(as above, only one record is inserted)How do I insert multiple records at a time?Examples of Use:INSERT INTO persons(Id_p, LastName, FirstName, City)Values(Haha, ' Deng ', ' Shenzhen '),(201, ' haha2 ', ' Deng ', ' GD '),(202, ' haha
t.taxno like CONCAT ('% ',? , '% ') Sql server:Select t.* from Sj_receiptinfo T WHERE t.taxno like '% 'PostgreSQL: SELECT *. (T. Category Code | | '-' | | T. Invoice number) as number from the account where username ~* ' Baidu ';Find information about all user names in the data table account, including Baidu and those that do not distinguish between uppercase and lowercase
4. Infer nullOracle: SELECT productname,unitprice* (unitsinstock+NVL(unitsonorder,0)) from Products
MySQL: SELECT pro
number of page compression attempts per second; Pages Compressed/sec: Calculates the number of pages compressed per second. Finally, note the data compression considerations: 1. Enabling and disabling table or cluster index compression reconstructs all fee cluster indexes. 2. You cannot use compression in sparse columns. 3. Lob beyond the line cannot be compressed. 4. Non-leaves in the index can also be compressed using row compression only. 5. Non-clustered indexes do not inherit the standard
1 . Connect SQL Server with pymssql.1), Pymssql's PyPI address: Https://pypi.python.org/pypi/pymssql.2), pymssql official website: http://pymssql.org/.3), Python uses pymssql to connect to the SQL Server database.2 . Connect SQLite with Sqlite3 module. Starting with Python 2.5, the sqlite3 becomes a built-in module without additional installation.1), official documents: https://docs.python.org/2/library/sqlite3.html.2), using Python for SQLite database operation.3. Python + MySQL.4. Python Gets
SQLSERVER compilation and recompilation definitions when SQLSERVER receives any command, including query, batch, stored procedure, trigger) pre-compiled commands (preparedstatement) and dynamic SQL statements (dynamicSQLStatement) need to complete syntax interpretation, statement interpretation, and then compile
SQLSERVER compilation and recompilation definitions
How does SQLSERVER locate the target data through indexing and Statistics (article 2) before reading the content of this article, please read the content of the first article first, without the foundation of the first article, we will see the first article of o (_) o address: How does SQLSERVER locate the target data through indexing and Statistics (Article 1 )---------------
How does
Commonly used logs for SQL Server diagnosis: (1) Windows event log (2) SQLSERVERErrorLog1. Windows event log EventLog is used as a service program enabled and managed by Windows, windows records the startup, normal shutdown, and abnormal shutdown of the SQLSERVER service in its system log systemlog.
Common logs used to diagnose SQLSERVER problems include: (1) Windows Event Log (2)
Commonly used logs for SQL Server diagnosis: (1) Windows event log (2) SQLSERVERErrorLog1. Windows event log EventLog is used as a service program enabled and managed by Windows, windows records the startup, normal shutdown, and abnormal shutdown of the SQLSERVER service in its system log systemlog.
Common logs used to diagnose SQLSERVER problems include: (1) Windows Event Log (2)
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.