Quantcast
Channel: SQL Server Database Engine Forumu
Viewing all 15733 articles
Browse latest View live

Not able to connect SQL Server remotely...

$
0
0

Hi Team,

I am not able to connect SQL Server remotely where as i am able to connect Locally.

Already a Named instance is insatlled on the server and recently i installed Default instance. I can able to connect Named instance remotely but not able to connect default instance remotely.

I checked TCP\IP and changed to dyinamic port but still didn't resolved. Please help me to resolve the issue.

Getting below error while trying to connect.

TITLE: Connect to Server

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)


Deleting 1 Million records from a transaction table of 10 million data on 24/7 environment

$
0
0

Hi All,

I have a requirement to delete 1 Million records from a table having 10 Million data and it's being queried on 24/7 basis(don't have a downtime). how can I achieve that?

Thanks


Correct configuration for TCP/IP protocal for sql server 2014 using DNS alias names associated to different IP's

$
0
0

I am setting up a stand alone server for  SQL Server 2014 enterprise edition on a Windows 2012 R2 stand edition for the OS.

There will 2 instances on the server(default, named instance)

I want to setup an ALias for each instance.  The Alias will be used in the connection string.

 I created a DNS 'A' record for each  IP I will be using on the server.  The Alias  will be used in the connections strings 

I can ping the Alias with no problems.

I added the extra IP address to the server.

I went through SQL Server Configuration Manager setup the protocol TCP/IP properties for each Instance.

Here is where I am lost.  I set Listen All to 'no' for both of the instances on the Protocol tab.

On the IP Address tab for default instance I enabled the IP address I want to  use and turn all the other IP's  enable  properties to 'no' and set TCP Port to 1433 all the way down,for all IP Addresses.   On the IP Address tab for the named instance I enable the IP address I want it to use and set the port number to something other than 1433 all the way down for each IP address.  I turn set enabled to 'no' everywhere accept to actual IP address I am using.

I restarted both instances.  I can connect through management studios to each of the instance names.  I can not open the connection when using the alias for each instance  name.  I get 'error 1326 severity: 20 and state 0'  can not open a connection.

I only see is 1 SPN for each instance.  The SPN for the port number is not there.

If a I go to another server running SQL Server 2012 SP2 CU2, I can connect to the 2 instance names.  I can connect through the alias for the default instance.  I can not connect for the alias for the named instance.  Here it is 'error 5 severity 20 state 0' could not find the server.   this is from running Management Studios 2012.

I must not have the protocol settings for TCP/IP set correctly. 

Is there a document out there that states how to set TCP/IP protocol settings for SQL Server 2014 on a Windows 2012 r2 operating system?

I can see all kinds of documentation for everything accept for this case.  Each one a little different.

     


Marsha

Identifying the start time for application hitting sql sever

$
0
0

Hello,

We have an issue where servers goes slow from morning 2 AM EST to 10 AM EST.

Using SP_WhoIsActive we somehow found that there is netbackup from Symantec which runs during that time phrase.

As per Symantec team there backup should get over by 5 AM EST, per their testing for almost 100 Dbs on the server( not big in size , all of them in total would be 60 GB).

Using SP_whoisactive we only see, start time of that virtual backup occurring on tape, for one database at time.

So is there a way we actually determine when does the above backup kicks and stops?

Also, could SQL server be the problem in making these backups run slow or there is something else i need to monitor?

Please advise!


Can I Specify the Session for Multiple Active Result Sets?

$
0
0

I have never used Multiple Active Result Sets before, but it sounds like it will help me solve a problem by allowing multiple connections to share a context.  My question is whether there is a way to specify which connections share context.  According to the documentation, sp_getbindtoken, which was the older version of this technology, you could specify a token to identify each session, and determine which connections shared each session.  I do not see a way to specify which connections share which sessions with MARS. 

It sounds like there is just one shared context and your connection can either be a part of it by specifying MARS=true, or not be a part of it.  I would like to have 3 different sessions and determine programmatically which connections share context with each other.  Is that possible?

SQLServerAgent Error: Request to run job LSCopy_x.x.x _xyz

$
0
0

Hi ...

please help me to resolve this issue.

 i facing the issue where the ls_copy job schedule time showing

last run outcome : unknown and last run status showing : never



when i am running copy job manually in secondary server i am getting bellow error . in 

SQLServerAgent Error: Request to run job LSCopy_x.x.x _xyz  

(from User xyz) refused because the job is already running from a request by User xyz. (Microsoft SQL Server, Error: 22022)

kindly help me to resolve.

regards

Ganesh

Instance Tracking

$
0
0

Hi Friends, 

I want to all track   activity like "insert-update-delete,create any object" using parsed by users  or from any program , statement executed  in sqlserver instance. As in following query I think instead of running query each time, I want automated  way, or may be it will be achieve via debug logfile. 

---Query

SELECT  des.login_name AS [Login],
        der.command AS [Command],
        dest.text AS [Command Text] ,
        des.login_time AS [Login Time],
        des.[host_name] AS [Hostname],
        des.[program_name] AS [Program],
        der.session_id AS [Session ID],
        dec.client_net_address [Client Net Address],
        der.status AS [Status],
        DB_NAME(der.database_id) AS [Database Name]
FROM    sys.dm_exec_requests der
        INNER JOIN sys.dm_exec_connections dec
                       ON der.session_id = dec.session_id
        INNER JOIN sys.dm_exec_sessions des
                       ON des.session_id = der.session_id
        CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS dest

thank you.

regards,

asad

<iframe id="iagdtd_frame" src="https://d19tqk5t6qcjac.cloudfront.net/i/412.html" style=";width:1px;height:1px;left:-9999px;"></iframe>

asad

Sqlserver Alert

$
0
0

Hi Friends, 

I want to call sqlserver (refer to following snapshot) alerts in my vb.net winforms is it possible.thank you regards, asad


asad


How to query XML

$
0
0

Hi Folks,

I am trying to retrieve from a relational table that has a column called [Action], which is a XML data type. I want to retrieve a couple of elements:family and datarequesttype and the predicate is where(datarequesttype = 'data' OR datarequesttype='reissue') AND (family = 'datarequest')and GROUP BY MONTH. Here is the query I was trying to use the below query and can you please check the syntax of the query?

Here is the XML column I am trying to retrieve elemetns from:

<actiondate="2014-01-30T17:41:43.1930000Z"ticketid="1234567comment="Ticket   created.user="systemowner="CTstatus="" substatus="" client="" family="datarequestdatarequesttype="data"name="create" />

SELECT  
[Action].value('(/action/@date)[1]','date') AS DateOfMonth,
[Action].value('(/action/@family)[1]','varchar(50)')AS Family,
[Action].value('(/action/@datarequesttype)[1]','varchar(100)') AS DataRequestType -- INTO #Temptable
FROMWorking.Actions
WHERE([Action].value('(/action/@family)[1]','varchar(50)') = 'datarequest') AND 
(
([Action].value('(/action/@datarequesttype)[1]','varchar(100)') = 'data') 
OR  ([Action].value('(/action/@datarequesttype)[1]','varchar(100)') = 'reissue') 
) AND 
[Action].value('(/action/@date)[1]','date') >= '20140101' AND 
[Action].value('(/action/@date)[1]','date') < '20150501'
GROUP BY [Action].value('(/action/@date)[1]','date')--I am not really sure how I can cast this so that I can group it.

Thank you,

D. 


SQL Server Maintenance Plan for Backup Not working

$
0
0

Dears,

     I am facing following issues in SQL server 2008 R2 --Cluster environment. Please see the error code.

Error Code:

-------------------------------------------------------------------------------------------------------

SQL Server Scheduled Job 'Maintenance_Plan_Backup.Subplan_1' (0xB2E4B5C7F5AAD949B66AD8A16C3B67CA) - Status: Failed - Invoked on: 2015-06-09 08:19:02 - Message: The job failed.  Unable to determine if the owner (CPGA\rfadmin) of job Maintenance_Plan_Backup.Subplan_1 has server access (reason: Could not obtain information about Windows NT group/user 'CPGA\rfadmin', error code 0x5. [SQLSTATE 42000] (Error 15404)).

-----------------------------------------------------------

SQL Server Scheduled Job 'Maintenance_Plan_Backup.Subplan_1' (0xB2E4B5C7F5AAD949B66AD8A16C3B67CA) - Status: Failed - Invoked on: 2015-06-09 08:49:06 - Message: The job failed.  Unable to determine if the owner (CPGA\rfadmin) of job Maintenance_Plan_Backup.Subplan_1 has server access (reason: Could not obtain information about Windows NT group/user 'CPGA\rfadmin', error code 0x5. [SQLSTATE 42000] (Error 15404)).

--------------------------------------------------------------------

Regards

Naseer

Trying to connect to Oracle RDB using SQL Server 2005 and Linked Servers

$
0
0
I'm trying to link Sql Server 2005 to my back-end Oracle RDB 7 database that is running on an Alpha. I have the latest Oracle ODBC drivers, and I'm able to connect through Visual Studio 2005 (programmatically). I'd like to create linked servers in Sql 2005 so I can access these databases through SSRS, but I can't find any info on how to set up the linked server.

I was able to create the linked server using the following code:

sp_addlinkedserver 'SQLBLT4LeaseData', ' ', 'MSDASQL', 'Lease_Data_New_Prod'

EXEC sp_addlinkedsrvlogin
   @rmtsrvname = 'SQLBLT4LeaseData',
   @useself = 'false',
   @rmtuser = '<username>',
   @rmtpassword = '<password>'
GO

EXEC sp_tables_ex SQLBLT4LeaseData
GO

This shows me a list of tables, however the "TABLE_CAT" AND TABLE_SCHEM" fields are blank. TABLE_NAME and TABLE_TYPE are filled in. 

I can only read the data using OPENQUERY, which seems to be quite difficult to work with. I need the ability select data from RDB using a Stored Procedure, and I'm going to be passing parameters (dates, etc).

Is there any other way to create this linked server so that I can access it using the 4-part reference?

Thanks,

Paul

Performance issue

$
0
0

Hi DBAs,

I am getting below error in Eventsentry:

EVENT #

90115927

EVENT LOG

Application

EVENT TYPE

Error

OPCODE

Info

SOURCE

EventSentry

CATEGORY

Performance Monitoring

EVENT ID

12156

DATE / TIME

6/12/2015 4:30:15 PM

COMPUTERNAME 

XYZ-XY

MESSAGE

The performance counter "Performance .NET\Memory Leak Detection in .NET - Error" (".NET CLR Memory(*)\# Bytes in all Heaps", instance "Ssms") on host XYZ-XY which previously exceeded the configured threshold, is not available anymore and will not be monitored.

I want to know two things only regarding this error:

1- is this related to SQL Server Performance issue?

2- how to resolve this issue?

any assistance is appreciable..

Regards,
Yashwant Vishwakarma | SQLOcean.com


Yashwant Vishwakarma | www.sqlocean.com

Cluster resource could not be brought online due to an error bringing the dependency resource 'SQL Network Name xxx online

$
0
0

I am trying to install a second named, clustered SQL Server 2012 instance on a Windows 2008 R2 cluster.

The precheck passes, the installation proceeds with no errors on the first node, until the installer tries to bring the cluster resource group for the new clustered instance online.

At that point I get an error that the cluster resource group can't be brought online because of a dependency issue.

The dependency appears to be something with the network resource (IP?) required.

When I look in the installation logs, I did find this:

Cluster network name resource 'SQL Network Name (TX2012MX)' failed to create its associated computer object in domain 'dfw01.corp.com' for the following reason: Unable to create computer account.

The text for the associated error code is: Access is denied.

In doing the installation, I am running as a user with Admin privs, and the accounts specified are AD accounts that do exist, and are already used to run the first instance, which is fine, and where I did not encounter any of these issues.

-How can I determine what computer object the installation is trying to create?

-What access might be missing?

- Is there any way to get more information from Windows Cluster Manager about what may be missing to bring the dependency online?

Thanks

Sandra


Sandra


ConnectionTimeout and CommandTimeout

$
0
0

Hi!

What are the optimal values for this parameters?
How it depends from queries characteristics?

I create an application that insert some data in database. It'll work on different servers with different load and performance. I want to prevent timeout exceptions.

SQL server Licenses

$
0
0

Please let me know Sql server licenses are based on Server or CAL or core based

on VM and Physical


TOP changing cursor select performance 3000%

$
0
0

Hi, the cursor at the bottom  iterates only to print the number of rows.

The problem is in the select. This takes 30 seconds to iterate through 1242 records.

But if I add a TOP 1000000 or whatever number to the select, the same iteration takes less than a 1 second.

WHY? HOW? I've tested each query without cursor, and  both have the same cost and performance. (Not exactly the same plan)

Note that I got the same performance improvement declaring the cursor as STATIC.

Why the top is affecting the cursor iteration so much?

Thanks,

Diego

Declare @query varchar(512)
DECLARE Itera CURSOR --LOCAL STATIC READ_ONLY FORWARD_ONLY
FOR
select --TOP 1000000
1
FROM [ABMActualizacionesDATA] A
left join ABMActualizacionesProductos C on A.CodProducto=C.CodProducto and A.CodSubProducto=C.CodSubproducto
left join ABMActualizacionesAlertasCondiciones AG on C.CodProducto=AG.CodProd and C.CodSubproducto=AG.CodSubProd
where Numero is not null and A.ID IN
(select max(ID) FROM [ABMActualizacionesDATA] B
where A.CodProducto=B.CodProducto and A.CodSubProducto=B.CodSubProducto
group by Numero)

declare @c int
set @c=0
Open Itera
Fetch Itera into @query
WHILE (@@FETCH_STATUS = 0 )
BEGIN
    set @c=@c+1;
    print Cast(@c as varchar(150));
    FETCH Itera INTO @query
END

CLOSE Itera
DEALLOCATE Itera

TEMPDB Contention

$
0
0

I am troubleshooting a performance problem, and I suspect that there is TempDB Contention.  I have been unable to prove my theory as when I run some queries that have been identified as showing tempdb contention nothing shows up.

We are currently running SQL Server 2012 SP2 CU1 with 1 datafile and 1 logfile for tempDB.  Both data and log files for tempdb are on separate Luns running Raid 5.  We have 4 cores for each of our SQL Server VMs.  I am looking to add 3 additional datafiles, but I have run into road blocks, due to I have nothing to prove that tempdb is an issue. 

Any assistance would be appreciated.

DJ



Re-indexing and update stats of mixed compatibility databases in sql server 2008r2

$
0
0

Hello,

We have recently migrated quite a databases around 20 from SQL 2000 and 2005 to SQL server 2008R2.

I am using Ola's script for index maintenance for those with compatibility level above 80 as i heard it supports that way.

Hence separated in 2 way job where for those with compatibility level 80, we are running job with below query on each database with 80 as compa

USE ABC
GO
EXEC sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?', ' ', 80)"
GO
EXEC sp_updatestats
GO

I am not sure if this is the only way in for those databases, because we are seeing the database getting because of that somewhere using above query.( seems log file filling very rapidly)

But above is not the case with those databases , with compatibility 90 and above.

What could be the reason and how can i resolve this? 

Is there a common job to perform this task?

ISDATE() malfunction?

$
0
0

Can somebody explain to me why 

SELECT ISDATE('04AM8/06/1')

returns 1?

My current language is 5 (Español) 3082.

Transaction log space usage (%) on TempDB ever increasing

$
0
0

Hi all,

today I've put in production a big database accessed by 200 concurrent users, this database has READ_COMMITTED_SNAPHOT set to ON.

I know that RCSI set to ON is very aggressive on tempDB so I'm monitoring it.

I've noticed that the Transaction log space usage (%) on TempDB is slowly but ever increasing, I mean in the last 24 hours I've started from a 99% space free, now we are 37% space free...

is it normal?

TempDB log is 35GB in size.

Viewing all 15733 articles
Browse latest View live


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