sql-server

Make SQL Server 2005 accessible via Internet

I have an application that runs on a client's server built on a SQL Server 2005 database. We have now developed an ASP.NET v2 application which connects to this database. This web application will be hosted on an ISP's server but needs to access the SQL Server database on the client's server. The client's server has a firewall and so ...

Can't connect to SQL Server 2008 - looks like Shared Memory problem

I am unable to connect to my local instance of SQL Server 2008 Express using SQL Server Management Studio. I believe the problem is related to a change I made to the connection protocols. Before the error occurred, I had Shared Memory enabled and Named Pipes and TCP/IP disabled. I then enabled both Named Pipes and TCP/IP, and this is wh...

How to migrate the Access database to MOSS 2007 SQL Server with the use of SSMA (SQL Server migration assistant) 2005 ?

Hi, One of my friends got the access database with Forms (VBA) and wish to migrate all the database table to the newly installed MOSS 2007 site. He is using SSMI for this purpose. He cannot do it because there are plenty of errors and warnings. I think it is due to the old Access queries. Is there any other way to import the databas...

LEFT OUTER JOIN with a WHERE clause

I have two tables. indRailType contains a list of the names paired with an ID value that I use in other tables to indicate the rail type. WO_BreakerRail contains a date column and a rail code colume that corresponds to the same code in indRailType and some other data. There's a row in WO_BreakerRail for any activity on each rail type, fo...

Download binary file From SQL Server 2000

I inserted binary files (images, PDF, videos..) and I want to retrieve this file to download it. I used generic handler page as this public void ProcessRequest (HttpContext context) { using (System.Data.SqlClient.SqlConnection con = Connection.GetConnection()) { String Sql = "Select BinaryData From ProductsDownload Wher...

Can T-SQL function return user-defined table type?

I have my own type: CREATE TYPE MyType AS TABLE ( foo INT ) and a function receiving it as a parameter: CREATE FUNCTION Test ( @in MyType READONLY ) RETURNS @return MyType AS ... can it return MyType or only TABLE repeating MyType's structure: CREATE FUNCTION Test ( @in MyType READONLY ) RETURNS @return TABLE (foo INT)...

SQL Server Reporting Services - output subreports to individual files

Hi, I have a parent report that generates a series of subreports. After clicking the preview button, I can see the final report built with the actual data, and I may print it or save it to file. File may be a MS Word doc, a PDF or others. Perfect. I can do that individually to each report I need. My problem: I have a base report that wil...

SQL Server: Must numbers all be specified with latin numeral digits?

Does SQL server expect numbers to be specified with digits from the latin alphabet, e.g.: 0123456789 Is it valid to give SQL Server digits in other alphabets? Rosetta Stone: Latin: 01234567890 Arabic: ٠١٢٣٤٥٦٧٨٩ Bengali: ০১২৩৪৫৬৭৮৯ i know that the client (ADO) will convert 8-bit strings to 16-bit unicode strings using the curre...

Are all deadlocks caused by a bad query

"Transaction (Process ID 63) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly." ...

Error converting data type varchar to numeric.

Update table set Test = Convert(varchar(53), Cast(Phone_Number as Decimal)) ...

SQL Server: What locale should be used to format numeric values into SQL Server format?

It seems that SQL Server does not accept numbers formatted using any particular locale. It also doesn't support locales that have digits other than 0-9. For example, if the current locale is bengali, then the number 123456789 would come out as "১২৩৪৫৬৭৮৯". And that's just the digits, nevermind what the digit grouping would be. But the ...

My VARCHAR(MAX) field is capping itself at 4000; what gives?

Hello all... I have a table in one of my databases which is a queue of emails. Emails to certain addresses get accumulated into one email, which is done by a sproc. In the sproc, I have a table variable which I use to build the accumulated bodies of the emails, and then loop through to send each email. In my table var I have my body colu...

Performance logging tips

I am developing large data collecting ASP.Net/Windows service application-pair that uses Microsoft SQL Server 2005 through LINQ2Sql. Performance is always the issue. Currently the application is divided into multiple larger processing parts, each logging the duration of their work. This is not detailed and does not help us with anything...

sql server ports 445 and 1433

What is the differnet between those sql server ports 445 and 1433 and for what every port intended ? ...

TRY CATCH with Linked Server in SQL Server 2005 Not Working

Hello, I am trying to catch sql error raised when I execute a stored procedure on a linked server. Both Servers are running SQL Server 2005. To prove the issue I have created a stored procedure on the linked server called Raise error that executes the following code: RAISERROR('An error', 16, 1); If I execute the stored procedure dir...

Database Change Management - Setup for Initial Create Scripts, Subsequent Migration Scripts

I've got a database change management workflow in place. It's based on SQL scripts (so, it's not a managed code-based solution). The basic setup looks like this: Initial/ Generate Initial Schema.sql Generate Initial Required Data.sql Generate Initial Test Data.sql Migration 0001_MigrationScriptForChangeOne.sql 0...

SQL Server Management Studio Express 2005 has no Configuration Manager

Where is the configuration manager for SQL Express 2005? I need to configure SQL Server for TCP/IP but there is no configuration manager with the package. I see SQL Server Database Publishing Wizard, I see SQL Server Migration Assistant for Access, but no Configuration Manager. According to the MSDN, there should be one. I've even lo...

Filesystem synchronization library?

Hi, I've got 10 GB of files to back up daily to another site. The client is way out in the country so bandwidth is an issue. Does anyone know of any existing software or libraries out there that help with keeping a folder with its files synchronized across a slow link, that is it only sends files across if they have changed? Some kind o...

Transaction Isolation Level of Serializable not working for me

I have a website which is used by all branches of a store and what it does is that it records customer purchases into a table called myTransactions.myTransactions table has a column named SerialNumber.For each purchase i create a record in the transactions table and assign a serial to it.The stored procedure that does this calls a UDF fu...

create table (structure) from existing table

how to create new table which structure should be same as another table i tried, Create table dom as select * from dom1 where 1=2 but its not working error occured ...