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

Database Maill can't send out after trying all online solutions

$
0
0

SMTP settings are

E-mail address: abc@gmail.com

Server Name: tried smtp.gmail.com and smtp.googlemail.com

port: tried 587 and 465 (both added to firewall TCP outgoing and incoming)

Checked SSL connection

Basic Authentication, username abc@gmail.com, password gmail password

have troubleshoot all these steps http://msdn.microsoft.com/en-us/library/ms187540(v=sql.100).aspx , all seems to be working but receiving error message  "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 4 (2012-12-10T15:10:46). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.194.79.109:587). )" 

job task is Last modified by "sa"

I logged in the server using domain administrator and this has access rights to DatabaseMailUserRole, on SQL server 2008. 

Checked not behind any proxy and firewall removed.


Target Server Memory less than maximum server memory

$
0
0

Hi experts

My new server totally have 256 GB memory, i set maximum server memory to 240GB, but the perfmon Target Server Memory only show 223 GB, what's the reason? my OS windows server 2008 R2 enterprise, SQL Server 2008  R2(RTM) enterprise 64 bit, thanks

Regards

Garey


Most suitable SQL server 2008 CAL licenses when running client software on a Remote Dekstop Server?

$
0
0

Hi,

We have a Remote Desktop Server where users are running a Microsoft Access Project client. This client connects to a SQL server 2008 back end database.

My question is to check whether it is best to purchase SQL server 2008 CAL device or user licenses in this scenario.

We have about 100 staff.

Thanks in advance

Paul

Where to find who and when installed service packs in machine?

$
0
0

Where we can find who and when installed service pack on my machine? More interested in who part as well in when part in exact time.

Thanks

Cross Reference Tables

$
0
0

Hi everyone.

Please I need an urge assistant here.

I am working in a BI production environment that I get data from difference sources that has some common tables that are not arranged accordingly.

Example:

In source A, I have a table called Product as

ID ProductName

1  Laptop

2  Printer

3 Scanner

In Source B, there is a Product table as

ID ProductName

1 Scanner

2 Laptop

3 Printer

And source C, there is a Product table

ID ProductName

1 Printer

2 Scanner

3 Laptop.

......

In each of these tables, the ID column are primary keys which are referenced in other tables(Fact tables) from their respective data source.

However, I want to have a consolidated data warehouse where I will only have one Product table that would be used to reference the fact tables from the different data sources without having any conflicts in the referenced foreign key.

Can someone help on clues on how to achieve this.

Thanks


me

transaction log backup

$
0
0

Hello,

My transaction log backup today took longer time to complete than usual. Daily it runs at 1:00PM for about 2 mins and today it took like almost 2 hours. Also for a few databases the size of backup is almost equivalent to size of the full backup. 

We had connectivity issues with the SAN(the drive where tempdb sits) yesterday around 5:00PM and had to restart sqlserver services yesterday for 4 times as I was seeing some of the errors as I listed below.

"The log for database 'tempdb' is not available. Check the event log for related error messages. Resolve any errors and restart the database." 

The services restart fixed that issue. The errors stopped at 7:00PM after the last restart. But the transaction log backup today grew up to almost the size of full backup (50GB) and took longer time. Usually the size of txlog backup is than 500MB for these databases.

I had a purge job that runs once every saturday night that deletes old data. But cant think of if that wud cause this issue.

Thanks for the input.

Error 945 vs 1101 - Recreate issue.

$
0
0

We faced an issue on a non production environment, with the below error...

Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server error log for details.

The solution was to free up some disk space by moving few of teh files on a different location and re-attach the database. that solved the issue.

.............................

I want to re-create this error, but no matter what i do, I am unable to do that. I created a database on a USB and tried to create exact scenario by creating multiple records and making it run out of space.. but i always get error 1101 and not 945.I am wondering how can i reproduce the error number 945 due to lack of storage space?

Msg 1101, Level 17, State 12, Line 1

Could not allocate a new page for database 'DBSpaceIssue' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.


SQL Agent not skipping scheduled run for a Job started manually and in running state

$
0
0

Hi,

While SQL Agent Job skips a scheduled run if the job already running, however the behaviour is not the same if the job is invoked manually. Even if the manually invoked job is currently running, the next scheduled run is not skipped.

Is there any way to change this behaviour so that the SQL Agent job is not invoked multiple times?

Thanks


Manpreet Singh


Physical IO

$
0
0

Hi Gurus,

is there any DMV query for finding physical IO for user defined database.I wanted to represent the data through graph Please give suggestion and please specify what are the columns in the query is important for graph.

Thanks in advance,

Regards,

Venkat.

Trouble Creating SQL Server Peformance Condition Alert

$
0
0

I was attempting to create a SQL Server alert that checked for the log file size of a database.  The issue is that my database is not listed under "instance".  Other databases are missing as well but I do not know how or why a database shows up under instance name.  Does anyone know how I can get my database to show up in the instance dropdown list?

SQL Disk Dependency problem on SQL 2008 cluster including errors

$
0
0

Hi All,

I have a SQL 2008 cluster running with 2 nodes, and what I have recently noticed is that a snapshot creation code has been failing. I checked the cluster dependency property on the SQL instance

and I noticed that the dependency wasn’t set on the backup drive, I took SQL offline, set the dependency and then brought it back online and yet the create snapshot code doesn’t work.

Please note that the drive is a mount point.

Any ideas please

CREATE DATABASE [DBNAME] ON (NAME = [DBNAME], FILENAME = 'X:\BackupMount\Snapshot\DBNAME_Snapshot.ss') AS SNAPSHOT OF [DBNAME]; Msg 5184, Level 16, State 2, Line 1 Cannot use file 'X:\BackupMount\Snapshot\DBNAME_Snapshot.ss' for clustered server. Only

on formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it.

Error


Msg 5184,Level 16,State 2, Line 1

Cannot

usefile'X:\BackupMount\Snapshot\DBNAME_Snapshot.ss'forclusteredserver. Only formatted files on which the clusterresourceof theserver has a dependency can be used. Either the diskresource containing thefileisnot presentin the clustergroupor the clusterresourceof theSqlServer doesnot have a dependencyon it.

SQL 2008 Deadlock graph question

$
0
0

I believe we have a scheduled SQL job that is occasionally experiences a sql deadlock.  We have numerous scheduled jobs so not sure which one it is.  How you can tell from the graph which scheduled job it is that experienced the deadlock?

<deadlock><victim-list><victimProcess id="process48f4988" /></victim-list><process-list><process id="process48f4988" taskpriority="0" logused="0" waitresource="PAGE: 9:3:516827" waittime="4178" ownerId="3521611102" transactionname="UPDATE" lasttranstarted="2012-12-10T10:00:00.787" XDES="0x8003cd20" lockMode="U" schedulerid="7" kpid="5448" status="suspended" spid="314" sbid="0" ecid="12" priority="0" trancount="0" lastbatchstarted="2012-12-10T10:00:00.617" lastbatchcompleted="2012-12-10T10:00:00.617" clientapp="SQLAgent - TSQL JobStep (Job 0x9EC714D5A4CDD44A8AA528C161D2042B : Step 1)" hostname="MySqlServer" hostpid="4520" isolationlevel="read committed (2)" xactid="3521611102" currentdb="9" lockTimeout="4294967295" clientoption1="536870944" clientoption2="128056"><executionStack><frame procname="" line="1" sqlhandle="0x020000007a50d62b3b6b25bc42dca323d693568c574dcffd" /><frame procname="" line="1" sqlhandle="0x020000004e57c10c3bee8fbb667ad4426da31d00c97d23de" /></executionStack><inputbuf /></process><process id="process24f291708" taskpriority="0" logused="0" waitresource="PAGE: 9:3:516827" waittime="4235" ownerId="3521611102" transactionname="UPDATE" lasttranstarted="2012-12-10T10:00:00.787" XDES="0x22653ab60" lockMode="U" schedulerid="6" kpid="4756" status="suspended" spid="314" sbid="0" ecid="11" priority="0" trancount="0" lastbatchstarted="2012-12-10T10:00:00.617" lastbatchcompleted="2012-12-10T10:00:00.617" clientapp="SQLAgent - TSQL JobStep (Job 0x9EC714D5A4CDD44A8AA528C161D2042B : Step 1)" hostname="MySqlServer" hostpid="4520" isolationlevel="read committed (2)" xactid="3521611102" currentdb="9" lockTimeout="4294967295" clientoption1="536870944" clientoption2="128056"><executionStack><frame procname="" line="1" sqlhandle="0x020000007a50d62b3b6b25bc42dca323d693568c574dcffd" /><frame procname="" line="1" sqlhandle="0x020000004e57c10c3bee8fbb667ad4426da31d00c97d23de" /></executionStack><inputbuf /></process><process id="process48f5dc8" taskpriority="0" logused="0" waitresource="PAGE: 9:3:516828" waittime="4251" ownerId="3521609992" transactionname="UPDATE" lasttranstarted="2012-12-10T10:00:00.620" XDES="0x209ed21f0" lockMode="U" schedulerid="7" kpid="4928" status="suspended" spid="315" sbid="0" ecid="10" priority="0" trancount="0" lastbatchstarted="2012-12-10T10:00:00.620" lastbatchcompleted="2012-12-10T10:00:00.620" clientapp="SQLAgent - TSQL JobStep (Job 0x9BE93D5E1314BD41A1E5E4E75D65A639 : Step 1)" hostname="MySqlServer" hostpid="4520" isolationlevel="read committed (2)" xactid="3521609992" currentdb="9" lockTimeout="4294967295" clientoption1="536870944" clientoption2="128056"><executionStack><frame procname="" line="1" sqlhandle="0x0200000074c7f432c234f017dad9ff77c4c57cd052564a7c" /><frame procname="" line="1" sqlhandle="0x020000004705770cc48856a92de6cfe0c47265ae7663cd32" /></executionStack><inputbuf /></process><process id="process5263b88" taskpriority="0" logused="0" waitresource="PAGE: 9:3:516828" waittime="4225" ownerId="3521609992" transactionname="UPDATE" lasttranstarted="2012-12-10T10:00:00.620" XDES="0x2140978b0" lockMode="U" schedulerid="11" kpid="592" status="suspended" spid="315" sbid="0" ecid="15" priority="0" trancount="0" lastbatchstarted="2012-12-10T10:00:00.620" lastbatchcompleted="2012-12-10T10:00:00.620" clientapp="SQLAgent - TSQL JobStep (Job 0x9BE93D5E1314BD41A1E5E4E75D65A639 : Step 1)" hostname="MySqlServer" hostpid="4520" isolationlevel="read committed (2)" xactid="3521609992" currentdb="9" lockTimeout="4294967295" clientoption1="536870944" clientoption2="128056"><executionStack><frame procname="" line="1" sqlhandle="0x0200000074c7f432c234f017dad9ff77c4c57cd052564a7c" /><frame procname="" line="1" sqlhandle="0x020000004705770cc48856a92de6cfe0c47265ae7663cd32" /></executionStack><inputbuf /></process><process id="process3286a2748" taskpriority="0" logused="10000" waittime="755" schedulerid="7" kpid="4808" status="suspended" spid="315" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2012-12-10T10:00:00.620" lastbatchcompleted="2012-12-10T10:00:00.620" clientapp="SQLAgent - TSQL JobStep (Job 0x9BE93D5E1314BD41A1E5E4E75D65A639 : Step 1)" hostname="MySqlServer" hostpid="4520" loginname="CT\MyServiceUser" isolationlevel="read committed (2)" xactid="3521609992" currentdb="9" lockTimeout="4294967295" clientoption1="536870944" clientoption2="128056"><executionStack><frame procname="" line="1" sqlhandle="0x0200000074c7f432c234f017dad9ff77c4c57cd052564a7c" /><frame procname="" line="1" sqlhandle="0x020000004705770cc48856a92de6cfe0c47265ae7663cd32" /></executionStack><inputbuf>
update Packages set packageindex15=createddate
WHERE    (PackageIndex15 = '__-__-____')   </inputbuf></process></process-list><resource-list><pagelock fileid="3" pageid="516827" dbid="9" objectname="" id="lock14aeff580" mode="U" associatedObjectId="72057594343718912"><owner-list /><waiter-list><waiter id="process48f4988" mode="U" requestType="wait" /></waiter-list></pagelock><pagelock fileid="3" pageid="516827" dbid="9" objectname="" id="lock14aeff580" mode="U" associatedObjectId="72057594343718912"><owner-list><owner id="process3286a2748" mode="U" /></owner-list><waiter-list><waiter id="process24f291708" mode="U" requestType="wait" /></waiter-list></pagelock><pagelock fileid="3" pageid="516828" dbid="9" objectname="" id="lock306292c80" mode="U" associatedObjectId="72057594343718912"><owner-list><owner id="process48f4988" mode="U" /></owner-list><waiter-list><waiter id="process48f5dc8" mode="U" requestType="wait" /></waiter-list></pagelock><pagelock fileid="3" pageid="516828" dbid="9" objectname="" id="lock306292c80" mode="U" associatedObjectId="72057594343718912"><owner-list /><waiter-list><waiter id="process5263b88" mode="U" requestType="wait" /></waiter-list></pagelock><exchangeEvent id="Pipe222c58480" WaitType="e_waitPipeGetRow" nodeId="2"><owner-list><owner id="process48f5dc8" /><owner id="process5263b88" /></owner-list><waiter-list><waiter id="process3286a2748" /></waiter-list></exchangeEvent></resource-list></deadlock>


and also i am unable to restart the server what can i do?

Most Expensive Queries

$
0
0

Hi Gurus,

is there any DMV query for finding most expensive queries for user defined database.I wanted to represent the data through graph Please give suggestion and please specify what are the columns in the query is important for graph.

Thanks in advance,

Regards,

Venkat.

Bulk load data conversion error space delimited with "" qualifier

$
0
0

Hi, I am having trouble with a bulk insert.  I am using a prn file with space delimiters and "" qualifiers.  I am also using a format file.  below is the format and the bulk insert statement.

field40 is a float field type and field39 is nvarchar (255)

BULK INSERT dbo.tblFinInput from '\\bjc11179910\c$\LKBJFIN12IP.PRN'
WITH (DATAFILETYPE = 'char', FIRSTROW = 2, FIRE_TRIGGERS, FORMATFILE = '\\bjc11179910\c$\tblFinInput.fmt', KEEPIDENTITY, KEEPNULLS, MAXERRORS = 10, TABLOCK,
ERRORFILE = '\\bjc11179910\c$\tblFinInputerrIP.txt');

Msg 4864, Level 16, State 1, Line 4
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 40 (field40).

Msg 4864, Level 16, State 1, Line 4
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 3, column 40 (field40). ...

10.0
57
1        SQLCHAR                0        510        "\" \""     1    field1                            SQL_Latin1_General_CP1_CI_AS
2        SQLCHAR                0        510        "\" "     2     field2                             SQL_Latin1_General_CP1_CI_AS
3        SQLCHAR                0        510        " "        3     field3                             SQL_Latin1_General_CP1_CI_AS
4        SQLCHAR                0        510        " "        4     field4                             SQL_Latin1_General_CP1_CI_AS
5        SQLCHAR                0        510        " "     5      field5                             SQL_Latin1_General_CP1_CI_AS
6        SQLCHAR                0        510        " "     6      field6                             SQL_Latin1_General_CP1_CI_AS
7        SQLCHAR                0        510        " "     7      field7                             SQL_Latin1_General_CP1_CI_AS
8        SQLCHAR                0        510        " "        8    field8                             SQL_Latin1_General_CP1_CI_AS
9        SQLCHAR                0        510        " "        9     field9                             SQL_Latin1_General_CP1_CI_AS
10        SQLCHAR                0        510        " "     10       field10                             SQL_Latin1_General_CP1_CI_AS
11        SQLCHAR                0        510        " "        11    field11                               SQL_Latin1_General_CP1_CI_AS
12        SQLCHAR                0        510        " "        12      field12                             SQL_Latin1_General_CP1_CI_AS
13        SQLCHAR                0        510        " "        13      field13                             SQL_Latin1_General_CP1_CI_AS
14        SQLCHAR                0        510        " "        14      field14                             SQL_Latin1_General_CP1_CI_AS
15        SQLCHAR                0        510        " "        15      field15                             SQL_Latin1_General_CP1_CI_AS
16        SQLCHAR                0        510        " "        16     field16                             SQL_Latin1_General_CP1_CI_AS
17        SQLCHAR                0        510        " "        17      field17                             SQL_Latin1_General_CP1_CI_AS
18        SQLCHAR                0        510        " "        18      field18                             SQL_Latin1_General_CP1_CI_AS
19        SQLCHAR                0        510        " "        19      field19                             SQL_Latin1_General_CP1_CI_AS
20        SQLCHAR                0        510        " "        20      field20                             SQL_Latin1_General_CP1_CI_AS
21        SQLCHAR                0        510        " "        21      field21                             SQL_Latin1_General_CP1_CI_AS
22        SQLCHAR                0        510        " "        22      field22                             SQL_Latin1_General_CP1_CI_AS
23        SQLCHAR                0        510        " "        23      field23                             SQL_Latin1_General_CP1_CI_AS
24        SQLCHAR                0        510        " "        24      field24                             SQL_Latin1_General_CP1_CI_AS
25        SQLCHAR                0        510        " "        25     field25                             SQL_Latin1_General_CP1_CI_AS
26        SQLCHAR                0        510        " "        26      field26                             SQL_Latin1_General_CP1_CI_AS
27        SQLCHAR                0        510        " "        27      field27                             SQL_Latin1_General_CP1_CI_AS
28        SQLCHAR                0        510        " "        28      field28                             SQL_Latin1_General_CP1_CI_AS
29        SQLCHAR                0        510        " "        29     field29                             SQL_Latin1_General_CP1_CI_AS
30        SQLCHAR                0        510        " "        30      field30                             SQL_Latin1_General_CP1_CI_AS
31        SQLCHAR                0        510        " "        31      field31                             SQL_Latin1_General_CP1_CI_AS
32        SQLCHAR                0        510        " "        32       field32                             SQL_Latin1_General_CP1_CI_AS
33        SQLCHAR                0        510        "\" "     33     field33                             SQL_Latin1_General_CP1_CI_AS
34        SQLCHAR                0        510        "\" "      34     field34                             SQL_Latin1_General_CP1_CI_AS
35        SQLCHAR                0        510        "\" "      35     field35                            SQL_Latin1_General_CP1_CI_AS
36        SQLCHAR                0        510        "\" "      36     field36                            SQL_Latin1_General_CP1_CI_AS
37        SQLCHAR                0        510        "\" "      37     field37                            SQL_Latin1_General_CP1_CI_AS
38        SQLCHAR                0        510        "\" "     38     field38                             SQL_Latin1_General_CP1_CI_AS
39        SQLCHAR                0        510        "\" "      39     field39                             SQL_Latin1_General_CP1_CI_AS
40        SQLCHAR                0        510        " "     40     field40                             SQL_Latin1_General_CP1_CI_AS
41        SQLCHAR                0        510        " "        41     field41                             SQL_Latin1_General_CP1_CI_AS
42        SQLCHAR                0        510        " "        42      field42                             SQL_Latin1_General_CP1_CI_AS
43        SQLCHAR                0        510        " "        43      field43                             SQL_Latin1_General_CP1_CI_AS
44        SQLCHAR                0        510        "\" "      44     field44                             SQL_Latin1_General_CP1_CI_AS
45        SQLCHAR                0        510        "\" "      45     field45                            SQL_Latin1_General_CP1_CI_AS
46        SQLCHAR                0        510        " "     46     field46                             SQL_Latin1_General_CP1_CI_AS
47        SQLCHAR                0        510        " "        47      field47                             SQL_Latin1_General_CP1_CI_AS
48        SQLCHAR                0        510        " "        48       field48                             SQL_Latin1_General_CP1_CI_AS
49        SQLCHAR                0        510        " "        49       field49                             SQL_Latin1_General_CP1_CI_AS
50        SQLCHAR                0        510        " "        50       field50                             SQL_Latin1_General_CP1_CI_AS
51        SQLCHAR                0        510        " "        51       field51                             SQL_Latin1_General_CP1_CI_AS
52        SQLCHAR                0        510        " "        52       field52                             SQL_Latin1_General_CP1_CI_AS
53        SQLCHAR                0        510        " "        53       field53                             SQL_Latin1_General_CP1_CI_AS
54        SQLCHAR                0        510        "\" "     54     field54                             SQL_Latin1_General_CP1_CI_AS
55        SQLCHAR                0        510        "\" "     55     field55                             SQL_Latin1_General_CP1_CI_AS
56        SQLCHAR                0        510        "\" "     56     field56                            SQL_Latin1_General_CP1_CI_AS
57        SQLCHAR                0        510        "\"\n\""     57     field57                             SQL_Latin1_General_CP1_CI_AS


Sql authentication, AD groups, and Default Schema

$
0
0

I want to setup all database access using AD groups. A Management Studio snapshot:

<Sql Server>

  Databases

       Test1

            Security

                  Test1 Sql Account

                  Test1 AD Users group

       Test2

            Security

                  Test2 Sql Account

                  Test2 AD Users group

  Security

       Logins

            Test1 AD Users group

            Test2 AD Users group

The problem is that I can’t assign a default schema to an AD group so it looks like I still need to assign our developers, one at a time, to each database where they need access. (!) Is there a workaround for this problem?

I believe that this is true for Sql 2008. Is it also true for Sql 2008 R2 and Sql 2012?

TIA,

P.S. I understand that developers should be coding the schema name in their stored procs, etc…… it’s just that we have 10+ years of code where no one did that and we need to accommodate it. (Only recently have we started using non “dbo” schemas)

Database incremental backup with Error:3013:BACKUP DATABASE is terminating abnormally

$
0
0

Hi,

Why I get this error when i try to get incremental backup.

I took four time incremental backup.

Database incremental backup with Error:3013:BACKUP DATABASE is terminating abnormally.

Please execute full InstanceName backup script from task scheduler in the absence of me.
Last Backup was of Database DatabaseName.

how to find the sql server BLOCKING using DMV's

How to find list of traces which are running in sql server?

My database Recovery model is :Bulk-logged can i possible to recover in the Point in time???

Viewing all 15264 articles
Browse latest View live


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