Quantcast
Channel: SQL Server Database Engine Forum
Viewing all 15872 articles
Browse latest View live

Recovery Model

$
0
0
Hi all,

I got error  in T-Log backup  schedule,  (i scheduled it every one hour , its running smooth but exactly at 9Am,10Am,11Am,12Am the T-Log Backup get Fails , And T-Log backup schedule get Succeeded for remaining time's).

When i executed  SP_ReadErrorLog  , I got to know Spid 79 (When i checked using Sp_Who2 it is my login) is setting Recovery model to SIMPLE RECOVERY MODEL  and exactly at fraction of Millie seconds it is setting to FULL RECOVERY MODEL.

Manually am not running any command for altering Database Recovery Model.

Am unable to trace , How the Alter command is running and where it (ALTER DATABASE Dashboard SET RECOVERY SIMPLE/FULL) is running. Totally am having 7 Databases in the schedule.

Please, look at the screen shot attached :



1) How, can i get to know how and where the command (ALTER DATABASE Dashboard SET RECOVERY SIMPLE/FULL) is running ?

2) How can i stop failing of my scheduled T-Log Backup ?

Please Help...

Thanks in advance.

cdc.edFusionODS_capture job is throwing below error

$
0
0

Hi Expert ,

One of my cdc.edFusionODS_capture job is throwing below error, I am not able to understand what's wrong

Executed

asuser:domainname\username.Cannotexecuteasthedatabaseprincipal because the principal "dbo" doesnotexist,thistypeofprincipal cannot be impersonated,oryou do nothave permission.[SQLSTATE 42000](Error 15517). NOTE:  The step was retried the requested numberoftimes(10)withoutsucceeding.  The step failed.


Regards Vikas Pathak

RAISEERROR like function

$
0
0

Hi All,

how to get the raiseerror like functions in SQL server?

The server network address“TCP://SS72:7022″ cannot be reached or does not exist.

$
0
0

SQL Mirror setup error

I am trying to set up mirroring between two SQL Server 2012 instances. I get the error:

 

The server network address “TCP://SS72.local:7022” can not be reached or does not exist…

 

I have searched many blogs and MS sites for s solution, but none that I have found / implemented have worked.

Primary server:  Win 2008R2, SQL Server Ent. 2012 SP1, on working group (not domain), name = SS70

Secondary server:  Win 2008R2, SQL Server Ent. 2012 SP1, on working group (not domain), name = SS72

The servers are in different parts of the country, on different working groups, no domains.

I have:

  1. Followed http://technet.microsoft.com/en-us/library/ms191477.aspx in creating Db master key, encrypted certificates, and endpoints.
  2. I go through the mirror wizard, and everything is successful until I try to actually start mirroring.
  3. Verified that the ‘MLB-mirror’ SQL Server user can login to it’s SQL instance.

 

I have tried to make the following changes (according to solutions that have worked for some)

  1. Verified that ports were being listened to (netstat –na | find 7022).
  2. Changed the Log On As for SQL Services to local system (instead of NT Authority) on both systems.
  3. Tried IPs instead of computer names in mirror setup wizard.
  4. Added ‘local’ to "Primary DNS Suffix of this Computer" text box on both servers, and then tried the full name of SS70.local:7022.
  5. Added each server to the other servers hosts file, including a 2<sup>nd</sup> line for the hostname.local option.

I think it is an authentication or permission problem, but I cant seem to find it. I have seen a message about adding an authentication line on the endpoint creation code, but I am not using a domain.  Not sure how that would go.

Database consolidation

$
0
0

Hi

I am planning to consolidate peace meal deployment of databases. My question is that if I have one clustered dedicated MS SQL database server and its physical resources are run out then what is the solution for new database to be created. 

Please help.

Thanks

Connectivity Errors to SQL Server from Application server

$
0
0

Hi, We have .net application servers making connections to SQL Server. We have started seeing intermittent connectivity issues between the app servers and the database servers. Nothing is found on the error logs of SQL Server (2008 R2 x64 enterprise). But in the application logs, we see the following error : 

Base-Exception: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - Not enough memory is available to complete this request)

 We have seen this at least 5 times in the last month. Any idea what the problem could be or how to track this down , it happens very rare once in a week? Any help is appreciated.

Thank you!

Conditionnal lag/lead?

$
0
0

Hi,

is there a way to use the lag and lead function with conditional?

I want to get the next sales date where the date is not the same as the current row date.

When I have multiple sales the same day, the lag function will return the next row which is the same day...

in this case:

Customer   Date  Product...

A      2014-01-01   P1

A      2014-01-01   P1

A      2014-01-03   P1

Expected result:

Customer   Date  Product next date

A      2014-01-01   P1   2014-01-03

A      2014-01-01   P1  2014-01-03

A      2014-01-03   P1  NULL

so can I do this with the lag function? or do I have to do it the "old" way by using a sub select?

thanks.

Cannot Alter Table

$
0
0

Hello Experts, Please advise on this one, thank you.

We try to prevent giving users/developers dbo in their QA databases as much as we can. One of the problems with this is that they still need to be able to create and modify database objects such as user tables.
Many Devs thus tend to stick with the GUI (SSMS) for this sort of work. The problem arises when we grant them db_ddladmin (not dbo) and they are no longer able to modify tables or columns via the table designer GUI.
I don't know if this is a bug or a feature request but I consider it a bug since the user has sufficient permissions to alter the table via TSQL but the GUI gives them messages stating:
"You are not logged on as the database owner or system administrator. You might not be able to save changes to tables that you do not own."

Thank you



Query performance

$
0
0

Hi

I have a stored proc that runs slow on test server compared to dev server. What are all the possible things to look at?

I have checked the indexes, fragmentation , data involved, updated statistics. They all look identical on both the servers except for the query plan that differs little bit. not sure why?  

Thanks,

Bhanu

SQL Server 2014 - ColumnStore index Clustered with Merge Join

$
0
0

Hi All,

I would like to know in SQL Server 2014, the new feature "Clustered Columnstore". I had inserted 9 millions of records in to a clustered columnstore table.

Then i do a merge join query to insert and update to another table. The Merge join query is as below :

MERGE [dbo].[Temp_FactSales] AS TARGET
USING [dbo].[FactSales_9m] AS SOURCE
ON
(
TARGET.SALESID = SOURCE.SALESID
)
WHEN NOT MATCHED BY TARGET
THEN INSERT
(
[listid],
[sellerid],
[buyerid],
[eventid],
[dateid],
[qtysold],
[pricepaid],
[commission],
[saletime]
)
VALUES
(
SOURCE.[listid],
SOURCE.[sellerid],
SOURCE.[buyerid],
SOURCE.[eventid],
SOURCE.[dateid],
SOURCE.[qtysold],
SOURCE.[pricepaid],
SOURCE.[commission],
SOURCE.[saletime]
)
WHEN MATCHED THEN
UPDATE
SET
    TARGET.[listid] = SOURCE.[listid],
TARGET.[sellerid] = SOURCE.[sellerid],
TARGET.[buyerid] = SOURCE.[buyerid],
TARGET.[eventid] = SOURCE.[eventid],
TARGET.[dateid] = SOURCE.[dateid],
TARGET.[qtysold] = SOURCE.[qtysold],
TARGET.[pricepaid] = SOURCE.[pricepaid],
TARGET.[commission] = SOURCE.[commission],
TARGET.[saletime] = SOURCE.[saletime]
;

The total execute time is  about 10 mins. However if i removed the Columnstore index in the table which using normal primary key. Then the execution time is less than 1 mins.  

My question is when using "merge join", is this the behavior for columnstore index ? As from what i read, Columnstore index is great performance in read the data but not doing "Insert, update and Delete"?

Hope anyone can help.

Thanks a lot.

Recover all sql logins information from crashed sql server(have master db backup file only option)?

$
0
0

sql server crashed and we built another new server and tried to recover all sql logins from old server. only option is we have backup of all system database.

how to recover sql server logins and transfer/create on new server?

Please help.

Logging application responses to a network server

$
0
0

I have an application which creates log everytime an option is selected in it.

I need to capture these responses directly to a SQL server. Is there any C# code to do so. And also the SQL server should be able to handle complete traffic. As the repsonses will be coming from almost 1 million machines.

What should I do to handle so much of traffic on server and to establish this connection. is there any SQL configuration.

Presently this application is logging responses to a txt file on server. But many of the responses are getting missed.

Thanks in advance.

Confusing multiple files in FG in partitioning code

$
0
0

So, i have a code given to me by a previous DBA for how partitioning is setup currently in our env, I am confused by the use of multiple files on a filegrp in the code, so here it goes:

Looks like partitioning is setup by year, The PS is mapped to PF by year and the data from a year say 2013 goes to a FG say named FG_2013, all good till now. What is confusing me is that the FG_2013 contains 12 files (01.ndf and so on till 12.ndf) supposedly to mean per month, but SQL doesn't know 01 means data from Jan right? and then the code marks 01-03 as quarters and so on for the 4 quarters, to me it looks like the code is thinking that SQL knows 01 is Jan , 12 is Dec but it doesn't it just keeps data in the 12 files randomly (right?). 

Simpler would be to keep 1 file per FG - meaning all 2013 data goes to a single file in FG_2013 or to involve PF-PS code using months/quarters. I am just confused, let me know if what I am thinking is right (SQL has no way to know 01.ndf file means Jan - as nothing on the code defines that & thus data is just kept yearly on the fg randomly and 01.ndf is not Jan data only?). Thanks.


D


Problem with the column

$
0
0

Hi,
I don't know why I get this

OLE DB provider "OraOLEDB.Oracle" for linked server "ORA_SYS" returned message "ORA-00904: "OB_OLD": invalid identifier".

with this script

CREATE VIEW [dbo].[vw_ite_tab]
AS
select ...
OB_OLD,
...
from ite_tab
where substr(ite_FROM,1,2) in(''BK'',''TO'',''NP'')
AND trunc(LAST_UPDATE_DATE)=trunc(sysdate)') oq 

while the relevant column has been declared within Oracle, like

 OB_OLD                                                              CHAR(1 CHAR)


Many Thanks & Best Regards, Hua Min


SQL error number is 5110

$
0
0

Background: Im creating an ASP .Net app in VS2005. Local machine has SQL express installed and server has developer edition of SQL 2005.

When it tries to create the database file on a UNC share it comes up with an error "The file "\\server\Visual Studio Projects\Websites\PWSDelete\App_Data\Personal.mdf" is on a network path that is not supported for database files.
An attempt to attach an auto-named database for file
\\server\Visual Studio Projects\Websites\PWSDelete\App_Data\Personal.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share." to you guys the error message

"The SQL error number is 5110 and the SqlException message is....."

may mean more in resolving this issue. I read up on http://support.microsoft.com/kb/304261/ although i understand the risks etc i still dont know how to configure the server to allow remote database files to be created. My guess is to create a "Trace" but not sure where to start and how to ensure im doing this correctly. Can anyone please advise?

Thanks in advance


SQL Server Agent - [165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

$
0
0

Hi,

I keep receiving the error below in the SQL Server Agent Error Log;

[165] ODBC Error: 0, Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQLSTATE 08001]

It is occurring approximately 20 times an hour and i cannot link it to any job failures. All jobs on the same SQL instance are working.

The server is a clustered server and there are no errors occuring in the SQL Server error log at the same time. I have attempted to trace using profiler looking for errors and warnings but anything that does occur doesn't seem to correspond to the reported times of the errors within the sql agent error log.

Please could someone point me where to look next?

Many thanks.

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/

Server restarting

$
0
0

Hi,

MY CPU utilization is constantly touching 90%, sometimes 100%.

Memory utilization is also on the higher end for sql server.

Can this by any chance cause the windows OS to reboot.

SQL Database Size 0 and Unallocated space in negative ..how to Free up?

$
0
0

Hi everyone ,

   One of database size on sql 2000 showing available space 0.00MB and unallocated space -6030.04 MB. 

Any idea how to free up space. 

Is could be reason database holding locks when user trying to insert data?

when user trying to  access database from application they are not able to make change in DB through app. is this  could be reason?

thanks for help


Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach A.Shah

Error:

$
0
0

hello,

our application vendors are receving the below errors while running their data load job.I spoke to our networking team member and he said everything looks good on the networking side .Can someone please help me with the below errors.we are using

Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1).

Windows OS:windows server 2008 R2 sp1

72806920 DBS-0704016/5/2014 1:17:24 PM|Data flow DIM_CONTRACT_SWAM_INIT_LOAD_DF|Loader Key_Generation_DIM_CONTRACT
72806920 DBS-0704016/5/2014 1:17:24 PMODBC data source <HPWDBOE001> error message for operation <SQLExecute>: <[Microsoft][ODBC SQL Server
72806920 DBS-0704016/5/2014 1:17:24 PMDriver][DBNETLIB]ConnectionWrite (send()).
72806920 DBS-0704016/5/2014 1:17:24 PM[Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.>.
67606164 DBS-0704016/5/2014 1:17:24 PM|Data flow DIM_EMPLOYER_GROUP_SWAM_INIT_LOAD_DF|Reader TCRdr_9
67606164 DBS-0704016/5/2014 1:17:24 PMODBC data source <serverName> error message for operation <SQLExecute>: <[Microsoft][ODBC SQL Server Driver]Protocol error in
67606164 DBS-0704016/5/2014 1:17:24 PMTDS stream
67606164 DBS-0704016/5/2014 1:17:24 PM[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).
67606164 DBS-0704016/5/2014 1:17:24 PM[Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.>.

I googled and found the below link the below link which asked me to enable named pipes.I enabled namped pipes in the sql server Network configuration.I havent yet restarted the sql services as this is a prod box.I will do it later in the evening today.

 http://social.msdn.microsoft.com/Forums/sqlserver/en-US/69149a71-3c15-4c95-9f95-a30db458abeb/sql-server-2005-communcations-errors-through-odbc?forum=sqldataaccess 

Can someone help me with these errors.

Thanks


lucky


Viewing all 15872 articles
Browse latest View live


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