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

Linked server set in Cluster Environment

$
0
0

Need to set up a linked server in two node SQL Cluster pointing to a standalone SQL thru security setting "be made using current login's security context". It's double hop Kerberos setup. Cluster uses a domain account, so we manually set SPNs for that account with both instance name and protocol as well (set up these SPNs with SQL virtual name only). Also, constrained delegation has been  set to that stand alone SQL services (MSSQLSvc).

Both SQL cluster and standalone servers are in same domain, cluster service account is domain account and standalone SQL uses default SQL local service account.

Coming to SQL, when I create linked server, sometimes it lets me create without issues and sometime it throws this below warning and even if I create it won't work.

 Login failed for user 'NT AUTHORITY/ANANOMOUS LOGIN'.  Need help. thanks. Prabhu


Prabhu Boggavarapu


DATABASE MIGRATION SQL 2005 TO SQL 2012

$
0
0

Hello Everybody

I need a huge help, I am very new in DB, so we need to do a migration from DB2005 to DB2012,, also we are going to use Server 2012,

What file do I really need, the Database administrator said that I dont need the log file, at all, also this log file is very big ithe size is  2,803,840  therefore shrink the file is not an option (they said it)

Also de MDF file are out of date I saw some dated 2010.

How I can approach this.....basically what I should do firts.

Thank you

SQL Express free and windows 8

$
0
0
Hi guys, I need to install SQL Express in my new laptop Windows 8. Shall I download simply SQL Express or there is something I need to know before installing it? I am getting used with Windows 8 but I am not totally confident yet. 

All Databases size

$
0
0

Hi Team,

 

I want all Databases Size in my instance can any body please provide the script.

 

Tx

 


subu

Dropping OFFLINE Filegroup

$
0
0

Following a disk crash whilst building an index, the metadata for a 300 million row table has become corrupt.

The index was being built on a specific file/filegroup which I was able to mark offline and the Db continued to be usable. 

Unfortunately one of our processes now fails (trying to use the index that was never complete).  I can't diable the index, drop the table, truncate the table or delete the data.  Partial restores of the Db excluding the offending filegroup are successful, but the problem continues to be there!!!

I've investigated editing the Metadata but am extremely wary of doing that, so am looking for other ways forward.

All ideas welcome

 

List out all Database sizes

$
0
0
Can any one tell me to find out the list of databases that have ''ldf'' size greater than ''mdf' using stored procedure?
Thanks Ashok

Trigger jobs on remote server to do its work on original server

$
0
0

Hi Team,

I'm new to SQL.

I have a scenario, Where customer want to move all the jobs from original SQL server to some remote SQL server and want to trigger jobs on remote server to do its work on original server.

Turn on trace flag 4199 on SQL Server 2008 R2?

$
0
0

About 6 months ago, we migrated from an Oracle database to SQL Server 2008 R2.

The application we use does not perform as well as it did when we were on Oracle and it's hard to pinpoint why since it is inconsistent. 

Looking at the instance as a whole, the largest waits are memory/cpu and cxpacket. Very little disk i/o waits.

I went to a session at Ignite this week that talked about trace 4199.

Does anyone use this in production? Any risk enabling it?

We are on SQL Serer 2008 R2 in SQL 2000 compatibility mode, fyi.


Heath


isolation level for deadlocks

$
0
0
What is the best isloation level to be used to avoid deadlocks?

Unblocking

choices for reaching osql utility from a non sql server

$
0
0

Hi, we run std 2008 r2.  I'm hoping to use the following .bat and .txt files to ask a sql server remotely to run a sql agent job.  Bear with me.

.bat:
"\\sqlservername\c$\Program Files\?\osql.exe" -E - sqlservername –i C:\ssis\query\txt.txt

.txt:
USE MSDB
GO
EXEC sp_start_job @job_name = 'sqlagentjobname', @server_name = ' sqlservername'
GO

I took this example from an article whose link i can try to find and post here.  Its possible I have some typos as 2nd server name in .bat and extra space before .txt's @server_name param value look funny.

Anyway here is what i have to work with and the actual question:
I'm looking at the sql server itself.  I see directories...


c:\program files\microsooft sql server\100\tools\binn...
c:\program files\microsooft sql server\mssql10_50.mssqlserver\mssql\binn...
c:\program files\microsooft sql server_dbserver1\mssql10_50.dbserver1\mssql\binn\...

The only one that contains utility OSQL is the first. But I doubt anything is running from there anymore.

When i look at the running services on this server,

...sql server the service for what i believe is 2008 r2 and definitely for instance dbserver1 seems to be running from the 3rd directory as
sqlserver.exe with a param that looks like -sDBSERVER1

...sql server agent in the unnamed instance (mssqlserver, where my job is) seems to be running from the second directory as sqlagent.exe with a parma that looks like -i mssqlserver

There is also an unnamed instance of sql sever service running from the second directory.

Can i exec OSQL by pointing my .bat at the 1st directory? ...or Do I have to install OSQL?  In the 2nd directory?  This is a production server and that makes me nervous.  From the quick read that I did, it sounds like one would choose "client tools only" on such an install.  I dont know if i will have a choice of specifically installing this util or not. 

 

Using Instead of UpdateTrigger in SQL Server 2012

$
0
0

Hi,Can Any Body tell me how can use the Instead of Trigger for Update of a Table.

I have Implemented a Instead of Trigger. It Checks for the Conditions and rises the error if conditions not met.

But not updating the data when the conditions are satisfied. is it that i need to mention the Update Statement within the trigger manually. Then, What is the Easiest way to do this. Please help on this.


RehaanKhan. M

disable 'sa' effect

$
0
0

I have a SQL 2000 server , and I am plaining to disable 'sa'

however all the db owner, and SQL agent jobs owner, and mainplan owner are 'sa'

do I have to change it all to another account before I disable them ?

or there is no effect the job will continue ?

List read-only SQL connections.

$
0
0

Hello,

Read-only clients must specifyApplicationIntent=READONLYto make a read-only connection.

Is it possible to create a list that shows the sessions that use a read-only connection?

Best regards,

Erik

  

 

Calling Exe from Trigger

$
0
0

 I tried to call a exe from sql server through trigger with xp_cmdshell , But its not working as expected , shows  preemptive_os_pipeops in process under the activity monitor and the process got hang ,So plz help me to  solve it out


Is there any way to run a Trigger when connection to SQL Server is Closed or disconnected ?

$
0
0

Dear Sir,

Is there any way to run a Trigger when connection to SQL Server is Closed or disconnected ?

Sanjay Shah

Shutdown or disable all connections from Stored Procedure

$
0
0

I have an auto exec stored procedure that needs to complete successfully or:

- the server should shutdown, or

- disable remote connections

Officially I cannot issue a Shutdown from a Stored Procedure. In addition, I can't see how to programatically disable remote connections.

Any tips would be appreciated. I'm sure others have had to do something similar.

Deadlock error from dbo.sp_syscollector_purge_collection_logs

$
0
0

Hi,

In the Management Studio we have an SQL Agent Job that runs the stored procedure from MSDB:

dbo.sp_syscollector_purge_collection_logs

this job was not added by me and I do not exactly know what it does.Anyway, it runs every 15 minutes and until today it run successfully.

Today we received multiple times the email that is generated by the SQL agent in case of an error:

DESCRIPTION: Transaction (Process ID 86) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

I understand its a deadlock so 2 processes blocked out each other. What I would like to able to investigate is where can I look up exactly what processes were involved. Is there a table in SQL that contains the relevant logs so at least I can find out what were the processes running at the time of failure when dbo.sp_syscollector_purge_collection_logs run?

Thanks

How to restore only last 1 or 2 months data in sqlserver?

$
0
0

I have 5 TB of data in production and my development team requested to restore only last month data(<=500 MB ) in staging server and last 2 months data in pre production.

Any ideas or suggestions are appriciated.

SQL server agent failing some times. "Unable to connect to SQL Server '(local)'. The step failed."

$
0
0

i have a sql server job scheduled to run daily twice.

the job is running fine , but once  or twice a week the job fails saying.

"Message
Unable to connect to SQL Server '(local)'.  The step failed."


all other times the job runs successfully. it randomly the job is failing. once its failed and if i try to run it manually it runs fine or it will start running fine from next schedule onwards.

This job mainly executes a stored procedure.

the owner of the job is setup as sa. i don't understand why its fail randomly and all other times(90% of cases) it successful.

any help is appreciated.

"Unable to connect to SQL Server '(local)'.  The step failed."
"Unable to connect to SQL Server '(local)'.  The step failed."
"Unable to connect to SQL Server '(local)'.  The step failed."
Viewing all 15264 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>