SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.

learn more… | top users | synonyms (3)

3
votes
2answers
178 views

How to import blanks as nulls instead of zeros while importing txt using wizard

I'm using the Import Wizard to load a text file and need blanks in integer fields to be nulls, but only zeros are inserted. How to import it properly?
1
vote
1answer
393 views

Installing SQL Server 2012 error

I am installing SQL Server 2012 on Windows 7 Enterprise on a company laptop. I am getting SQL Server Setup failure An invalid return code was encountered waiting for a program to execute. ...
3
votes
1answer
74 views

Can SQL Server 2012 FCI have multiple names?

Is it possible to have multiple names for the same SQL Server Failover Cluster Instance (virtual server)? IT has a naming convention they like, but it hard codes the Windows cluster name into the SQL ...
0
votes
0answers
18 views

How to align restore strategy with backup history cleanup? [duplicate]

I was curious about how that particular problem is tackled. 1) Full backups performed on saturdays. 2) Differentials every other day. 3) Tlog backups every 15 minutes. When trying to restore a ...
0
votes
0answers
169 views

Microsoft.ACE.OLEDB.12.0 Error when querying Excel

I am running the following query: SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 8.0;Database=D:\GSS.xlsx;HDR=YES', ...
5
votes
2answers
232 views

How to name table-variable function unique constraint?

I am renaming some unique constraints to match our database objects naming convention. Strangely, there are several multi-line table valued function which returned table has unique constraints as ...
0
votes
2answers
134 views

What is the alternate to SA account in SQL Server? [closed]

My client is currently using SQL Server for their app. At this time they are using SA account everywhere. For security reasons we need to disable the SA account. The solution I've is create another ...
2
votes
1answer
301 views

SSIS package fails intermittently with: Unsafe assembly 'microsoft.sqlserver.integrationservices.server, version=11.0.0.0

I have an SSIS package deployed to the SSIS catalog on my Data warehouse which has run successfully for months. The package is executed by a SQL agent job. Now it fails intermittently with the ...
0
votes
0answers
28 views

How to shrink the .ldf(log) file of the particular live production database? [duplicate]

I would like to say that as one of my production database (.ldf) log file is growing larger than databse size. The size of database file (.mdf) and their log file (.ldf) is as follows:- 1)database ...
1
vote
1answer
16 views

No priviligies to create table in custom database

I'm using locally installed express edition of SQL server. CURRENT_USER = dbo, and I used win authentication. The database was successfully created this way: CREATE DATABASE [online_banking] ON ...
0
votes
1answer
58 views

Availability Group failover stuck in Resolving State

I am setting up a lab for testing automatic failover for SQL Server I have a 2 node WSFC (SQL-CLUSTER-TEST-01) with the nodes SQL-TEST-01 SQL-TEST-02 A listener SQL-HA-GRP-01 My initial testing ...
1
vote
0answers
113 views

xp_delete_file not working

I am running a query window under my own account and the following command: DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_delete_file 0, N'\\backup\sql', 'bak', '2015-11-24T23:30:02' ...
4
votes
1answer
338 views

Getting a proxy account to backup to a share using Ola Hallengrens backup script

I have a SQL Server 2012 Standard install where the Engine and Agent are running under the default NT Service accounts Engine - NT Service\MSSQLSERVER Agent - NT Service\SQLSERVERAGENT I am trying ...
4
votes
1answer
104 views

Getting Unavailable dates for renting a product that has stocks

Database queries, normally so simple, yet sometimes so difficult. (brain trainer) So I have products, stocks and rentStockOrders. These products can be rented for a set of days. The stocks also have ...
1
vote
1answer
69 views

Cursor with Begin and End Transaction

I've got the following script that keeps hanging on the 2nd iteration through the loop. BEGIN BEGIN TRY BEGIN TRANSACTION DECLARE @itemID int DECLARE LoopCursor CURSOR FOR ...
1
vote
2answers
77 views

Locked TempDB Log

So we're running into an issues where TempDB's log is currently locked up. After checking log_reuse_wait_desc, we see that it is locked from an active transaction. Now the weird part is that when we ...
2
votes
1answer
100 views

Change port number for SQL 2012 Cluster

I have been trying to change the port number of a SQL 2012 cluster with little success. I had thought that I could just do this the same way as normal through configuration manager however, even with ...
0
votes
1answer
46 views

Change database used for SQL Server Integration Services logging

The SQL Server Best Practices Analyzer noted that my Integration Services' logging table is in a system database. It recommends that I move this to a non-system database. (See here) How do I make ...
0
votes
1answer
32 views

SQL Server Merge mandate

Does the target table need to be identical to source table schematically? Specifically: 1) do they need to have the same number of columns and do the column types must be the same?, 2) do the column ...
1
vote
1answer
34 views

How to determine how much storage to store backups?

I was thinking about this question ( Here where I work, we have a lot of space so backups are dayli ok ), and i'm thinking about if I was hired in another company, and see that they don't have ...
0
votes
1answer
151 views

Is it possible to configure multiple database mail id in single account name in sql server 2012?

I would like to say that as i want to configure multiple database mail in single account name in sql server 2012. This is SQL-Cluster-DB , so as per direction from head, If any sql job will fail , ...
2
votes
2answers
70 views

CTE To Use Alternate Select When Select Returns No Rows

I have created a involved CTE, no recursion, with multiple selects being done as it processes the business logic of the requirement. But I have been advised that the logic needed for the scenario ...
22
votes
4answers
2k views

Copying (hundreds of) tables from one server to another (with SSMS)

I have several hundred (currently 466, but ever growing) tables I have to copy from one server to another. I have never had to do this before, so I'm not sure at all on how to approach it. All the ...
3
votes
0answers
88 views

Rebuild index online without risk to other requests

We have a SQL Server 2012 Enterprise Edition database whose indices fragment very quickly. We use a maintenance plan that reorganizes those indexes daily, and rebuilds them weekly. The rebuild ...
-3
votes
1answer
43 views

Design for table

I have a table: TABLE ( A int, B int, ..., H int, DataValue float ); All of my queries do aggregate operations, with A and some other columns (several combinations) in the WHERE clause (A is ...
1
vote
1answer
17 views

Restore a specific file group to a test environment without restoring the Primary file group (Error 3154)

Scenario. I have a filegroup that we need to restore to get data back that has been removed from the database after the last backup I cannot touch The production systems because they are running ...
0
votes
2answers
118 views

Stored procedure optimization

In my application I am using the below stored procedure, but it is taking a long time to execute. Both tables contain millions of records. Please guide me to optimize this procedure. I have searched a ...
1
vote
0answers
292 views

Sudden PRIMARY KEY violation on IDENTITY column

I have a log table with an ID identity column. Everything works fine for years; then, yesterday, I see the following error in the logs: The statement has been terminated. Violation of PRIMARY ...
0
votes
2answers
120 views

How to install SQL Server 2012 on Windows 10

Currently this has been a huge pain for me. I have a fresh Windows 10 VM. I Installed SQL Server 2012. I open up the SQL Server Studio 2012, and there is no server name that I can choose from in the ...
4
votes
2answers
172 views

Contained DB Collation error

When changing a database to partially contained I am getting the following error: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "Latin1_General_100_CI_AS_KS_WS_SC" in ...
1
vote
1answer
396 views

Trying to use SMO Transfer Object to transfer a database from one instance to another

The schema tables are owned by dbo and another schema name. The code below is not moving over any tables. Is there something else that I need to add to make it transfer the tables? There are no stored ...
1
vote
0answers
39 views

Restoring SQL Server 2012 Enterprise to Web Edition not possible due to full text partitioning

I have an SQL Server 2012 Enterprise database I’m trying to restore to SQL Server 2012 Web Edition instance. I’ve used sys.dm_db_persisted_sku_features to find features to remove before a ...
2
votes
1answer
133 views

Deterministic function for getting today's date

I am trying to create an indexed view using the following code (so that I can publish it to replication it as a table): CREATE VIEW lc.vw_dates WITH SCHEMABINDING AS SELECT DATEADD(day, ...
2
votes
1answer
243 views

SQL Bulk Insert Impersonation issue

I am running Microsoft SQL Server 2012 SP on a Windows Server 2008 R2 Standard SP1 box. The SQL Server service is running as a simple windows domain user (nothing special, no admin rights, etc.) I am ...
0
votes
2answers
181 views

Force Sql server to use index seek in merge join

I am testing Merge join in sql server. I have an INNER JOIN and force the optimizer to do MERGE JOIN: ID in Personal Table is a Primary key ID in Abteilung Table is a primary key There is no other ...
1
vote
1answer
120 views

Significance of has_unchecked_assembly_data due to a persisted computed column after changing compatibility level?

This database has a persisted computed column, which is computed by calling a .NET function. When changing compatibility from MSSQL 2005 to 2012, I was presented with error 10334, which looks more ...
2
votes
2answers
204 views

Parsing Typed XML with a default namespace and inconsistent root node

I have a structured, typed xml file. <WebService xmlns="http://www.orbis-software.com/WebSvcCon"> <NewLeads> <OutputSchema> <root xmlns="" type="array"> <item ...
1
vote
0answers
54 views

How to see text of the query which triggers the trigger inside trigger?

I have very small database with a bit complex triggers which works very slow. Those triggers are written to extend business logic (becase we can not manage the code of the application we are using). ...
0
votes
4answers
75 views

Expected Performance of MSSQL [closed]

We have a client who has been having performance issues. One of the developers is saying that a select * from a table is taking ~50 seconds to perform the query (no joins just straight select with no ...
0
votes
1answer
37 views

Query to combine each duplicate found entry

Hey all I am wanting to create a query so that I can combine each of the found duplicates into one entry. An example of this is: Name | ID | Tag | Address |carNum ...
1
vote
0answers
27 views

SSIS DTSPackageType behaviour

I created a new SSIS package within Visual Studio 2013 with SSDT BI Tools (12.04.2430.0) installed bu when looking into this package I can see that the DTSPackageType is set to DTSDesigner100. Based ...
0
votes
0answers
49 views

Which Azure service for use as data warehouse/analysis store?

We currently have a database running in SQL Server 2012 Standard. We need to export data periodically (a "data dump") of a particular set of data to "a location to be decided" where the client's ...
2
votes
1answer
60 views

Help with multiple select into

I have a ~300 million row table with a column that has 9 different values. I need to be able to select into 9 different new tables based on this column. At the moment it has to do 9 separate table ...
3
votes
1answer
69 views

What about redundancy if distributor goes down?

I'm setting up load balancing, transactional replication and mirroring. However, what I actually thought might work from the beginning, making the system redudant doesn't actually work because a ...
0
votes
1answer
45 views

Application service down due to SQL Server error

I'm using SQL Server 2012 where in I found an error in my SQL Server error logs which says: Logon,Unknown,The login packet used to open the connection is structurally invalid; the connection has ...
1
vote
1answer
55 views

Setting up SQL Server to handle queries from external domains

I am not a SQL Server admin. I have tried to google this but can't seem to use the right words to get the right info and they all talk about remote connections to a SQL Server in terms of admin and ...
1
vote
3answers
462 views

How to decrease RAM usage of SQL Server 2012 without restarting Service

Is there a way of decreasing RAM usage of SQL Server 2012 without restarting it? Setting up MAX Memory usage is not an option as it's quickly building up to limit I have set and then app based on ...
0
votes
2answers
74 views

SQL Server 2012 Login Failure

As of this morning we have had thousands of failed login attempts to our SQL Server 2012 box. Error : Login failed for user 'Domain\User'. Reason: Infrastructure error occurred. Check for ...
0
votes
1answer
51 views

Choosing Between SQL Server 2008 R2 and SQL Server 2012 - Which to learn about first? [closed]

As the title suggests, I'd like to get advice on which version should I learn about first? Most online courses now emphasize on 2012 and Microsoft no longer gives out exams on SQL Server older than ...
4
votes
1answer
80 views

SQL Server Memory Shrinking

I had a strange issue today on a 3rd party vendor's SQL Server. This is a VM running SQL Server 2012 SP1. The min and max memory settings are set to 9GB. Task manager showed SQL Server was getting the ...