Tag Info

Hot answers tagged

3

Don't reference it as [dbo].[vendor].[location].Lat in the SELECT list. use simply vendor.location.Lat or location.Lat or define a table alias and use that. CREATE TABLE dbo.Vendor([location] geography) GO /*Works fine*/ CREATE VIEW V1 AS SELECT v.location.Lat AS latitude FROM dbo.vendor v GO /*Fails*/ CREATE VIEW V2 AS SELECT ...


2

You don't use LOAD DATA INFILE for what you are trying to do. LOAD DATA INFILE loads a delimited text file (such as CSV) full of raw data, that is sitting on the server, into a table. What you have is a dump file, which is full of queries -- not raw data. You have three basic options: use phpmyadmin to apply the file use the mysql command line client to ...


2

Management Studio is the tool you should probably be using to manage a SQL Server database. You can download SQLManagementStudio_x64_ENU.exe from here: http://www.microsoft.com/en-us/download/details.aspx?id=43351 For the C# side, you could use Visual Studio: http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop


2

I recommend not using Entity Framework with anything else other than SQLSERVER. And then LINQ to SQL may be better. lightspeed was recommended to me as a better product. I personally have not used it.


2

I did a little bit more research and found the answer to the problem. Even though the first parameter for DBMS_OUTPUT.PUT_LINE is listed as item in the 10g documentation for DBMS_OUTPUT. The actual name for the parameter is A. You need to bind the name using DBMS_OUTPUT.PUT_LINE(A => 'random text'). The actual parameter names for stored procedures can ...


2

Just in case this helps, I'm posting some code that might help you work out what account that sid represents: USE tempdb; GO -- to translate SID in binary format to AD format CREATE FUNCTION [dbo].[fn_SIDToString] ( @BinSID AS VARBINARY(100) ) RETURNS VARCHAR(100) AS BEGIN IF LEN(@BinSID) % 4 <> 0 RETURN(NULL) DECLARE @StringSID VARCHAR(100) ...


2

Yes, you can do this, and in fact with just 2 data centers you really have no other choice. Essentially, whenever you do not have a primary you can still do a reconfig but you must pass in {force:true} to make it happen on a non-primary node. This is listed in the docs for the rs.reconfig() command and in detail (with examples) as part of a tutorial which ...


2

We've used Change Tracking to handle this. We've found it lightweight and easy to set up and administer. The largest system's moving tens of thousands of rows (from a table containing millions) per day without signs of stress. Of course your configuration will dictate your throughput. It's big cousin - Change Data Capute - will handle the case where you ...


2

Is the default setting for Sql Server comparable to "innodb_flush_log_at_trx_commit = 1" or to "innodb_flush_log_at_trx_commit = 2"? No. Assuming similar hardware, SQL Server should be just as slow as MySQL, since both would have to flush the commit for every row. Therefore there must be something else at play, very likely in the (not posted) C# code ...


1

The more SSISic way of doing this would be through Expressions. Despite seeing multiple variables here, don't worry about them. I have found that when people try to do too much with an Expression, diagnosing and debugging bad logic will leave you reaching for the nearest blunt object. Variables FlatFileConnection, string. Value = ...


1

I did the same thing as Scott Chamberlain with the Itenso RTF DLL, but in my case there was a LOT more work that had to be done before this could be marked as SAFE in my SQL 2008R2 database. First, like Scott, I had to remove the reference to System.Drawing. I found the easiest way to do that was to remove the reference, recompile and then rewrite the bits ...


1

That C# script reads the file and executes each line from it. That works fine beacause the file contains only one line statements. If your T-SQL structure from your file is the same, then that C# code will work for you. You can check that by opening the file with Notepadd++. Cheers,


1

you can follow the tutorial in this link in-order to use PostgreSQL under C# and .net framework http://www.codeproject.com/Articles/30989/Using-PostgreSQL-in-your-C-NET-application-An-intr for managing the database side you can use aquafold (in my opinion one of the best database management for PostgreSQL check the following link http://www.aquafold.com/), ...


1

The syntax you're looking for is here CREATE {DATABASE | SCHEMA} ... [PAGE_SIZE [=] size] ... [DEFAULT CHARACTER SET charset [COLLATION collation]] ... [DIFFERENCE FILE 'filepath'] size ::= 4096 | 8192 | 16384 Also check out this page and this link from it specifically about case insensitive searches and collations on columns. ...


1

At the time of this writing, there is not public repository for Connector/NET, if you have performance/scaling improvements you are welcome to contribute them (together with a bug report) at bugs.mysql.com.


1

When I run sp_lock, I realized that two locks in my table: PAG and KEY. Searching more about KEY LOCK, I created an index for the column on the where clause, and this solve my problem. EDIT: When I removed the where clause (without index) , it worked fine too.


1

When you use Encoding.Default the result is dependent on local settings: An encoding for the operating system's current ANSI code page. The specification is pretty direct about the dangers of using the default encoding and very specifically calls out the recommendation not to use it: Different computers can use different encodings as the default, ...



Only top voted, non community-wiki answers of a minimum length are eligible