Here's a few of the new posts today on the forums. To see more, visit the forums.
How to Insert Default value of Column In Case of Check Constraint Violation Error
- Declare @Var int
Create table Table(id int)
ALTER TABLE [dbo].[Table1] WITH NOCHECK ADD CONSTRAINT [CK_Table1_ID] CHECK (([ID]>=(0) AND [ID]<=(3)))
ALTER TABLE [dbo].[Table1]...
High Memory utilization
- Hi Everyone,
One of our server in the production environment is hitting 93% of memory utilization and sqlserver is the only...
SQL agent configured to call a SP
My problem scenarion is:
"I have a SQL agent job setup that calls a SP which collects all data and sends...
Separate one column in many columns
- I have a table with the next structure:
CREATE TABLE students
ID_Student INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
How to Create Linked Server for a MySQL database using SQL Server Management Studio
- It took me about a day to figure this out, so I thought I'd try to save someone else the...
Restore existing database failed due to space issue
I have two data servers S1 and S2. I have a database D1. D1 exists in both S1 and S2....
Import Dynamic File Name with a Date/Time as the file type (YYYYMMDDHRMMSS)
- For some unknown reason, the creator of this file set the naming convention to something I can't begin to fathom......
SSAS - how to view cubes
- I come from Cognos, and try to understand how users can view and manipulate cubes once they are created? do...
Removing column headers in CSV export file
when I export report to CSV file through sql reporting, header row is included, but there is no header row...
Execution plan shennanigans......
- Hey folks,
I'm looking for some help in understanding why my query is behaving differently under certain circumstances. The query...
How to restore master database.?
what are the steps to restore master database..?
Server becomes very slow [RESOURCE_SEMAPHORE] waittype.
- From last week our server periodically becomes very slow, I'm getting multiple RESOURCE_SEMAPHORE waittypes.
The server box specs are: 4 Quad...
Problems with excel 2007 import using SSIS 2005
I am trying to import data from excel 2007 into my sql server 2005 database using SSIS 2005. SSIS 2005...
Using Script Task to check if Folder Exists
- I am creating a new directory/folder in my package, but before I do that I want to check if the...
2008 SQL Stored Procedure output to a pre-existing Excel 2003 spreadsheet
- I want to create a stored procedure where the output will to into an Excel spreadsheet that will have a...
Emailing in HTML
- Hi All,
I am trying to format an auto-generated email from SQL into HTML, i've sussed a bit of it...
Change IP adresses of clustered SQL 2000
I need to change all the IPs related to a production DB (4 IPs (NICs , Windows and SQL) )
Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)
- I have a Stored Procedure and getting a Error
"Maximum stored procedure, function, trigger, or view nesting level exceeded (limit...
Index Scan vs Index Seek
- What is the difference between index seek and index scan?
Login failed for user with token-based server access validation error
- Can anyone help as I am at a loss with this one.
I am running SQL Server 2000 Standard Edition on...
which type of value should be given to timestamp datatype
insert into tstamp values( ?????)
sql server 2008
- I am confused how to install sql server 2008
Resource Governor in SQL Server 2008
Am looking to implement Resource Governor functionality, and would like to know the links or any useful details which...
SQL 2008 - Configuring SSIS in Cluster
- After making the changes to the xml file to have the cluster name in all the nodes, can i connect...
Transaction log size far exceeds database size when running delete
- we setup a purge process and had about 20GB of free log space but kept filling up the T-log.
Benefits in using a unique login for each user.
- My colleague has received a new application to maintain, written in 4G language.
The users have their own, unique credentials to...
Learn pivot but got an error
- I copied code exactly from http://www.codeproject.com/Tips/500811/Simple-Way-To-Use-Pivot-In-SQL-Query as below but got an error said that
Incorrect syntax near 'PIVOT'. You may...
Can't update to SP3 for SQL 2008
I am running SQL Server Enterprise 2008 RTM and need to upgrade to service pack 3 to support a database...
PAGELATCH_UP Won't Let Go!
I ran into an issue where my backups and checkdb jobs are failing on one database.
Result of a checkdb
- I am trying to load data from a replicated database in SSIS-if for some reason the replicated fails then i...
Date and Time when Table last queried
Is it possible to find out when a table was last accessed i.e Table has been selected from a query.
Cannot connect from VM with Windows XP to SQL Server 2008 R2 on Host Windows 8
I have a PC running windows 8 and SQL server 2008 R2 express and a virtual machine with Windows XP....
The size of a table. (space_used against calculated space).
- With sp_space_used you get the 'gross' size of a table. (Used_size for data)
Summing all fields with a datalength function also...
How to get results from an SP into a table.
- Dear reader,
Below is an example to get data from a stored procedure into a table.
Is there a more generic method...
SQL Date Issue
I wish to create a column 'GoalBehindFlag' which will work like a flag providing me 0s and 1s if the...
SQL Server Transactional Replication . Artice not created by snapshot
- Good Day,
We are running SQL Server 2008r2 using Transactional Replication. We selected a numbe of tables to replicate . One of...
SQl Server R2 Enterprise Evaluation link anyone?
Anyone got a link or is hosting the older 2008 R2 enterprise evaluation version, I need to load up an...
- i am having this error
Msg 257, Level 16, State 3, Procedure query, Line 21
Implicit conversion from data type datetime to...
Division problem in SQL
- Hello All,
Can anyone please explain why do we always get 0 when we divide 1 by any other larger number.
Using the same partition function and scheme for multiple tables
- I have a database where most of the tables have an integer field say "SetId" denoting a batch of data.
creating logon & logoff triggers in MSSQL
- We have several database that we track user logons for, until now all these databases resided in Oracle. For Oracle...
SQL Server Corporate Standards - Automated Compliance Checking
- Does anyone know of a flexible automated SQL Syntax checker?
I want to be able to analyse scripts before they are...
Converting DateDiff to HH:MM:SS
- Evening All,
We're having some issues with some data and i will do my best to explain,
The question relates to vehicle...
DMV sys.dm_db_missing_index_group_stats returns no rows
- Hi All,
I am using a script to review missing indexes on various SQL Servers.
Most of the time, it works just...
Hi guys this urgent reg int to varchar conversion
- I am a fresher dba i got a task where i need to convert int value to varchar please help...
I trying to get the dataset
Ptid Test Result Date
1 BP Neg 1/1/2013
1 CG Pos 1/2/2013
I want result as
using Correlated subQuery in Join not working
- I have a large query that is returning multiple rows that I tracked down to my jornal table.
It has 2...
subquery returning more than one value
- I have two tables, a and b. I want to select all from table a (except where proc_num is null)...
Simplifying The Stored Procedure
- Hi Friends,
In a new assignment as DBA, I am trying to make few codes better and have tasted some success,...
Rollback statement in T-SQL
The functionality of Rollback statement in T-SQL is such a way it rollbacks to the outermost nested transaction. This is...
Case statement with subquery
- I have a CASE statement with a subquery that works most of the time but if the subquery comes back...
help getting return of function and loop into stored proc
I have a tricky issue I am struggly with on a mental level.
In our db we have a table showing...
- Hi Guys,
Any Ideas what the best way would be to perform this update?
SET Track_ID = P.Track_ID,
Territory_ID = P.Territory_ID,
Major = P.Major
FROM Staging.Track_Mapping P
INNER JOIN Staging.Track_Play D
ON P.ISRC = D.ISRC_Code
AND P.Event_Date = D.Event_Date
Creating hierarchical metadata based on DMVs or system tables
- I have a requirement to archive & purge my OLTP data. The database is a tightly defined relational database with Primary...
Oracle 32 bit client on 64 SQL Server 2008
[b]Windows Server 2003 R2 x64 SP2
SQL Server 2008 10.0.2531 (64 bit)
Visual Studio 2008 v9.0.30729.1 SP
.NET Framework v 3.5 SP1[/b]
select not working
- Dear All
In procedure i am using Remark table to capture all the steps executed (instead of print). From another session...
Choosing the correct driver
- I'm writing some documentation on how to connect Access to SQL via ODBC. I honestly always just choose "11.0" when...
Linked Servers (SQL 2005)
- So I am a newb.... I have a database system that uses SQL 2005. The server that these systems reside...
Inserted & deleted table
I have confused with below query . Could anyone please help me....
Client have sent me one view query , there he put...
Delay in Print
- Dear All
I have procedure A,B,C. Procedure A calls B and C. Procedure B and C have loops and print statement...
- Dear All
There is hardly any data in the table on which i have defined foreign key. But when i am...
SQL Server 2008 R2 Maintenance plans and backups
- Hi, I have a customised maintenance plan that rebuilds the indexes and updates the statistics and then takes a full...
Automated backup with no Agent i.e. SQL Express. Hide logon details
Shows a SP to backup DB(s) and how to use windows scheduler to achieve this.
This would work ok if...
SQL Server TDE Encryption
- Hi All,
I have a PRODDB which is encrypted with TDE .I have DMK and DBCert Key with me .I also...
sp_executesql -- can produce very wrong execution plan
- A front end app sends a query to SQL 2008 using sp_executesql.
The query returns a count as the final result.
Does a backup cause TempDB to grow
- I received an alert this morning that our Temp drive had run out of space. When investigating it, I found...
IP Address Doesnt turn from offline to online
Hi I got a problem, I think it is a little bit weird kind of problem, I haven't find anything...
Refer books for exam 70-448 & 70-452
I am planning to take exam 70-448 & 70-452 next month.
[b]Can anyone help me with books need to refered...
I'm new here. I wanted to know which certification is most relevant if I want to go into analytics...
SQL 2012 BI MCSA - 70-462 or 70-463 - Which to take next
- Passed 70-461 today. Have a project to establish a BI warehouse. What would make sense to take as the next...
70-463 Exam v. Training Kit
- How do the test exam questions from the 'Implementing a Data Warehouse with Microsoft SQL Server' training kit compare to...
Failed 70-462. Worth doing 70-461 before resit?
- Took 462 yesterday and only managed to get 612 vs the pass mark of 700. Main problem is that I'm...
Open Excel Error Using PowerShell in SQL Server Agent Job
- I am trying to run a Powershell script, which opens and modifies an Excel spreadsheet, from a SQL Agent job...
NOLOCK is giving different result sets.Why?
- I have 2 select statements. One with NOLOCK hint and other without NOLOCK hint. I am getting different result sets....
Today's Random Word!
When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene...
Are the posted questions getting worse?
- Is it me, or are the posted questions getting worse these days?
I just read a post by someone apparently in...
Display all the days in a months in a matrix
Can someone please suggest, how this is can be done.
I need to produce all the days in the month, to...
How to find FIRST matching value from the table ,
- Hi Team ,
How to find first matching value from the table ,
I need to get the first Australia amount 5000...
- I have the following query:
SELECT Sales_Intrastat.SalesID, Sales_Intrastat.Year, Sales_Intrastat.Period, Sales_Intrastat.Sales, Sales_Intrastat.CostOfSales, InstrastatCustomers.Depot,
InstrastatCustomers.AccountName, InstrastatCustomers.CountryCode, InstrastatCustomers.AccountNumber, CountryCode.Description,
custom columns in a tablix (matrix)
- HI ,
I was wondering if someone could help me.
I have a SQL table with the following fields:
which generates the following...
Report Showing Missing Images
- I have a report that shows badge photo images for staff that is working using an external image source for...
- Here is my company's requirement: We want the user's to create their own reports, so I was thinking of using...
SSRS Error: Failure sending mail: The report server has encountered a configuration error. Mail will not be resent
- Hi All,
I have been trying to send ssrs report to users via email and i followed all the rules like...
Issue with connection to DB2 source connection manager
- Hello All,
In my package source table is exist in DB2 and target will be Oracle db, just a simple...
The process cannot access the file because it is being used by another process - small files are locked a bigger one works fine
- SQL Server 2008R2 SP2.
I have three levels of SSIS packages :
The staging package calls the fileprocessing package...
HOW TO CREATE DYNAMIC FOLDER TO INSERT EXPORTED FILES INTO ??
- Hi All,
In my actual project, my boss asked me to export data from database to csv flat files.
So, as I...
Where is the ideal place to install SSIS?
- We're currently working on building out a new data warehouse and I'm looking for resources or best practices on where...
Help needed for creating the star schema
We are planning to data warehouse the 2 different projects , to implement this we have to create the star schema...
Good analysing, reporting end-user tool ??
I'm looking for a good analysing program for our end-users.
It needs to be able to :
build queries with a simple...
SQL 2012 SSAS performance issue
We had upgraded our SSAS instance with SQL2012 Sp1 and Prior to this up gradation of SP1 there were no...