SQL Server Agent doesn't turn on after upgrading from SQL EXPRESS to SQL Standard

I upgrade the SQL 2014 Express to a Standard edition without changing the instance name. There was a success and it seems to be working fine, except the SQL AGENT. Error message from configuration manager: The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable […]

Anonymous User Table Types as Parameter Types in T-SQL

I have a large number of stored-procedures planned for my project that all perform MERGE operations with user-supplied data which is passed into the stored procedure via TABLE parameters. The syntax for such is this: CREATE PROCEDURE dbo.MergeFoo @values dbo.FooTableType READONLY AS BEGIN MERGE dbo.Foo AS [target] USING @values AS [source] ON — yada WHEN […]

Error SQL Server attempt to attach an auto-named database

I get this error: An exception of type ‘System.Data.SqlClient.SqlException’ occurred in System.Data.dll but was not handled in user code Additional information: An attempt to attach an auto-named database for file C:\Program Files (x86)\IIS Express\DB Report.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC […]

Syntax error in SQL statement when I try to execute a TSQL script against an H2 dataBase on Java

I try to execute a TSQL script from a Java program against a H2 in memory data base, but I can not get it to work. I tried to use the right option to the DB url to specify it’s in MS SQL server mode, don’t work.. here’s my code : Class.forName(“org.h2.Driver”); System.out.println(“Driver O.K.”); Connection […]

Connect to sql server 2016 named instance without specifying Port number

I have installed named instance of SQL Server 2016 and configured it to accept remote connections. I have added UDP port 1434 to the firewall (and I have turned off the firewall altogether). SQL Server Browser service is running and had been restarted a number of times as has the SQL Server service. TCP/IP and […]

SQL Server Table to MySQL Table

I have a problem when importing a table form SQL Server to MySQL. This is what I do: First I export a CSV file with the data of the table Clients from SQL Server. Then I import that CSV file to an auxiliar table in MySQL. Finaly, I execute a query to insert the new […]

SQL want to ask about Select clause

I have this SQL statement: select max(avrg) from (select sum(points) as avrg from marks group by num_eleve) s; I had problems making it work and turns out that I needed the s at the very end, without it the statement fails. I want to understand what the s does, In other words, why does the […]

Searching for non-visible characters

I’m troubleshooting some strangeness in output of my SQL Server when I want to get records that are not null or empty string: SELECT myString FROM myTable WHERE myString IS NOT NULL OR myString != ” In addition to records that obviously fit (string values returned to SSMS’s grid) I’m seeing records where the grid […]

A slow query in Oracle (runs fast in SQL Server) (a correlated subquery)

We are annoyed by the symptom below. We would appreciate any advice from you about the cause of it and the way to resolve it. I run the simple query below and it took 3,800 seconds for Oracle DB to return the result, while the same query completes in a few seconds in a SQL […]

How to connect SQL Server 2008 R2 to PHP?

I’m using XAMPP locally as my server for the project and database, I need one MySQL database (locally) to save data but I need to connect to another database (on the same network) to get the registred users, this database is on a SQL Server 2008 R2 Server. How can I connect my project with […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.