sql-server

SQL Server Maintenance Plan for fist 10 days of month

Hi, How to create a a maintenance plan for a full backup that run the first 10 days of the month in SQL 2008? THANKS! ...

Linked Server Query Runs But Doesn't Finish?

June 29, 2010 - I had an un-committed action from a previous delete statement. I committed the action and I got another error about conflicting primary id's. I can fix that. So morale of the story, commit your actions. Original Question - I'm trying to run this query: with spd_data as ( select * from openquery(IRPROD,'select * from ...

Scheduling tasks Advice? .Net, SQL Job?

I am creating a system where users can setup mailings to go out at specific times. Before I being I wanted to get some advice. First, is there already a .Net component that will handle scheduling jobs (either running another application or calling a URL) that will do what I am suggesting (Open Source would be cool)? If there isn’t, is it...

Scheduling tasks Advice? .Net, SQL Job?

Possible Duplicate: Scheduling tasks Advice? .Net, SQL Job? I am creating a system where users can setup mailings to go out at specific times. Before I being I wanted to get some advice. First, is there already a .Net component that will handle scheduling jobs (either running another application or calling a URL) that will do ...

SSIS 2008 - import xml file contents into sql server

I want to take a series of xml files and pull the xml of the file into a table in the database. I have a for each file enumerator, then an xml task to pull out the dtd and put the contents in a variable. Now that I have the file name and the contents in a variable, I need to insert both pieces of data into the database. My table to st...

impersonation in asp.net not working with sql server

I have a very strange problem. I have a httpmodule that is running with impersonation (for an anonymous user) through IIS. Impersonation is not taking effect in some cases but is in others. The module is doing an asynchronous web service call, followed by a database call. All of this takes place in the PreRequestHandler event. I'm findin...

How to fake an older version of SQL Server to support legacy application code

I have legacy application that checks to see if the version of SQL Server is 6.5, 7 or 2000. If not, it returns a database not supported error. I would like this application to use the database on SQL Server 2008. Is there a way to fake the version so that the application check for SQL Server version passes. My legacy application code is...

a system design question

I was asking the following question during interviewing in a company working on cloud computing, and did not answer well. Any suggestions on how to analyze this question will be greatly appreciate. Our company has hundreds of millions of users and we expect zero down time in production, explain techniques and programming practices that ...

is it possible to create setup project with web-site included?

Is it possible to create in Visual Studio a setup project which could publish a web-site to a given web-server and at the same time create a SQL database on specified SQL-server instance? Could you show me a good example or tutorial. Thank you upd: And also I'd like to implement checksum checking algoritm to make my setup-app tamper-pr...

Is there tool for automatic apply new scripts for SQL Server, that locate in some folder?

Is there tool for automatic apply new scripts for SQL Server, that locate in some folder? Thanks. ...

Sql Server: How to Deny users access to linked servers

I'd like to deny access to query linked servers to a group of users. I've put them in a role and assigned certain permissions to object level permissions to the that group. I'm at a loss after searching BOL and 'net how to DENY access to linked servers. EDIT: I decided to break out profiler to verify exactly what SSMS is calling when d...

Specify data type with column alias in SQL Server 2008

Imagine I have the following SELECT statement in a view (SQL Server 2008): SELECT (SELECT CASE WHEN HISTORY.OUTOFSERV = 'Y' OR HISTORY.OUTOFSERV = 'y' THEN 1 ELSE 0 END) AS OOS FROM HISTORY The column OOS ends up being of type int, but I'd like it to be of type bit. How can I acco...

SQL server reporting; missing data in sub-reports when exported to EXCEL

i am having 2 independent reports which pulls data from sql database; when i run those reports independently, the reports shows data perfectly and i can export it to excel without any issue of missing/incorrect data in EXCEL. but when i tried to make either of the report; a sub-report of other report, then the data exported in excel is m...

Using ASP.NET tables generated by aspnet_regsql.exe in a SQLite database

I'm building a small ASP.NET MVC site where I want to use SQLite. While I already know how I will be connecting to the database (using DbLinq), I don't understand how to put the ASP.NET tables generated by aspnet_regsql.exe into an SQLite database. I've used the regsql tool before with SQL Server, but never with SQLite. How do I create ...

How do I limit the rowcount in an SSIS data flow task?

I have an Oracle source, and I'm getting the entire table, and it is being copied to a SQL Server 2008 table that looks the same. Just for testing, I would like to only get a subset of the table. In the old DTS packages, under Options on the data transform, I could set a first and last record number, and it would only get that many r...

Insert Into SQL server

I have to create a database, create tables and insert information: I have the database and tables but when I insert I'm having problems... Any help would be appreciated. It is my first attempt at SQL. /* This script creates the SQL database and tables ** for Kudler Fine Foods ** Human Resources */ CREATE DATABASE Mor ; Go USE Mor...

Mirroring , Log shipping SQL Server 2005

Hello, I am tasked with setting up a disaster recovery for one of our system. The primary server is in FL and the secondary is in Germany. The application is a global application within my company. I am not sure if I should use Log shipping or Mirroring. What I have read is that mirroring will have an adverse effect on the performance ...

Using SQL Server Management Studio Express to Backup DB

Hi, I am wanting to backup a SQl Server 2005 db at a remote site (ie. to ultimately have a backup file of the db here locally on my machine). Can this be done using SQL Server Management Studio Express ? I have this installed and running.. but cannot seem to find a way of backing up using it. If this isn't possible, how do I create a ...

How to Select row range wise in SQL Server

I Have a very large database in SQL Server ( around 20 Million Rows ). I have to take backup of that database in .csv format. But .csv supports only 1 million rows in a single file. So I am not able to take backup of whole database. So I have to break that database in 20 Parts. For that I have to select 1-1 Million then 1 million to 2 m...

Is there Boolean data in sql server like mysql?

Is there Boolean data in sql server like mysql? What is the alternative in sqlserver ...