Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12963 articles
Browse latest View live

REGEXs broke?

$
0
0

OK folks, this was running fine before last 'patch Tuesday', and this is literally out of Books Online:

(CASE
WHEN [Field] LIKE '[0-9]^9' THEN 'whatever'
ELSE 'blank'
)

...now it doesn't.


SQL 2005 x64 exception

$
0
0

Recently We've migrated SQL 2005 x86 Enterprise running on Windows 2003 Enterprise to new hardware where is running Windows 2008 SP2 and SQL 2005 x64 SP4 with CU3. We migrate users (with standard approach by Microsoft) and application databases to new server. Everything is looking ok, applications working. But we've got some SQL exceptions like below.

Is there any known bug related to that? Could someone help us.

Memory                              
MemoryLoad = 15%                    
Total Physical = 32733 MB           
Available Physical = 27752 MB       
Total Page File = 64782 MB          
Available Page File = 60344 MB      
Total Virtual = 8388607 MB          
Available Virtual = 8355366 MB      
**Dump thread - spid = 84, PSS = 0x00000000D1A43ED0, EC = 0x00000000D1A43EE0                                    
***Stack Dump being sent to D:\MSSQL.1\MSSQL\LOG\SQLDump0005.txt                                                
* *******************************************************************************                               
*                                                                                                               
* BEGIN STACK DUMP:                                                                                             
*   04/25/14 12:54:30 spid 84                                                                                   
*                                                                                                               
* ex_handle_except encountered exception C0000264 - Server terminating                                          
*                                                                                                               
* Input Buffer 255 bytes - 

There is also some output from debugger:

0:000> .ecxr
rax=0000000077207080 rbx=0000000000000000 rcx=0000000016a37d50
rdx=0000000000000000 rsi=0000000000000000 rdi=0000000000000440
rip=00000000772070bd rsp=0000000016a38240 rbp=000000000000003f
 r8=0000000000000000  r9=0000000000000000 r10=0000000000000000
r11=0000000000000287 r12=00000000032fdab0 r13=0000000000000000
r14=00000000000019e4 r15=0000000049b8d00c
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
kernel32!RaiseException+0x3d:
00000000`772070bd 4881c4c8000000  add     rsp,0C8h
0:000> kC 1000
Call Site
kernel32!RaiseException
sqlservr!DmpGetClientExport
sqlservr!_____SQL______Process______Available
sqlservr!_____SQL______Process______Available
sqlservr!_____SQL______Process______Available
sqlservr!SQLExit
kernel32!UnhandledExceptionFilter
ntdll!RtlpNotOwnerCriticalSection
ntdll!_C_specific_handler
ntdll!RtlIntegerToChar
ntdll!_C_specific_handler
ntdll!RtlRaiseStatus
ntdll!RtlpNotOwnerCriticalSection
ntdll!LdrGetProcedureAddress
sqlshield
sqlservr
0x0
0x0
0x0
0x0
0x0

 

Getting SSMS error while open it

$
0
0

Hi,

I am getting below error on SQL Server log file. Its a continuos error

2014-04-25 09:24:20.22 Server      Process 0:0:0 (0x3b00) Worker 0x00000000106361A0 appears to be non-yielding on Scheduler 4. Thread creation time: 13042907079739. Approx Thread CPU Used: kernel 2251156 ms, user 86034 ms. Process Utilization 2%. System Idle 96%. Interval: 2359260 ms.

SQL Server version : 2008 RTM

Thanks 

Deepak Goyal

Link Server SQL 2012 a 2000

$
0
0

Hola a todos por favor necesito urgente ayuda.....

Necesito crear un link server en SQL 2012 para que se conecte SQL 2000 plissssss

Things to keep an eye on or look for regarding performance and maybe automate into a report?

$
0
0

Here are a few things Ive got on my list that I currently have in various scripts to gather this information.

Top 10 slowest slowest statements
Missing indexes
Unused indexes review for removal (taking up space)
Login errors (could indicate security issues, or system issues)
Index fragmentation
Top 10 largest tables (might indicate bad process or more likely candidate for purging old data etc)

Can anyone else share some good things to search for?

Some of the above items I would want to look for more frequently than others, so im not sure they would all fit in a single job.  It might even be something I roll into an SSIS package and simply run locally on occasion, or automate it and record the data into different logging tables for historical metrics.  Not sure yet.

procedure is taking 100% cpu

$
0
0

Hi ,

 One of my procedure is taking 100% CPU, I looked execution plan .. But I am not sure what to look on that .. I didn't find any anything wrong in execution plan. like all are index seek ..  Even the query is not taking much time just 2 sec


Regards Vikas Pathak


SQL server 2008 database access audit

$
0
0

HI All,

I am running SQL Server 2008 Standard Edition.

Is there anyway that I can use to record, users who have access a database on daily basis please?

Regards

Mira

SQL Query C# Using Execution Plan Cache Without SP

$
0
0

I have a situation where i am executing an SQL query thru c# code. I cannot use a stored procedure because the database is hosted by another company and i'm not allowed to create any new procedures. If i run my query on the sql mgmt studio the first time is approx 3 secs then every query after that is instant. My query is looking for date ranges and accounts. So if i loop thru accounts each one takes approx 3 secs in my code. If i close the program and run it again the accounts that originally took 3 secs now are instant in my code. So my conclusion was that it is using an execution plan that is cached. I cannot find how to make the execution plan run on non-stored procedure code. I have created a sqlcommand object with my queary and 3 params. I loop thru each one keeping the same command object and only changing the 3 params. It seems that each version with the different params are getting cached in the execution plans so they are now fast for that particular query. My question is how can i get sql to not do this by either loading the execution plan or by making sql think that my query is the same execution plan as the previous? I have found multiple questions on this that pertain to stored procedures but nothing i can find with direct text query code.

Bob;

 

Access/SQL connection being lost

$
0
0

Hello,

Here is the situation: Windows Server 2012 Standard Edition, SQLServer 2012 Standard edition, MSAccess 2013 using ODBC 11. Sometime Access users get a message that they do not have permission to access SQLServer or that is doesn't exist. I checked the SQLServer logs and could not find any errors. But, on the Windows NT Security Log, I found a lot of messages (all at the same time) that say An account was successfully logged on, then immediately: An account was logged off (with the user's login name). There were about 50 of these messages in the space of a few minutes.

The only way that user could restore their connection to SQLServer was to reboot their machine.

I do notice a lot of logon - logoff messages for some of the users. Is this typical?

I believe we have enough client access licenses to Server 2012. I may need to check this. One problem may be that we have only 10 CALs to SQL Server, but we have 11 machines connecting through Access to SQL Server. I didn't think this would be a problem because we only have 7 employees and they are normally only at one desk/logon.

Any help greatly appreciated!

Thank you,

Albert


Albert S

Erroe log

$
0
0

Hello ,

I have received an error from the application , and the support suspect it seems a database issue , actually I didn't know how I can trace back the issue to know if it's a database error or not (since it happened on a database level not on the instance level)

is there a way I can do to see if that error database-related

Thanks in advance.  

Login failed for user 'NT AUTHORITY\ANONYMOUS

$
0
0

Hi All

I have already gone thru lot of links, So appreciate if i can have some solution

I have 3 servers A, B and C . A and B are in same domain and C is in different domain. and I am sysadmin in all 3 servers and all have trusted connection with each other

1. All have tcp and named pipe enable

2. All 3 servers and all services including browser are up and running

3. When i connect any sql server from any Server using SSMS i am able to connect and  (net_transport, auth_scheme = TCP , NTLM).

Now i create linked server at server B to Server C (C domain is different than A and B).  When i login on Server B and try to run query on C its working fine. But after remote login to server A and connect sql server at B using SSMS when i expand linked server to c i cant see databases and query is giving error "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'"

I also tried to connect to all 3 server in ssms using forced  named pipes but i am getting below error

"provider named pipes provider error 40 - Could not open connection to sql server"

My question :

1. I have to use domain account to use linked server from server A to connect SQLserver B to server C, How this can be done is this related to Double hop ??

2. Why i cant connect using forced Named pipe to any server using SSMS except local host


Thanks Saurabh Sinha http://saurabhsinhainblogs.blogspot.in/ Please click the Mark as answer button and vote as helpful if this reply solves your problem

Read Only db after attach on sql 2008

$
0
0

Hi,

i have detach db from sql 2008 for some reason.

i attached the db again. now it shows read-only.

can anyone let me know why it shows read only?

how can fix this ?

Thanks!!!

 


Varinder Sandhu http://varindersandhus.blogspot.com/

Clean up unnecessary space

$
0
0
Hi,
How to remove any unnecessary space of SS 2012, as currently my Win 2008 server has only 2.5 Gb left?

Many Thanks & Best Regards, Hua Min

First Time Connection From Windows 7 to SQL Server 2005 Fails

$
0
0

Hi Everyone,

I have an application that connects to a SQL Server 2005 Standard Edition server. Most of the machines are running on Windows XP and can connect to the database successfully. But recently, I added machines that are running on Windows 7. These new machines fail to connect to SQL Server. But if I ignore the errors and continue (within the same  application), subsequent connections are OK. 

This is my connection string for all clients (XP and Windows 7)

Server=192.168.1.253;Failover Partner=192.168.1.252;Integrated Security=SSPI;Database=<mydbname>

I hope someone can help me.

Thanks,

Noob

Sync Framework SqlServer SqlServer

$
0
0

Hi

The scenario is a server at the head office of a client which is a centralized database on a database SqlServer 2008 professional version and several peripheral sites where it is delocalized housed in the same database instance SqlServer 2008 Express Edition (the limit of 10 GB the Express version is sufficient for the needs of the client) .

In the branch offices need to work in disconnected mode to avoid inconvenience in the event of a power failure (you know where we are in Italy with broadband ....) .

There is therefore the need to synchronize some tables of the database of the peripheral seats with that of the central .

I was planning to develop a Wcf service with a lot of code to write, but when I saw the Sync Framework I thought I would have facilitated the work .

My enthusiasm dropped when I saw that the database could be just on the outskirts Ce.

How can I use Sync Framework in this scenario in VS2010 o 2012?

Thanks, bye


Roberto Tomassini


does not free space

$
0
0

Hi,

I have T-log file in one partition say(L) which is 500GB. We have T-log backup after every 10 minutes. When I check free space in T-log file it is showing only 10GB occupied, but when I check on OS level, it shows the partition(L) has 0.0% free space. 

After the t-log backup, if the log file is shrink, why does not it release space on OS?

REgards




How long take a copy of Oracle

$
0
0

Hi guys, according to your experience how long can take a copy of a database? Either SQL than Oracle. I ask this because I was told that to have a copy of Oracle takes four days. Pratically they have to restore the backup or something like this but....four days...!? 

Database files list on one drive in master.sys.master_files, but show on another in the file system

$
0
0

We have a one node cluster sql server instance where the machine was patched/updated and re-booted this past weekend.  The machine came up, but the SQL Server did not because it could not locate RestoreCheckpointDB24.ckp on anM drive.  If I RESTOREFILELISTONLY on my backups everything was clearly on an N drive previously.  To get by the error, our network team changed a registry key pointing toN drive to M drive and everything magically came up.  The file system and failover cluster manager are now showing all files to be on anM drive, but if you query master.sys.master_files everything is showing on theN drive.  Anyone know how this is possible and how to resolve???

As well, a log shipping session is now broken because it's copying to a missingN drive and my Management->SQL Server Logs folder is empty as well. 

Any ideas?  I'm completely baffled as well as our network guys. 

Thanks!

backup history all servers

$
0
0

I'd like to write a report with backup history for all sql servers. I can manually easily get it by using registered servers and running a single query on all of them (I have the query, I just don't know how to gather a single resultset for multiple servers).

I wanted to avoid openquery or linked servers. Is there any best way of getting this done? SSIS package seems involved. Is there a magic powershell? thanks!


Paula

How can Database A on Server A be available as Database B

$
0
0
SQL Server 2012 Enterprise on Windows Server 2012 R2 DataCenter - VMWare Server

Question:
Can Database A on Server A be available as Database B (within 10 minutes of data time difference) on Server A (same server) for reporting.

Possible Answers:
1. Transactional Replication - Yes 
2. Log Shipping - No, because Database will not be available as Read Only or if available for  read only, will kick out active connections when logs are applied on reporting database
3. Always On Availability Groups - No, because the reporting database needs to be on another server. 
4. Mirroring - No, because this feature is being deprecated
5. Clustering Active/Active - No, because the reporting database needs to be on another server. 

It appears as though transactional replication is the only option. 

Please guide if there are other options. 

Thank you. 

-Jeelani

Viewing all 12963 articles
Browse latest View live