Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).
1
vote
1answer
28 views
Alternate ways to increase column size
I have a database that is in production, and in some instances will have millions of records. It has been requested that we increase the sizes of several columns, which is for the most part pretty ...
0
votes
0answers
5 views
Table schema column data type equivalents for Netezza 6 to SQL Server 2008
I'm trying to find a data type equivalents for data types in Netezza when migrating table schema to SQL Server. Where can I find a complete list? When getting down to brass tacks, I am specifically ...
2
votes
0answers
11 views
List of changes required to upgrade scripts after starting to use replication in SQL Server
We have recently setup transactional replication on our test and production databases. As part of that change, we've had to make changes to how we create upgrade scripts as well. The goal is to make ...
6
votes
2answers
117 views
Are these two queries logically equivalent?
Are these two queries logically equivalent?
DECLARE @DateTime DATETIME = GETDATE()
Query 1
SELECT * FROM MyTable WHERE DATEDIFF(DAY, LogInsertTime, @DateTime) > 7
Query 2
SELECT * FROM ...
1
vote
1answer
9 views
How can I modify a trigger at subscribers SQL Server 2005?
I have a SQL Server 2005 publisher with SQL Server 2005 subscribers and one SQL Server 2000 subscriber running merge replication.
Is there any way to modify triggers at a subscriber with the ...
1
vote
2answers
43 views
T-SQL Naming Standard
Is there a recommended (official or not) style from Microsoft regarding naming and casing in T-SQL?
If there isn't one from Microsoft then is there one with broad acceptance?
0
votes
0answers
10 views
Cannot change the Delete Rule of a self referencing foreign-key-relationship to cascade delete
I have the following table
[dbo].[myObj](
[ID] [int] IDENTITY(1,1) NOT NULL,
[fk_ParentID] [int] NULL
)
and I have a relationship from fk_ParentID to ID.
I want to change the Delete Rule in ...
2
votes
2answers
41 views
How can I get a copy of the SQL generated by Management Studio?
If I save a table in Management Studio's Table Designer for example, I believe it runs DDL SQL in the background. Is it possible for me to grab this SQL so that I can save it to a file?
0
votes
1answer
24 views
TSQL query for viewing start/end of all SQL Agent jobs yesterday
See this related query: What's a good tool for visualizing SQL Agent jobs?
I'm not after a visual tool however, since I am looking to build my own visualisation. This is my starting point, but ...
1
vote
2answers
32 views
Encrypt/Decrypt output & input for SSIS task
I use SSIS packages to output the data from one system as Comma Separated Values, and then import that same data into a second system. I have a new requirement to encrypt the CSV text files that are ...
1
vote
1answer
35 views
bulk insert from file
I am often requested to upload data from file (let's say csv) into a Sql Server 2008 db.
I would like to use BULK INSERT, but I have no access to the db server file system.
Questions
is there a ...
1
vote
2answers
57 views
SQL Server Monitoring Tools [closed]
Can anyone recommend a good SQL server Monitoring Tool?
One which will provide info on, server space usage, CPU usage , expensive queries run etc.
3
votes
1answer
56 views
Preventing users who are dbo from dropping their own databases
We allow our users to be dbo in their own databases, however this does give them the ability to drop their own databases. This doesn't happen very often, but I want to prevent them from doing this.
...
1
vote
1answer
19 views
Logshipping alert emails are being sent out while there is no error
I have logshipping setup with a Primary and a Secondary, and this has been working fine for a long time. Yesterday I started reveiving these emails:
The log shipping primary database ...
3
votes
1answer
60 views
Strange SQL Statement Behavior
I have a simple SQL statement (executing on a SQL Server upgraded from 2000 to 2008 R2):
SELECT TOP (1)
DocNox = CONVERT(integer, SUBSTRING(DocNo, 2, LEN(DocNo)-1)
FROM Tbl1
WHERE
Fld1 = 19
...