I have a nightly job that does a bunch of inserts. Since I have a full recovery model, this increases my transaction log size.
Currently I have my log file big enough to accommodate these transactions, but the issue is that the transaction log is mostly empty throughout the day.
Is it an issue (besides disk space) to have a huge (most...
I have a gridview bound to a sql server datasource. I am currently moving selected items to a ListBox to show chosen records. I'd like to switch to the ReOrderList from the AJAX Toolkit to be able to reorder the selected items. Unfortunately, the ReorderList needs a true datasource to bind to. What is the best practice for creating s...
I have two tables with the following columns (identical columns in both tables):
FunctionName,
FrequencyCount
I want to merge these two tables into a final table with columns:
Function Name
Base Frequency count
Compared Frequency count
Delta of Frequency count
Merge operation should happen as follows:
If [FunctionName] is in Ta...
Need help big time ....
I need to create a .net application that will perform some bulk operations on , say around 2,000,000 records, in a table. There is a window of opportunity in which the application should run and try to process as many rows as it can. I am thinking that if I can have multiple threads of the app take 2000 records...
For all the ETLs I have written so far, I have never made them transactions - i.e. if table 4 fails, roll everything back.
What is the best practice in this regard?
To "BeginTran + Commit" or not to "BeginTran + Commit"
EDIT: I have one master package calling 4 other packages - is it possible to roll them all up into one transaction?
...
I need to copy a table I already I have in a SQL server database, but I don't need th edata contained in the source table. The examples I found only involve copying the data.
Copy the table structure only, not the data.
Source and target tables are in the same database.
Target table does not exist yet.
Need to do this programmatically...
I have the follow T-SQL to update a table with test data:
UPDATE
SomeTable
SET
Created = GETDATE ( ) - CAST ( RAND ( ) * 365 AS int ) ,
LastUpdated = GETDATE ( ) - CAST ( RAND ( ) * 365 AS int )
I want it to pick random daes in the past year, unfortunately it uses the same date for every row. what is the best way to get it to...
I'm Trying to make a long stored procedure a little more manageable, Is it wrong to have a stored procedures that calls other stored procedures for example I want to have a sproc that inserts data into a table and depending on the type insert additional information into table for that type, something like:
BEGIN TRANSACTION
INSERT...
What is the best way to deploy an analysis services project database to a different domain. I have network access to that domain (I am able to ping it).
When I try to deploy the SSAS project to a live server in a different domain I get the following error:
Error 8 The project could not be
deployed to the 'SERVER' server
because ...
Possible Duplicate:
Is it possible to send a collection of IDs as a ADO.NET SQL parameter?
Duplicate: this is a duplicate of Is it possible to send a collection of ID’s as a ADO.NET SQL parameter? and many others. Please vote to close it and add any additional answers to one of the other duplicates.
Given an array of parameters...
I want to take backup of jobs.I know all of these are stored in MSDB database,so i had taken a backup of the msdb database but i'm not able to restore that database as i'm getting a error while restoring on another system that the process terminated abnormally.So,what should i do to restore that.
Thanks Nick Kavadias
But the problem is ...
Hello everyone,
I am using SQL Server 2008. I have a table which has a datetime type column called CreateTime. I need to select all the records from this table whose CreateTime is more than 3 days and half an hour from current time (UTC time). I am using T-SQL store procedure.
BTW: The CreateTime column is some time in the past time.
...
I am using SQL Server 2008 and I need to run a SQL Job from SQL Server Agent. I am new to SQL Server Job and I want to execute a stored procedure regularly from a SQL Server Job. But I did not find where to specify the executed stored procedure other than copy & paste SQL commands.
Here is my screen snapshot,
Any ideas how to assign ...
Hello everyone,
I am using SQL Server 2008 and I want to test the execution correctness of my SQL Server Agent job immediately to ignore the schedule. Any ideas?
thanks in advance,
George
...
I need a user defined function to insert a new record and return the Id, is this possible and how do I do it?
I have tried creating a function with the insert statement but I am getting the following error:
Invalid use of the side-affecting operator 'INSERT' within a function.
I am using SQL server 2008.
UPDATE SQL:
CREATE FUNCTION...
Hello everyone,
I am using SQL Server 2008 and I am writing a SQL Server Agent Job. In my Job, there are 3 steps and in each step I will execute a store procedure. I noticed that in default Notification setting, it write information to Windows event log only when it fails.
My question is, any easy solutions to write both success and fa...
Hello everyone,
I am using SQL Server 2008. I am confused about which account will be used when a SQL Server agent job runs. My confusions are,
SQL Server agent as a Windows Service which we could control from Windows Service Management Console, from there we could set the account to run SQL Server Agent (LocalSystem in my computer);
...
I need to populate an ASP.NET menu control with hierarchical structure with menu items that can be constantly changed, from a database (categories with n levels of sub categories).
There are some approaches for that and I would like to hear which one is the most efficient one.
I have those in mind:
Retrieving data from database a...
Hello everyone,
I am writing PowerShell scripts to control SQL Server agent start/stop to ensure all the contained jobs runs according to defined schedule. I want to make sure that the only thing I need to do is to start the SQL Server Agent Windows Service, and then all the contained SQL Server Jobs will run automatically according to ...
Hi all!! Can I ask what is the difference between xp_sendmail and sp_send_dbmail proc? They are both send e-mail message, which may include a query result set attachment, to the specified recipients.....
What is the difference?
...