What you will need:
- You must have IIS version 8.0 or higher installed (it does work on 7 too)
- You must have Web Sockets Support for IIS installed
- You must have Application Request Routing 3.0 installed
What you will need:
After the long-winding road of discussion and deliberation, revision, disagreements and adjustments, the Open Web Application Security Project (OWASP) are updating their venerable Top 10 list of the most critical web application security risks since 2013. This update brings with it three new entries to the list, based on data OWASP collected and analyzed. Here’s all you need to know about OWASP Top 10 2017.
Disabling indexes is a good idea when it comes to loading large quantities of data, but… the big problem is clustered indexes. If you disable a clustered index, you’ve disabled the entire table.
Several options suggest themselves, and none of them are simple.
1) Loop through the system views (sys.indexes), extract the table and index name, generate and execute dynamic SQL to disable the index. Have an “undo” routine to re-enable them. (Be wary–was it a unique index or a unique constraint?) This, alas, only works if you do not use clustered indexes. Good luck with that.
2) As for 1, but skip any clustered indexes. When you load data, make sure it gets loaded in (clustered index) sequential order, otherwise you’ll have poor load times and fragmented tables. (If you data providers are like mine, good luck with that one, too.)
3) Create tables in your database containing definitions of the indexes on your “loading” tables. Build a routine that loops through them and drops all the indexes (clustered indexes last). This will be fast if you truncate the tables first. Load your data, then loop through and recreate the indexes from scratch (clustered first). Use table partitioning to make less horrible on the rest of the system (e.g. do all the above on the “loading” tables, then use partition switching to move the loaded data into your “live” tables). It took me no little time to build such a system, but it can and will work.
SELECT 'ALTER INDEX ' + QUOTENAME(I.name) + ' ON ' + QUOTENAME(SCHEMA_NAME(T.schema_id))+'.'+ QUOTENAME(T.name) + ' DISABLE' FROM sys.indexes I INNER JOIN sys.tables T ON I.object_id = T.object_id WHERE I.type_desc = 'NONCLUSTERED' AND I.name IS NOT NULL AND I.is_disabled = 0
SELECT 'ALTER INDEX ' + QUOTENAME(I.name) + ' ON ' + QUOTENAME(SCHEMA_NAME(T.schema_id))+'.'+ QUOTENAME(T.name) + ' REBUILD' FROM sys.indexes I INNER JOIN sys.tables T ON I.object_id = T.object_id WHERE I.type_desc = 'NONCLUSTERED' AND I.name IS NOT NULL AND I.is_disabled = 1
Option 1: SQL Connection
Dim sqlsb As New SqlClient.SqlConnectionStringBuilder() sqlsb.ConnectionString = connString '_connectionString sqlsb.InitialCatalog = "" Using conDB As New SqlConnection(sqlsb.ToString()) conDB.Open() dtDatabases = conDB.GetSchema("Databases") conDB.Close() ' *** cmbDatabase.Items.Clear() For Each r As DataRow In dtDatabases.Rows Select Case r("database_name").ToString Case "master", "tempdb", "msdb", "model" Case Else ' **** mbDatabase.Items.Add(r("database_name")) names.Add(r("database_name")) End Select Next End Using
Option 2: SQL Select:
SELECT DB_NAME(database_id) AS [Database], database_id
Option 3: Microsoft SMO Objects
Install-Package Microsoft.SqlServer.SqlManagementObjects -Version 140.17199.0
var SDBLOC = new Microsoft.SqlServer.Management.Smo.Server("localhost").Databases.Cast<Microsoft.SqlServer.Management.Smo.Database>().Where(bs => !bs.IsSystemObject && bs.ID>6).ToList();
First, download Python:
In the following example we will write a variation of the mandatory “Hello World” script:
>>> print "It's easy to write a Python script!" It's easy to write a Python script! >>>