Lucene tutorial
Lucene.net is a open source text search engine library, ported from Lucene Java project.
Simone Chiaretta has publised a post series to learn more.
You man also interested in my other posts:
Lucene.Net and Azure
“Lucene works on top of an abstract store object called Directory. There are several Directory objects, including FSDirectory, for file systems, and RAMDirectory, for in-memory store. Azure Library for Lucene.Net implements a smart blob-storage Directory object called AzureDirectory which enables the use of Lucene.NET on top of Azure Blob Storage. AzureDirectory automatically creates a local cache of blobs and intelligently auto-uploads them on the fly.
Displaying the Sizes of Your SQL Server’s Database’s Tables
Determining the Space Used by a Database or a particular Table
SQL Server has a handy little system stored procedure namedsp_spaceusedthat will return the space used by a database or by a particular table. To determine the size used by the database, simply run:
EXEC sp_spaceused [table]Returning the Space Used for All Tables
The
sp_MSforeachtablestored procedure is one of many undocumented stored procedures tucked away in the depths of SQL Server. A list of these handy stored procedures can be found at SQL Server 2000 Useful Undocumented Stored Procedures. In short, you can usesp_MSforeachtablelike so:
EXEC sp_MSforeachtable @command1="command to run"In the command to run put a
?where you want the table name to be inserted. For example, to run thesp_spaceusedstored procedure for each table in the database, we’d use:
EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"This will execute
EXEC sp_spaceused 'TableName'for each user table in the database.Combining Multiple Result Sets Into a Single Result Set Using Temporary Tables
CREATE PROCEDURE dbo.TableSpaceUsed AS -- Create the temporary table... CREATE TABLE #tblResults ( [name] nvarchar(50), [rows] int, [reserved] varchar(18), [reserved_int] int default(0), [data] varchar(18), [data_int] int default(0), [index_size] varchar(18), [index_size_int] int default(0), [unused] varchar(18), [unused_int] int default(0) ) -- Populate the temp table... EXEC sp_MSforeachtable @command1= "INSERT INTO #tblResults ([name],[rows],[reserved],[data],[index_size],[unused]) EXEC sp_spaceused '?'" -- Strip out the " KB" portion from the fields UPDATE #tblResults SET [reserved_int] = CAST(SUBSTRING([reserved], 1, CHARINDEX(' ', [reserved])) AS int), [data_int] = CAST(SUBSTRING([data], 1, CHARINDEX(' ', [data])) AS int), [index_size_int] = CAST(SUBSTRING([index_size], 1, CHARINDEX(' ', [index_size])) AS int), [unused_int] = CAST(SUBSTRING([unused], 1, CHARINDEX(' ', [unused])) AS int) -- Return the results... SELECT * FROM #tblResultsThis stored procedure will return a single result set. The fields that end in
_intare the integer representations of those fields that are returned with KB fields.
4GuysFromRolla.com – Displaying the Sizes of Your SQL Server’s Database’s Tables
SQL Compact 3.5 Tidbits & Gotchas!
An article detailing the odd problems and solutions to using SQL Compact 3.5 in desktop applications
1. Installing the designer
2. Creating the dbml O/R Mapping
3. The connection string
4. Private installation at deployment
CodeProject: SQL Compact 3.5 Tidbits & Gotchas!. Free source code and programming help
The easiest way to export data from MS SQL Server to a csv or text file
Run the query (SELECT * FROM tablename) to get all the data in Query Analyzer, then copy and paste the results from there into Excel. Then save as csv file type.
MSSQL
mysqldump — A Database Backup Program for MySQL
There are three general ways to invoke mysqldump:
shell>
mysqldump [options]db_name[tables]shell>
mysqldump [options] --databasesdb_name1[db_name2db_name3...]shell>
mysqldump [options] --all-databasesIn its simplest form, the mysqldump utility can be used like this:
mysqldump –-user [user name] –-password=[password] [database name] > [dump file]
this will include both the schema and data as well.
If you need only the schema use the -d or --no-data option
e.g. mysqldump -d -u root -pp@ssword mydatabase > mydatabase.sql
Reference: MySQL :: MySQL 5.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program
How do I Recompile the MySQL Library to Run Under the Medium Trust Environment in ASP.NET?
Update: You no longer need that if you use the MySQL Connector/Net 5.2 or later.
- Download the source code for the MySQL Connector/Net from www.mysql.com.
- Extract the contents of the zip file to a local directory.
- Open mysql.csproj project file in Visual Studio.
- Open the AssemblyInfo.cs file, and add the following code, in the using block, at the top of the file (if it is not already there):using System.Security;
- Add the following code to the assembly section of the file:[assembly: AllowPartiallyTrustedCallers]
- Recompile the dll.
You may now reference this dll from other projects. When you decide to publish your project to your hosting server, you need to upload this modified version of the dll to your bin directory.
MySQL ASP.NET Tutorial
A Step-by-Step Guide To Using MySQL with ASP.NET
MySQL 5 C# sample code using ObjectDataSources
MySQL Tutorial from MySQL.com
3.1. Connecting to and Disconnecting from the Server 3.2. Entering Queries 3.3. Creating and Using a Database [+/-] 3.4. Getting Information About Databases and Tables 3.5. Using mysql in Batch Mode 3.6. Examples of Common Queries [+/-]
- 3.6.1. The Maximum Value for a Column
- 3.6.2. The Row Holding the Maximum of a Certain Column
- 3.6.3. Maximum of Column per Group
- 3.6.4. The Rows Holding the Group-wise Maximum of a Certain Field
- 3.6.5. Using User-Defined Variables
- 3.6.6. Using Foreign Keys
- 3.6.7. Searching on Two Keys
- 3.6.8. Calculating Visits Per Day
- 3.6.9. Using
AUTO_INCREMENT25.2.3. Connector/NET Examples and Usage Guide 25.2.4. Connector/NET Reference 25.2.5. Connector/NET Notes and Tips 25.2.6. Connector/NET Support
