Datetime issue SQL Server 2008R2
My server has
System Locale en-gb; English (United Kingdom)
Input Locale en-gb; English (United Kingdom)
SQL account @@language is British
I can insert the value '2013-01-18 16:05:21.683' into a DATETIME2 field but when trying to insert the same value into a DATETIME field I get the following error
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
I can insert the value '2013-01-18T16:05:21.683' into the datetime field OK.
Why does it allow the insert into datetime2 but not datetime?
Thanks
Thanks everyone for looking at this. I know how I can get around the issue
I just wanted to know why entering the same value string into a datetime2 field works but doesn't into a datetime?
Both statements will be using the same language and dateformat settings. I would expect both to work or both to fail, not one works and one doesn't.
Works
declare @datetime2 datetime2
set @datetime2 = '2013-01-18 16:05:21.683'
select @datetime2
Fails
declare @datetime datetime
set @datetime = '2013-01-18 16:05:21.683'
select @datetime
Ok to explain that please see below explanation from books online
datetime
ANSI and ISO 8601 Compliance
datetime is not ANSI or ISO 8601 compliant.
from
http://msdn.microsoft.com/en-us/library/ms187819.aspx
datetime2 (from
http://msdn.microsoft.com/en-us/library/bb677335.aspx)
ANSI and ISO 8601 Compliance
The ANSI and ISO 8601 compliance of
date and time apply to
datetime2.
and this is what date and time says for ANSI compliance
date (http://msdn.microsoft.com/en-us/library/bb630352.aspx)
ANSI and ISO 8601 Compliance
date complies with the ANSI SQL standard definition for the Gregorian calendar: "NOTE 85 - Datetime data types will allow dates in the Gregorian format to be stored in the date range 0001–01–01 CE through 9999–12–31 CE."
The default string literal format, which is used for down-level clients, complies with the SQL standard form which is defined as YYYY-MM-DD. This format is the same as the ISO 8601 definition for DATE
time (http://msdn.microsoft.com/en-us/library/bb677243.aspx)
Using hour 24 to represent midnight and leap second over 59 as defined by ISO 8601 (5.3.2 and 5.3) are not supported to be backward compatible and consistent with the existing date and time types.
The default string literal format (used for down-level client) will align with the SQL standard form, which is defined as hh:mm:ss[.nnnnnnn]. This format resembles the ISO 8601 definition for TIME excluding fractional seconds.
So as such it turns out that datetime2 merges ANSI format for date and time which is YYYY-MM-DD hh:mm:ss whereas datetime is not ANSI complaint and will only accept date values in string literal formats as per below
ISO 8601
YYYY-MM-DDThh:mm:ss[.mmm]
YYYYMMDD[ hh:mm:ss[.mmm]]
ie either with T as time part separator or without - characters in the date part
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Similar Messages
-
SQL Server 2008r2 issue for w8.1
Hi,
I am getting sql server 2008r2 compatibility issue for w8.1 whenever I try to installed it.Please check the attached screen shoot given bellowYou must read
Hardware and software requirements for SQl Server 2008 r2 before proceeding. You did not told edition of SQL server you are trying to install on windows 8.
Enterprise edition is not supported on windows 8
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Articles -
SQL Server 2008R2 memory issues
Hi Experts.
I have SQL Server 2008R2 installation,We allocated 102400MB(100GB) Memory out of 128GB Installed.
But Task manager is showing SQL Servr using 104 GB.Please some body let us know why SQL Server uisng more memory more than we allocated.
Please advise next step or recommendations if any
OS :Windows 2008R2 64bit.
DB:SQL Server 2008R2 64bit.
Thanks in advance.
Regards,But Task manager is showing SQL Servr using 104 GB.Please some body let us know why SQL Server uisng more memory more than we allocated.
You should not refer to task manager for SQL server memory consumption. Its windows tool it always wont show you correct value.
Please use below query to SQL Server memory utilization
select
(physical_memory_in_use_kb/1024)Memory_usedby_Sqlserver_MB,
(locked_page_allocations_kb/1024 )Locked_pages_used_Sqlserver_MB,
(total_virtual_address_space_kb/1024 )Total_VAS_in_MB
from sys. dm_os_process_memory
100 G limit is put on SQL Server buffer pool. SQL Server can still use memory more than 100 G because few memory allocations for objects like, XML,SQLCLR, Linked server, backup , database mail etc are allocated directly by windows and sys.dm_os_process_memory
does not tracks it. So just relax this is normal
Task manager only show Working set.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
Hello,
I had a server crash recently and our outsource hosting tech support suggested applying Cumulative Upade 12 for SQL server 2008R2 SP2 to fix the issue. The exception from our dump file "Warning: Unable to Verify TimeStamp for Path\ProgramName"
is not in the list of hotfixes for this CU. Do you know if this will fix this issue? The CU warns not to apply the CU if your issue id not addressed by the CU. Here is a portion of the dump file with the relevant error:
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(7e8.2ab4): Unknown exception - code 000042ac (first/second chance not available)
ntdll!NtWaitForSingleObject+0xa:
00000000`777412fa c3 ret
0:240> .sympath srv*c:\Websymbols*http://msdl.microsoft.com/download/symbols;
Symbol search path is: srv*c:\Websymbols*http://msdl.microsoft.com/download/symbols
Expanded Symbol search path is: srv*c:\websymbols*http://msdl.microsoft.com/download/symbols
0:240> .reload /f
.Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe, Win32 error 0n2
*** WARNING: Unable to verify timestamp for sqlservr.exe
..........Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlos.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for sqlos.dll
...............Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\opends60.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for opends60.dll
.......Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\BatchParser.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for BatchParser.dll
....Unable to load image C:\Program Files\Microsoft SQL Server\100\Shared\instapi10.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for instapi10.dll
*** ERROR: Module load completed but symbols could not be loaded for instapi10.dll
..Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\Resources\1033\sqlevn70.rll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for sqlevn70.rll
*** ERROR: Module load completed but symbols could not be loaded for sqlevn70.rll
Press ctrl-c (cdb, kd, ntsd) or ctrl-break (windbg) to abort symbol loads that take too long.
Run !sym noisy before .reload to track down problems loading symbols.
.................Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\ftimport.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for ftimport.dll
.Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\msfte.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for msfte.dll
*** ERROR: Module load completed but symbols could not be loaded for msfte.dll
...........Unable to load image C:\Windows\System32\sqlncli10.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for sqlncli10.dll
...Unable to load image C:\Windows\System32\1033\SQLNCLIR10.RLL, Win32 error 0n2
*** WARNING: Unable to verify timestamp for SQLNCLIR10.RLL
*** ERROR: Module load completed but symbols could not be loaded for SQLNCLIR10.RLL
..Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\xpsqlbot.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for xpsqlbot.dll
.Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\XPStar.DLL, Win32 error 0n2
*** WARNING: Unable to verify timestamp for XPStar.DLL
.Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlscm.dll, Win32 error 0n2
*** WARNING: Unable to verify timestamp for sqlscm.dll
...*** ERROR: Module load completed but symbols could not be loaded for odbcint.dll
...Unable to load image C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\Resources\1033\XPStar.RLL, Win32 error 0n2
*** WARNING: Unable to verify timestamp for XPStar.RLL
Thank you,
Steve -The error message appears to be related to a debug session and not come from the actual crash.
So all I know is that you hade a server crash. I don't even know exactly what that means. Did Windows bite the dust? Or was it only SQL Server?
Assuming the latter, I would expect the SQL Server errorlog to have some information (and that would be ERRORLOG.1 or earlier, since the server have been restarted), but if SQL Server died the output may be incomplete.
There may be also dump files, but as I rarely look into these, I am not sure how to interpret them. But I am quite confident that "Unable to verify TimeStamp..." is not the reason SQL Server went down.
I would suggest the following course:
* If the server is not critical, do nothing. As long as it has onlyl happened once, it has only happened once.
* If the server is critical, open a case with Microsoft if you are not able to figure out the reason yourself. The key here is "Unknown exception - code 000042ac".
* If it happens again, you should absolutely open a case. An important thing here is whether the stack dump is identical or something different. If the stack dumps are identical, you may have hit a bug in SQL Server or the OS, and applying CUs or OS
fixes could help if it is a known issue. If the stack dump is something else, you have ghosts in the machine - that is, bad hardware.
Erland Sommarskog, SQL Server MVP, [email protected] -
SQL Server 2008R2 SP2 Query optimizer memory leak ?
It looks like we are facing a SQL Server 2008R2 queery optimizer memory leak.
We have below version of SQL Server
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
The instance is set MAximum memory tro 20 GB.
After executing a huge query (2277 kB generated by IBM SPSS Clementine) with tons of CASE and a lot of AND/OR statements in the WHERE and CASE statements and muliple subqueries the server stops responding on Out of memory in the internal pool
and the query optimizer has allocated all the memory.
From Management Data Warehouse we can find that the query was executed at
7.11.2014 22:40:57
Then at 1:22:48 we recieve FAIL_PACE_ALLOCATION 1
2014-11-08 01:22:48.70 spid75 Failed allocate pages: FAIL_PAGE_ALLOCATION 1
And then tons of below errors
2014-11-08 01:24:02.22 spid87 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:02.22 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:02.22 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:02.30 Server Error: 17312, Severity: 16, State: 1.
2014-11-08 01:24:02.30 Server SQL Server is terminating a system or background task Fulltext Host Controller Timer Task due to errors in starting up the task (setup state 1).
2014-11-08 01:24:02.22 spid74 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:02.22 spid74 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 Server Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:13.22 spid87 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:13.22 spid87 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 spid63 Error: 701, Severity: 17, State: 130.
2014-11-08 01:24:13.22 spid63 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 spid57 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:13.22 spid57 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:13.22 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:18.26 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:24.43 spid81 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:24.43 spid81 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:18.25 Server Error: 18052, Severity: -1, State: 0. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:18.25 Server BRKR TASK: Operating system error Exception 0x1 encountered.
2014-11-08 01:24:30.11 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:30.11 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:35.18 spid57 Error: 701, Severity: 17, State: 131.
2014-11-08 01:24:35.18 spid57 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:35.18 spid71 Error: 701, Severity: 17, State: 193.
2014-11-08 01:24:35.18 spid71 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:35.18 Server Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:35.41 Server Error: 17312, Severity: 16, State: 1.
2014-11-08 01:24:35.41 Server SQL Server is terminating a system or background task SSB Task due to errors in starting up the task (setup state 1).
2014-11-08 01:24:35.71 Server Error: 17053, Severity: 16, State: 1.
2014-11-08 01:24:35.71 Server BRKR TASK: Operating system error Exception 0x1 encountered.
2014-11-08 01:24:35.71 spid73 Error: 701, Severity: 17, State: 123.
2014-11-08 01:24:35.71 spid73 There is insufficient system memory in resource pool 'internal' to run this query.
2014-11-08 01:24:46.30 Server Error: 17312, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:51.31 Server Error: 17053, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:51.31 Server Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
2014-11-08 01:24:51.31 Logon Error: 18052, Severity: -1, State: 0. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
Last error message is half an hour after the inital Out of memory at 2014-11-08 01:52:54.03. Then the Instance is completely shut down
From the memory information in the error log we can see that all the memory is consumed by the QUERY_OPTIMIZER
Buffer Pool Value
Committed 2621440
Target 2621440
Database 130726
Dirty 3682
In IO
0
Latched
1
Free
346
Stolen 2490368
Reserved 0
Visible 2621440
Stolen Potential 0
Limiting Factor 17
Last OOM Factor 0
Last OS Error 0
Page Life Expectancy 28
2014-11-08 01:22:48.90 spid75
Process/System Counts Value
Available Physical Memory 29361627136
Available Virtual Memory 8691842715648
Available Paging File 51593969664
Working Set 628932608
Percent of Committed Memory in WS 100
Page Faults 48955000
System physical memory high 1
System physical memory low 0
Process physical memory low 1
Process virtual memory low 0
MEMORYCLERK_SQLOPTIMIZER (node 1) KB
VM Reserved 0
VM Committed 0
Locked Pages Allocated 0
SM Reserved 0
SM Committed 0
SinglePage Allocator 19419712
MultiPage Allocator 128
Memory Manager KB
VM Reserved 100960236
VM Committed 277664
Locked Pages Allocated 21483904
Reserved Memory 1024
Reserved Memory In Use 0
On the other side MDW reports that the MEMORYCLERK_SQLOPTIMIZER increases since the execution of the query up to the point of OUTOF MEMORY, but the Average value is 54.7 MB during that period as can be seen on attached graph.
We have encountered this issue already two times (every time the critical query is executed).Hi,
This does seems to me kind of memory Leak and actually it is from SQL Optimizer which leaked memory from buffer pool so much that it did not had any memory to be allocated for new page.
MEMORYCLERK_SQLOPTIMIZER (node 1) KB
VM Reserved 0
VM Committed 0
Locked Pages Allocated 0
SM Reserved 0
SM Committed 0
SinglePage Allocator 19419712
MultiPage Allocator 128
Can you post complete DBCC MEMORYSTATUS output which was generated in errorlog. Is this the only message in errorlog or there are some more messages before and after it.
select (SUM(single_pages_kb)*1024)/8192 as total_stolen_pages, type
from sys.dm_os_memory_clerks
group by typeorder by total_stolen_pages desc
and
select sum(pages_allocated_count * page_size_in_bytes)/1024,type from sys.dm_os_memory_objects
group by type
If you can post the output of above two queries with dbcc memorystaus output on some shared drive and share location with us here. I would try to find out what is leaking memory.
You can very well apply SQL Server 2008 r2 SP3 and see if this issue subsides but I am not sure whether this is fixed or actually it is a bug.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
SQL Server 2008R2 Download Link
Hi All,
After browsing for SQL Server 2008R2 enterprise evaluation edition I came across below link for SQL Server 2008 evaluation but not R2.
http://www.microsoft.com/en-US/download/details.aspx?id=1279
Please share me the link if available for SQL Server 2008R2 enterprise evaluation edition.
Regards,
Kalyan
Grateful to your time and support. Regards, ShivaHi Kalyan,
I found below link from Alberto Morrillo's post you can download from below
http://sqlserver.dlservice.microsoft.com/download/9/C/0/9C036510-3218-4258-8B03-67DC1D6A497C/SQLFULL_ENU.iso?lcid=1033
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
Hi frnz ,
while am installing the SQL Server 2008R2 edition in Windows 7 professional servicepack1 machine is not instlling properly.
am follwing the installtion stups.
instiall two stups is going fine next .after completion of the following setup install comp( see the screen shoot below)nothing is happens ,its not going foreword further stups.
Can some one please help me out for this......
I will found in the Task manager the set up file is Running....Hi Ychinnari,
Based on your description, you fail to install SQL Server 2008 R2 on Windows 7 SP1.
According to the screenshot, we need to verify that if SQL Server 2008 R2 setup disappears when installing setup support files. If so, please post the error message from SQLSetup.log file of the temp folder for analysis. Click on start->run and
type %temp % and press enter, you will navigate to the temp folder. For more details, you can review this
blog. Also, please help to collect the summary and detail logs, by default, the logs can be found in: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log.
In addition, there are some proposals for you troubleshooting this issue.
1. Ensure that your system meets the
hardware and software requirements for installing SQL Server 2008 R2.
2. Make sure that you install SQL Server 2008 R2 with a admin account, and please choose “Run as administrator” to complete installation.
3. Make sure that previous installations of SQL Server has been uninstalled completely from your computer. For more details, please review the similar blog:
SQL Server 2008 R2 Setup starts and then disappears.
4. Stop any Anti-Virus software when installing SQL Server 2008 R2.
Thanks,
Lydia Zhang -
Unable to edit maintenance plan Sql Server 2008R2
Hi All,
I am unable to edit sql server maintenance plan and it is failing continuously from job as well.When I try to open the same the throws an error:
Microsoft SQL Server Management Studio is unable to load this document.:
Error loading from XML. No further detailed error information can be supplied for this problem because no Event objects was passed where detailed error information can be stored. It used to work pretty well in the past.Throws same error when I try to connect
remotely.
Regards
RahulHas the MP been developed in SQL Server 2008r2 as well?
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Equivalent datatype in Oracle for datetime of SQL Server
Hello Everyone,
I'm very much new to Oracle. I have been working with SQL Server since 3yrs. Currently I'm working with Oracle 11g.
What is the equivalent datatype in oracle for datetime in sql server with which has the format YYYY-MM-DD HH:MM:SS?
I tried with timestamp and date which didnt solve my prob.... Please help me in using the equivalent datatype for the format provided above...
Regards,
Bhanu Yalamanchi.Oracle date format can be anything you want, either by default at the session level or preferably explicitly using to_char and a format mask.
Format masks are documented here.
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements004.htm#CDEHIFJA
SQL> create table t (d date);
Table created.
SQL> insert into t values (sysdate);
1 row created.
SQL> select * from t;
D
19-JUL-11
SQL> alter session set nls_date_format = 'YYYY-MM-DD HH:MI:SS';
Session altered.
SQL> select * from t;
D
2011-07-19 08:27:59
SQL> select d, to_char(d, 'YYYY-MM-DD'), to_char(d,'Day') from t;
D TO_CHAR(D, TO_CHAR(D
2011-07-19 08:27:59 2011-07-19 Tuesday
SQL> alter session set nls_date_format = 'DD-MON-YY';
Session altered.
SQL> select d, to_char(d, 'YYYY-MM-DD HH24:MI:SS') from t;
D TO_CHAR(D,'YYYY-MM-
19-JUL-11 2011-07-19 08:27:59 -
How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?
Let's say the SQL Server and Oracle Database are in the same Company Internet Network.
I have the code, but I do not know how to use it. Such as what is System DSN Name? Where could I get it. What does it look like?
Do I need to install any Oracle Client Software in order to link from SQL Server to Oracle? Or SQL Server has the built-in drivers installed already that I can directly create a Linked Server from SQL Server to Oracle?
I need to know details. Thanks.
USE master
go
EXEC sp_addlinkedserver
@server = '{Linked Server Name}'
,@srvproduct = '{System DSN Name}'
,@provider = 'MSDASQL'
,@datasrc = '{System DSN Name}'
EXEC sp_addlinkedsrvlogin
@rmtsrvname = '{Linked Server Name}'
,@useself = 'False'
,@locallogin = NULL
,@rmtuser = '{Oracle User Name}'
,@rmtpassword = '{Oracle User Password}'You need an OLE DB provider for Oracle. There is one that ships with Windows, but it only supports very old versions of Oracle. Oracle has an OLE DB provider that you can use. I don't know if it's part of Oracle Client or how it is bundled.
You should not use MSDASQL or any DSN.
Erland Sommarskog, SQL Server MVP, [email protected] -
SQL Server 2008R2 vs 2012 OLTP performance difference - log flushes size different
Hi all,
I'm doing some performance test against 2 identical virtual machine (each VM has the same virtual resources and use the same physical hardware).
The 1° VM has Windows Server 2008R2 and SQL Server 2008R2 Standard Edition
the 2° VM has Windows Server 2012R2 and SQL Server 2012 SP2 + CU1 Standard Edition
I'm using hammerDB (http://hammerora.sourceforge.net/) has benchmark tool to simulate TPC-C test.
I've noticed a significative performance difference between SQL2008R2 and SQL2012, 2008R2 does perform better. Let's explain what I've found:
I use a third VM as client where HammerDB software is installed, I run the test against the two SQL Servers (one server at a time), in SQL2008R2 I reach an higher number of transaction per minutes.
HammerDB creates a database on each database server (so the database are identical except for the compatibility level), and then HammerDB execute a sequence of query (insert-update) simulating the TPC-C standard, the sequence is identical on both servers.
Using perfmon on the two servers I've found a very interesting thing:
In the disk used by the hammerDB database's log (I use separate disk for data and log) I've monitored the Avg. Disk Bytes/Write and I've noticed tha the SQL2012 writes to the log with smaller packet (let's say an average of 3k against an average of 5k written
by the SQL 2008R2).
I've also checked the value of Log flushes / sec on both servers and noticed that SQL2012 do, on average, more log flushes per second, so more log flushes of less bytes...
I've searched for any documented difference in the way log buffers are flushed to disk between 2008r2 and 2012 but found no difference.
Anyone can piont me in the correct direction?Andrea,
1) first of all fn_db_log exposes a lot of fields that do not exist in SQL2008R2
This is correct, though I can't elaborate as I do not know how/why the changes were made.
2) for the same DML or DDL the number of log record generated are different
I thought as much (but didn't know the workload).
I would like to read and to study what this changes are! Have you some usefu link to interals docs?
Unfortunately I cannot offer anything as the function used is currently undocumented and there are no published papers or documentation by MS on reading log records/why/how. I would assume this to all be NDA information by Microsoft.
Sorry I can't be of more help, but you at least know that the different versions do have behavior changes.
Sean Gallardy | Blog | Microsoft Certified Master -
Services configuration for sql server 2008r2 in a Windows Cluster
Hello,
We have a Windows Server 2008 Cluster with Sql Server 2008r2 installed on node 2; when node 2 fails (we don't still know why, it's a 'bluescreen' long history), the service goes from node2 to node1, but sometimes the services are not automatically activated.
What is the theoretical startup settings for sql services (for the sql and the agent), manual, disabled, automatic... ?
Also, sometimes, the service for the sql server in node2 stops, but we don't know why, and we are not able to see any significant information on the event viewer. How can we trace why Sql Server stopped ?
Thanks !>What is the theoretical startup settings for sql services
Manual. The cluster will start them.
>How can we trace why Sql Server stopped ?
Look in the SQL Server Log.
David
David http://blogs.msdn.com/b/dbrowne/ -
Re SQL Server 2008R2 SP3 installation on Windows 8 64 bit
Hi,
I am trying to install SQL Server 2008R2 SP3 on Windows 8 64 bit but I am getting stuck while selecting features.
Error: There are no SQL Server instances or shared features that can be updated on this computer.
Let me know how this can be resolved.
Thanks,
ArAre you running right setup file depending on whether your machine (or Express instance) is x86 or x64?
ENU\SQLServer2008R2SP3-KB2979597-x64-ENU.exe
ENU\SQLServer2008R2SP3-KB2979597-x86-ENU.exe
Please reverify current version of the server - just to make sure it was not patched.
SELECT
SERVERPROPERTY('productversion') as 'Product Version',
SERVERPROPERTY('productlevel') as 'Service Pack',
SERVERPROPERTY('edition') as 'Edition',
SERVERPROPERTY('instancename') as 'Instance', -
Sql server 2008R2 cluster (active-passive) prerequistites
Hi All,
Please any one can help me in exact prerequisites for installing sql server 2008R2 cluster server(two node).
Thanks in advance.
Maheshwar ReddyHi Please find the pre-requisites for SQL server cluster installation .
Before Installing SQL cluster we need to have a Windows Cluster with required shared storage space and DTC Service configured in Windows
Cluster.
Be ready with the plan of where the SQL to be installed and where the Database, Log, Temp DB and Backup are to be stored.
If you require SOP for this please share your mail id .i will send the same . -
SQL Server 2008R2 Active-Active cluster with standard edition?
Hi all,
can I have a 2 node cluster (Windows Server 2008R2 Datacenter Edition: node_1 and node_2) forming a failover cluster with 2 instances of SQL Server 2008R2 Standard Edition (instance_A and instance_B) with:
instance_A running on node_1
instance_B running on node_2Following thread is on similar topic:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/450dfb42-635b-4c99-ae9f-6b0a23e3430b/sql-server-2008-r2-standard-edition-failover-cluster?forum=sqldatabaseengine
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012
Maybe you are looking for
-
Can I set up two ITune accounts on one MacBook?
Can I set up two seperate ITune accounts on one MacBook? If so, how?
-
Issue with List Files option in FTP Adapter-
Hi All, I am getting the following error when I am using the list files option inside FTP adapter. The soa Version I am using is 11.1.1.5 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding exe
-
Need to merge a csv file using external tables into a main table
Hi, I have a csv file which contains the date(with time stamp), column1(number),column2(number), column3 (number). I am using external tables concept to load the data froom csv to this external table and then merging into the main table. Problem here
-
Metadata Label and Color Labels
As I wanted to sort my pictures on subject I chose to put the name in the Metadata Label Field as the Label Text is available for that purpose (I would have expected the caption text for this purpose). When I put a text in the Metadata Label field a
-
Put movie behind existing elements, how?
I am placing a movie clip in the swf by AS. In the resulting swf, It's hiding the buttons that are already on the stage. How do I get that movie clip to be behind other elements on the stage? Here's the background and details: In Flash CS4, I hav