sql-server-2008-r2's questions - Chinese 1answer

3.612 sql-server-2008-r2 questions.

Can I force a user's queries to always run with the hint NOLOCK? e.g. they type select * from customer But what is executed on the server is select * from customer with (nolock) This question is ...

SQLDependency Notifications work fine logged in as Windows Domain User, using Trusted Connection. But not as SQL-User: I created a db login, user and role as follows: CREATE LOGIN myLogin WITH ...

I am attempting to set up and oracle publisher on a sql server 2008R2 server, but I am getting the following error. "Unable to run SQL*PLUS. Make certain that a current version of the Oracle client ...

We have an issue with database mirroring on one of the databases on our sql instance where mirroring is suspended for almost 15 hours now. DB is 200 GB on SQL server 2008R2 Sp3+cu with latest patched ...

I came across this old article on Brent Ozar's blog (written by Kendra Little) regarding Fill Factor: https://www.brentozar.com/archive/2013/04/five-things-about-fillfactor/ In it, she briefly ...

I will be working on a project shortly that would involve moving the replicated databases off of old to the new SQL Server instance. I haven't done this in the past so I don't have much knowledge ...

I am writing a package to upload result of query to FTP as CSV file. Package is working fine on local machine, but after transferring .dtsConfig and .dtsx on another environment it throws following ...

Is there a quick way to find all columns in SQL Server 2008 R2 that are encrypted/have encrypted data? I need to nullify the data in all encrypted columns in a development server (according to our ...

I'm not a DBA, but our company doesn't have one. We're running SQL 2008 R2 on Windows 2008 R2 and noticed our SQL server service has been terminating and restarting several times per day, during peak ...

I'm trying to GRANT permission for an SQL login to access the functions fn_db_log and fn_dump_dblog but GRANTing SELECT on the function still fails with error: Msg 9010, Level 14, State 1, Line 3 ...

I am trying to create a data-driven subscription on 2016 My SQL server(Enterprise Edition). My report takes 4 parameter A = year B = Quarter C = Practice D = Provider in that practice Please ...

What happens to the foreign key relationships on a table if that table is renamed?

I have some code that uses Entity Framework to call a stored procedure in SQL Server. If I run SQL Profiler and filter by the database it is calling, I can see that the profiler correctly shows the ...

I have two databases with the same data, one on an SQL Server 2008 R2 instance, and one on an SQL Server 2016 instance. Both SQL Server instances are on the same machine, and the database files are on ...

I'm looking into providing DB level change tracking within my system. I need to be able to track changes at an entity level, rather than just individual tables. Right now, we have triggers on each of ...

I'm trying to restore a local database on my server, but I'm having problems with the backup. I did a file .bak but every time I try to load it on the server it doesn't let me. Here's a screenshot of ...

I've received a database that was previously on SQL Server 2008R2 but was just put on a SQL Server 2014 instance. There were no maintenance tasks run of any kind run on the database since 2014 (e.g. ...

I am wanting to compare the Distinct sn from HMI_Temp to sn in my table HMI -> if the sn exists, I want to update the values - got this syntax CHECK! - if the sn does NOT exist, I want to insert the ...

I have setup an Extended Events session in SQL 2008 R2 to track the deprecation_final_support and deprecation_announcement events. I noticed some "deprecation_announcement" events in my log with "...

I want to create a SSDT database project that is supposed to be deployed on a Sql Server that has several linked servers to other servers. The database ("MyBusinessDB") on those remote servers is in ...

I have been assigned to try and make collations uniform across databases. Currently, it's a mess, different collations everywhere. This is mostly solved by using collate database default in queries ...

I am in the process of trying to identify a client application which uses one of the SQL Servers I support (2008 R2). Periodic queries against sys.dm_exec_sessions regularly return sessions whose ...

Every time a new row is added to the table below, I want the sequence (Import Permit No) to be increased by 1....20160001, 20160002, etc and reset to 20170001, 20170002, etc in a new year. CREATE ...

When accessing SQL Server with SSMS versions (2012/2014 and 2016), opening the databases list from the object explorer is really slow. If I try it using SSMS 2008 R2 on the same instance the result is ...

Is there a way to find the differences in two SQL Server databases (schema only). One is local and the second is at a customer's site. We are experiencing problems with crystal reports running some ...

I have a few users that are unexpectedly receiving this error message today when they attempt to refresh a stored procedure via Excel: The EXECUTE permission was denied on the object 'SPROC', ...

We have a peer-to-peer replication setup on our real time servers I want to delete records from some of the tables that are involved in the replication. I'm using a stored procedure to do this. Some ...

I want to schedule a Full Text Index's population to keep it more up to date rather than leaving it to Automatic and not knowing the next population time as the users are complaining about the data ...

I have SQL Server 2008R2 installed on my Windows server 2008. I created a package using the Import and Export Wizard from file system. After that I created a job (SQL Agent Job ) that used the SSIS ...

I'll lead with this: Perhaps the database design is wrong, so I will accept a re-design as a solution! Consider the following table: ID | TypeA | RefA | TypeB | RefB -- + ----- + ---- + ----- + ---- ...

I recently had a problem while installing Visual Studio 2012 and SQL Server 2008 R2 on a new development machine. My installation sequence was Visual Studio 2012 then install SQL Server 2008 R2. An ...

I could fix this issue with the following steps: Create login Create DBO user and assign it to a specific database ADD this user to the MASTER database ( create user x for login x) DENY SELECT On ...

I have defined a Maintenance Plan in Microsoft SQL Server 2012. It doesn't execute and it says DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) ...

How do I find out the differences in data between the two tables that have exact schema, and how to produce synchronisation SQL to get the union results (without duplicates) ? These are the 2 ...

I'm running into quite a strange problem. I'm running the same script to generate data and do some matching later on, on an older 2008R2 instance. The last query (an UPDATE) does a single table scan ...

I am connecting to SQL Server (2008 R2) over open Internet and properly encrypting the connection is essential. I have COMODO certificate with two intermediate certificates between root CA and server ...

Microsoft's technical guide for SQL Server upgrade references two upgrade paths: in-place and side-by-side. I don't see a third, visibly more viable/convenient option, which is to do an in-place ...

What's the best way to add columns to large production tables on SQL Server 2008 R2? According to Microsoft's books online: The changes specified in ALTER TABLE are implemented immediately. If the ...

SQL Server 2008r2 I'm trying to drop a certificate I've created but i get the following error The certificate cannot be dropped because one or more entities are either signed or encrypted using ...

I have two servers running SQL Server. Server 1: SQL Server 2008 R2 Express (4 core) Server 2: SQL Server 2012 Developer Edition (8 core) As far as I am aware SQL Server 2008 R2 Express should only ...

I am trying to query two tables and get results like the following: Section Names shoes AccountName1, AccountName2, AccountName3 books AccountName1 The tables are: CREATE TABLE dbo....

I'm sure there's a trace here running and creating logs. I have no idea who did this in the past ( Its here since my first day in this company ). There's no trace of it on sp_whoisactive. Activity ...

I know the premise of a PIVOT() this syntax produces it perfectly for me: Select * FROM ( Select field1 ,annual ,dv As Amt FROM Testing ) x pivot ( SUM(Amt) ,for annual IN ([2014],[...

After installing SQL Server 2008 R2, it wants a server name. I tried SQLCMD -L on cmd, but it shows the error below: Data source name not found and no default driver specified What am I doing ...

I've been seeing some SMTP errors in my database mail logs. So I have a set up a test SQL Agent job that runs every ten minutes (it's only action is to SELECT NULL). It is set to send email ...

MS-SQL 2008 R2 (Dell, 2 CPU) This query takes two minutes to run, which is too slow. SELECT * FROM t_events WITH (NOLOCK) WHERE order_no = 2783190 and event_no <= ( SELECT MIN(event_no) ...

Theres a lot of questions here on DBA EXCHANGE. But none of them can help me. I have 2 problems: 1) Using sp_whoisactive, I found lots of sys.sp_reset_connection;1( I know they are ...

Morning, All - I'm currently working on some SQL logic, and wanted to get some input on it. What I'm trying to accomplish is the following (Psuedo-code): When a record is inserted into Table A - IF ...

If I have a batch of two different SELECT statements, is it possible for them to be executed in parallel (if the SQL Optimizer deems it to be the most efficient execution method)? If the first SELECT ...

I have a 170 GB table that is no longer referenced. I want to move that table to another server. I tried these options in staging: select into 8 GB table to another db - 1.47 min SSIS package - 6 ...

Related tags

Hot questions

Language

Popular Tags