What's the sql exception error number if the maximum limit of the database has been reached

For example SQL Server 2005 Express has a limit of 4gb on the database size, and it has been reached after cumulative inserts of data. What will be the corresponding error number?

Fast Stored Procedure but slow when executing using jobs

I have a stored procedure which runs fast when executing it or highlighting the script an hitting f5 which usually runs or executes the code. It only took a second or 1.5 seconds just to select top 3 from 1 table which is from one server and insert it to another table which is also […]

C# fails to delete database

when I’m trying to delete a database using c#, method Microsoft.SqlServer.Management.Smo.Server.KillDatabase(String database). it fails. Error message is System.Data.SqlClient.SqlException: User does not have permission to alter database ‘My_Database_Name’, the database does not exist, or the database is not in a state that allows access checks. ALTER DATABASE statement failed.”. Things I know : 1) Database exists; […]

Creating a Trigger to update another Table in SQL Server

I’m trying to create a trigger in SQL Server. I’m inserting data into the database through forms that I made in Access. When I create a new record that gets inserted into my SALESDETAILS table, I want it to subtract the quantity (column) that was just entered in from my In Stock (column) in my […]

'<number>D' causes CAST to error

I’m finding this to be truly bizarre behaviour. Here is my T-SQL: declare @testText nvarchar(1000); set @testText = ’17D4,A,1′; select txt_value from fn_ParseText2Table (@testText , ‘,’ ) where fn_ParseText2Table is a function that parses the text into a table where you can get the txt, int, and floating point values, if they work. The 17D4 […]

How to generate a configuration file for SQL Server 2012 Express?

I want to generate a configuration file for SQL Server 2012 Express, I found Microsoft answer here: Install SQL Server 2012 Using a Configuration File But there is no Ready to Install page! Please help me to accomplish that. Thanks in advance

Query server for unused procedures

I would like to write a query to find all procedures in the database that are not in use. I have one piece of code that lists all the procedures in the database: SELECT p.name AS ‘SP Name’ FROM sys.procedures AS p WHERE p.is_ms_shipped = 0 ORDER BY p.name I have also another piece of […]

Nested table type in SQL server

How can I define a table type in SQL server when one of the columns is an array of decimals? I’m trying to pass to stored procedure an .NET object one of the fields of which is an array of decimals. Thanks

SQL Server : issue with stored procedure with multiple result sets

I’m trying to get multiple result set from a stored procedure in EF5. I’m trying to cut the number of database round-trips for the most expensive functions in our platform. We have a view that updates through server sent events. When the view data changes every user needs to receive their custom view with the […]

Case statement in Hibernate JPA

I’m getting the below error can someone please help me. 2015-04-16 12:17:26,330 ERROR [http-8080-Processor23] ErrorCounter – line 1:225: unexpected token: – 2015-04-16 12:17:26,345 ERROR [http-8080-Processor23] ErrorCounter – line 1:253: unexpected token: else 2015-04-16 12:17:26,345 ERROR [http-8080-Processor23] ErrorCounter – line 1:327: expecting CLOSE, found ‘.’ Here is my query.. public List<DwnGactABForFile> getDwnGactABForFile(String sqlCrit) throws DataAccessException { […]

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