How To Create DTS Package For Table Alteration And Movement Of Data

Mar 5, 2008

Peace be on you,

In my organization, we have a database which exceed unto 2 GB. The application on which we are working is developing since the time of asp / cb 6 and in short it is the baby of many developers. It is a kind of ERP which has no documentation.

Problem 1:
=========
Now, to reduce the size of the database we have examined some of the orphan procedures, tables, and columns. Is it possible for me to create a DTS package which create the backup of all the orphan stuff to some other database and delete it from the actual one. Moreover, We still have doubts that some of fields which we think are orphan, might not be. So we need another DTS package which rollback all the changes. (Any Idea for that)


Problem 2:
=========
We want another DTS package which would move the data from one database to another and same rollback DTS for this one. (Any Idea for that)


Problem 3:
=========
How can we use DTS programming to do these tasks ? what benefits do I got from DTS Programming over DTS Wizard.


Any help would be greatly appreciated.

View 4 Replies


ADVERTISEMENT

How Can I Create A DTS Package To Update A Table With Data From An Excel Spreadsheet?

Jul 9, 2006

Every month a client sends a spreadsheet with data which we use to update matching rows in a table in the database. I want to automate this using a DTS package but am having quite a bit of trouble accomplishing what I think should be trivial task. I've been attempting to use a Transform Data Task with a modification lookup but I just keep inserting the rows from the source excel spreadsheet in to the existing destination table without ever modifying the existing data.

Any guidance would be greatly appreciated as to a best practice approach.

View 3 Replies View Related

Help - Can't Connect To Database After Computer Crashed During Table Alteration

Mar 26, 2007

I was altering a few columns (setting to allow nulls) on a large table (30+ million records) and the machine naturally crashed. I rebooted, and now I can't connect to the DB - enterprise manager hangs, and query analyzer times out. is it likely the whole DB is screwed up, assuming the table alteration was incomplete?

thankfully, I do have a backup, but for future reference, is there a preferred way to make changes to large tables? last time I did this it took over an hour, and enterprise manager gives no progress indication to make me feel more comfortable that it's actually doing something...

View 3 Replies View Related

Integration Services :: Create SSIS Package Dynamically For Inserting Data From Flat File To Table?

Sep 30, 2015

I have requirement like  to develop dynamic package for inserting data from flat file to table.

Find below points for more clarification :--

1) if I changed the flat file values and name  in source variable AND  the table name should be also changed based on variable value .

2) it should dynamically mapped with column values with source file as we have to insert data in target table.

See below diagram for more clarification.

View 10 Replies View Related

Create Table From Text File, Extract Data, Create New Table From Extracted Data....

May 3, 2004

Hello all,

Please help....

I have a text file which needs to be created into a table (let's call it DataFile table). For now I'm just doing the manual DTS to import the txt into SQL server to create the table, which works. But here's my problem....

I need to extract data from DataFile table, here's my query:

select * from dbo.DataFile
where DF_SC_Case_Nbr not like '0000%';

Then I need to create a new table for the extracted data, let's call it ExtractedDataFile. But I don't know how to create a new table and insert the data I selected above into the new one.

Also, can the extraction and the creation of new table be done in just one stored procedure? or is there any other way of doing all this (including the importation of the text file)?

Any help would be highly appreciated.

Thanks in advance.

View 3 Replies View Related

Data Movement From One Partition To Another

Jan 22, 2014

I'm moving set of data from one partition to another what is the best way.

what all the things need to be considered

Note: The set of data will be all from one partition to another one partition

My current query:

UPDATEtable1
SET table1.partitioncolumn = @newpartitioncolumn
FROMtable1
INNER JOIN table2
ON table1.id = table1.id
AND table1.partitioncolumn = @oldpartitioncolumn

View 7 Replies View Related

Iterating Data Movement

Mar 28, 2006

Hi all

I am wanting to continuously monitor a source table throughout the day and as data becomes available, process it and insert it into one of a number of tables.

I have tried achieving this using a FOR LOOP and setting the halt condition such that it is not stisfiable. However, this has a couple of problems:

1) It runs in a tight loop and consequently degrades system performance enormously.

2) I can't get transactions to work. I would like each iteration of the loop to spawn a new transaction under which the tasks in the loop can run. Therefore, if one of the tasks fails during such an iteration, only the updates affected by that iteration are lost.

Ideally, I would like to be able to put a wait statement within the loop container so that it runs every couple of seconds. And would also like to implement transactions as described above.

All help is appreciated.

Jays :-)

View 2 Replies View Related

SQL 2012 :: Resume Data Movement

May 28, 2015

The secondary server for my availability group was recycled. When SQL Server came back online the data movement for a database was suspended. The error log shows:

"AlwaysOn Availability Groups data movement for database 'XXXXXXXXX' has been suspended for the following reason: "system" (Source ID 5; Source string: 'SUSPEND_FROM_RESTART'). To resume data movement on the database, you will need to resume the database manually. For information about how to resume an availability database, see SQL Server Books Online."

I was able to resume data movement with no issue. I would like to understand the technical reason as to WHY the data movement was put in the suspended state and left there upon recycle. I searched for an article that would list possible reasons (BOL, Google, Bing, etc..). I just could not find much information out there on 'SUSPEND_FROM_RESTART'.

View 2 Replies View Related

SQL 2012 :: Data Movement On TDE Enabled Database

Feb 13, 2015

I am aware that TDE protects data at Rest and not during communication or data in motion (UNLESS you use Encrypted communication channels using SSL certs etc). Hence I am thinking of doing data export from a TDE encrypted database to a database on the instance where TDE is not enabled or supported. I believe it works and need to take care of relationships between tables.The target database is hosted on SQL 2012 standard edition on which TDE is not supported.

View 4 Replies View Related

Could Not Continue Scan With NOLOCK Due To Data Movement

Aug 24, 2007

Hi all,

I'm getting this error on expanding the Databases node in SQL Server Management Studio Express Object Explorer:


Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
Could not continue scan with NOLOCK due to data movement. (Microsoft SQL Server, Error: 601)

A similar error message also appeared when I tried opening an existing data connection within Database Explorer in Visual Web Developer Express. (However, the web application ran fine and it managed to access the database normally.)

These errors only appeared recently. Any ideas how to go about solving this issue?

Thanks in advance.

View 1 Replies View Related

Fails With: Could Not Continue Scan With NOLOCK Due To Data Movement

Mar 20, 2008

We have a stored procedure that failed with: Could not continue scan with NOLOCK due to data movement

We are running with ISOLATION LEVEL READ UNCOMMITTED. There are other jobs running, some of which might be hitting these tables (all using the ROWLOCK hint - though I know that's not guaranteed), however, this stored proc would not be going near the same rows. But even if they were, we'd be happy with either the before-look or after-look. This needs to be a low-impact job and should have minimal impact on ther other jobs, so we can't take out locks. Is there any hint we can use to do this? e.g. can we tell the query to just wait until the data has stopped moving then try again?

View 3 Replies View Related

Field Content Alteration

Feb 24, 2000

Hello,

I have a field in a table called 'CourseId' - the course Id should always contain a backslash somewhere in the list of numbers eg :

12342322
11231131

Unfortunately, some of the course Ids have a forward slash instead of a backslash eg :

462322/1
23/232323

How can I update the field to replace the / with a

Any help is very much appreciated.

Thanks in advance,

Anthony

View 1 Replies View Related

How To Create A SSIS Package For Data Import.

Sep 20, 2007

Hi,
I want to create a package to import some tables from database X from Server XYZ to database X of server ABC.
(As my X database on server XYZ is gets updating everyday so i need to update it on X of server ABC using the package.)
So i have created a package using the import export data transformationn services.
It runs fine while creating. i.e importing data for the first time. But when i have saved that SSIS package on SQL or File system and scheduled it to run daily, but if fails everytime. I am not getting the error its giving. Because everytime when i go to view history of that package it just gives me messages like step1 started by user xyz and failed.
Can you please help me to sort out this problem.
If possible give me steps which will help me to create package to run above scenario.
you can mail me the solution on abhijeets@nedbank.co.za

Thanks in advance.
Abhijeet.

View 3 Replies View Related

Create Package For Multiple Table Insert From Flat File Source

Feb 23, 2008



Hello Guys,

I am working in one company and currently I am assigned to new project for Data Migration from company X to our company Y using SSIS. I am totally new and i just completed 5 tutorial which was gien on MSDN website.

Basically client is going to send us first flat file with 1 million records with Header, Detail and Trailer records.
I want to create a Package in such a way that it dumps all this first load into 7 to 8 different tables at a time.
we also have to include functionlity for validation and error check.
On successfull load error file should only return Header and Trailer but no detail records.
If there are any errors then error file should contain Header, Detail records which were unable to load plus trailer which we have to sent back to client.

When 2nd file comes that time we have to check whether this is new records or change (update) one depending on Flag which tells it.


This is basically high level idea of my Package what i need to create. If u guys have any question then let me know.

I know you guys are very experienced one. Anyone of you please give me some detail idea on it I would really appricate it.
I have very limited time line for it.

Thanks

Shah

View 4 Replies View Related

If I Had Any Hair Left I'd Pull It Out. How Do I Create A SSIS Package Which Creates A Table That Never Expires?

Mar 6, 2007

Hello everyone,

I'm not at all comfortable with SSIS so please forgive me if I overload you all with information here:

I need to create a data table using SSIS which does not delete the previous days data. So far all the data tables we use to write reports in Visual Studio are constructed in SSIS as follows.

1 - Excecute SQL Task - DELETE FROM STOCK
2 - Data Flow Task
3 - Data Reader Source - SELECT * FROM ODBCDATASOURCE
4 - OLE DB Destination (Creates table STOCK)

The data tables which are created this way are stored in a data warehouse and scheduled to refresh once a day, which means that any data from yesterday is lost when the updates run. So, I tried to create a table which never has its previous days' data deleted by using just the last three steps above - and it worked great in Visual Studio, no problem at all. However, when I added this SSIS Package to the Update Job in SQL Server Management Studio, the job totally rejected the packed with the message: "The command line parameters are invalid. The step failed".

I thought I could work around this problem by asking the job step to excecute a simple SQL query to insert the data from table1 into table2 (and would thus negate the need for a SSIS Packege at all), but it threw me a curve ball with some message about not being able to use proxy accounts to run T-SQL Scripts.

If anyone knows how to create a SSIS package in which the data never expires please could you impart some wisdom my way. I only need to do this once for a specific report.

Please, when answering, bear in mind that I'm a simple fellow with little understanding of the inner workings of SQL Server and its various components, so please use short sentences and simple words.

Thanks in advance,

Chris

View 25 Replies View Related

SSMS Express: Create TABLE && INSERT Data Into Table - Error Msgs 102 && 156

May 18, 2006

Hi all,

I have SQL Server Management Studio Express (SSMS Express) and SQL Server 2005 Express (SS Express) installed in my Windows XP Pro PC that is on Microsoft Windows NT 4 LAN System. My Computer Administrator grants me the Administror Privilege to use my PC. I tried to use SQLQuery.sql (see the code below) to create a table "LabResults" and insert 20 data (values) into the table. I got Error Messages 102 and 156 when I did "Parse" or "Execute". This is my first time to apply the data type 'decimal' and the "VALUES" into the table. I do not know what is wrong with the 'decimal' and how to add the "VALUES": (1) Do I put the precision and scale of the decimal wrong? (2) Do I have to use "GO" after each "VALUES"? Please help and advise.

Thanks in advance,

Scott Chang

///////////--SQLQueryCroomLabData.sql--///////////////////////////
USE MyDatabase
GO
CREATE TABLE dbo.LabResults
(SampleID int PRIMARY KEY NOT NULL,
SampleName varchar(25) NOT NULL,
AnalyteName varchar(25) NOT NULL,
Concentration decimal(6.2) NULL)
GO
--Inserting data into a table
INSERT dbo.LabResults (SampleID, SampleName, AnalyteName, Concentration)
VALUES (1, 'MW2', 'Acetone', 1.00)
VALUES (2, 'MW2', 'Dichloroethene', 1.00)
VALUES (3, 'MW2', 'Trichloroethene', 20.00)
VALUES (4, 'MW2', 'Chloroform', 1.00)
VALUES (5, 'MW2', 'Methylene Chloride', 1.00)
VALUES (6, 'MW6S', 'Acetone', 1.00)
VALUES (7, 'MW6S', 'Dichloroethene', 1.00)
VALUES (8, 'MW6S', 'Trichloroethene', 1.00)
VALUES (9, 'MW6S', 'Chloroform', 1.00)
VALUES (10, 'MW6S', 'Methylene Chloride', 1.00
VALUES (11, 'MW7', 'Acetone', 1.00)
VALUES (12, 'MW7', 'Dichloroethene', 1.00)
VALUES (13, 'MW7', 'Trichloroethene', 1.00)
VALUES (14, 'MW7', 'Chloroform', 1.00)
VALUES (15, 'MW7', 'Methylene Chloride', 1.00
VALUES (16, 'TripBlank', 'Acetone', 1.00)
VALUES (17, 'TripBlank', 'Dichloroethene', 1.00)
VALUES (18, 'TripBlank', 'Trichloroethene', 1.00)
VALUES (19, 'TripBlank', 'Chloroform', 0.76)
VALUES (20, 'TripBlank', 'Methylene Chloride', 0.51)
GO
//////////Parse///////////
Msg 102, Level 15, State 1, Line 5
Incorrect syntax near '6.2'.
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'VALUES'.
////////////////Execute////////////////////
Msg 102, Level 15, State 1, Line 5
Incorrect syntax near '6.2'.
Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'VALUES'.

View 7 Replies View Related

How To Create Table A By Inserting All Data From Table B?

Jan 16, 2005

Hi,

Anyone can help me?

How to create Table A by inserting all the data from Table B?

Cheers,
Daniel.

View 1 Replies View Related

CREATE TABLE FROM ANOTHER TABLE WITHOUT COPYING DATA

Feb 20, 2008

select * into dbo.ashutosh from attribute where 1=2

"USE WHERE 1=2 TO AVOID COPYING OF DATA"

//HERE "ASHUTOSH" IS THE NEW TABLE NAME AND "ATTRIBUTE" IS THE TABLE WHOSE REFERENCE IS USED//
//the logic is to use where clause with 1=2 which will never be true and hence it will not return any row//

View 3 Replies View Related

Create Table From Row Data

Sep 7, 2006

Hello,
In SQL Server 2000, is it possible to take a table with one field (column), and pivot the table so that the characters in the row data become the field (column) names of another table ( or in a View)? The number of records could vary.

If so, how would I do this?

Sample table;
Create Table dbo.MonthlyData
(
Categories varchar(30) NOT NULL
)

Sample data;

Sales Volume 2005-02
TotRefVol 2005-02
Sales Ratio 2005-02
Sales Volume 2005-03
TotRefVol 2005-03
Sales Ratio 2005-03
Sales Volume 2005-04
TotRefVol 2005-04
Sales Ratio 2005-04

View 7 Replies View Related

Create CSV File From A Data Table

Mar 6, 2008

 Hi,     I am working on SQL Server 2005 Express and what i want to do is to created a CSV file from a database Table or a View......I search around and find that I Can use BCP for that purpose..Ne other good idea if you people suggest....as BCP is not working on my PC while i am connected to database server...So plz suggest me the right way to do so...  thanx 

View 5 Replies View Related

Create Script Of Table... With Data?

Oct 9, 2007



In SQL Server Management Studio, I can right-click a table and choose:

Script Table as > CREATE To > New Query Editor Window

When I run the script on another database, it creates the table without the data. Is there an option to bring the data (i.e. the contents of the table) along with the table definition?

View 5 Replies View Related

Use A DTS Package To Create An Excel, Which Has In The Filename The Date The Package Is Ran

Dec 19, 2006

I am trying to create a DTS Package which will run a SQL query and export the results to an Excel file.  I would like to the name of the excel to be "dynamic".  What I would like is for the name to be ChronicDownSiteReport - mmddyy.xls.  The mmddyy is the date which the package is executed.
 How can I do this? 
Also, I want this package to be excuted at 1am every Sunday Morning.  I have attempted to schedule this to run, but when I come to work on Monday, the excel file is not present and the email, which is sent telling me that the file was created is not in my mailbox. 

View 2 Replies View Related

Package Is Not Able To Create Process To Execute Child Package.

Jul 3, 2007

Hi,
In my application, i have two package, parent package and child package. the parent package is executing child package using a Execute Package Task.
"Execute Out Of Process" property of Execute Package Task is set to TRUE. means the child package will be run in separate process not in the process of Parent package.
this was working fine, but at a particular client location. its failing the error is "not able to load child package".
for me it seems some setting on server restricting to create separate process for child package execution.
when "Execute Out Of Process" property of Execute Package Task is set to FALSE. its working fine.

can anyone help what could cause its failure with property set to TRUE.


Appreciate any help.

View 2 Replies View Related

How Can I Create A Cool Data Model Table Map?

Oct 14, 2006

I first got this map from SQL Server Magazine subscription. Now isee it's available to download as a PDF from Microsoft.http://www.microsoft.com/downloads/...&displaylang=enI've just installed Visual Studio Team Edition for Database Professionalsand for the next coming weeks i'll get a chance to see what kind of datamodel design capabilities the product offers.My question would be do you know how I can make our databasemodel look cool like this map? Would you know if this is a third partysoftware that does this with nice colors and all?Do you think I can do similar quality data model map using VSTE forDB Pro?Thank you

View 3 Replies View Related

Movement Within A Cursor

Nov 30, 1998

I have a table named sales, num of rows are 20. total number of rows for stor_id is 5 rows
I assume that when I create a cursor like this one which will have 5 rows from the cursor Now if I print a statement , I assume that I will have the statement 5 times( one for each row) Am I correct...
well, if this is the concept, I am still having one printed statement.. I do not know why , am I doing something wrong?
thanks for help

CREATE PROCEDURE p_cursor @ord_nbr char(4)
declare rst cursor for
select * from sales
where stor_id= 123
open rst
fetch rst
if (@@fetch_status=0)
print ' I may have 5 rows '

close rst
deallocate rst

View 3 Replies View Related

Any Movement On The 4 Gig Limit???

Aug 21, 2006

We're very interested in having our application use SQL/e but we can't have the 4 gig limit. It makes sense to me that SQL/e simply should not be able to access a file over the network, and then you wouldn't have any reason to put a 4 gig limit on it.

At that point it becomes a very flexible alternative for remote users that need to have a large amount of data (i.e. documents, images etc.) with them.

We'd love to start building an abstraction layer so that we can support both SQL Server and SQL/e so that we can support network and remote users and not have the nightmare that is SQL Server Express installation. (care of the windows installer group's bugs...)

Thanks! Hoping for a favourable answer!

View 3 Replies View Related

How Can I Create A Clean Copy Of My DB And Keep Lookup Table Data

Nov 27, 2007

I have a database that I have been creating and testing. I have added some junk data and some data into lookup tables. Is there a way to create a clean copy of the db and keep the lookup table data? Also will I be able to create the db under a new name?

View 1 Replies View Related

T-SQL (SS2K8) :: Create Dynamics View Which Contain Data Of All Table

Apr 16, 2014

I have view something like

Create view All_employee
AS
SELECT Emp_Name, Emp_code FROM dbo.Employee
UNION ALL
SELECT Emp_Name, Emp_code FROM Emp_201402.Employee

But we have a different "Schema" for same table because we have archive table with same table name but with different schema name. Now we have req to make view which contain data of all table. But I can't seem to figure out how to do it in a view.

SET NOCOUNT ON
DECLARE @Count INT, @TotalCount INT, @SQL VARCHAR( MAX )
DECLARE @Schema TABLE ( ID INT, NAME VARCHAR(512) )
INSERT INTO @Schema
SELECT ROW_NUMBER() OVER (ORDER BY SCHEMA_ID), Name FROM sys.schemas where name like '%emloyee%' ORDER BY schema_id ASC

[Code] ....

Don' think that works.

Is this possible with a view or it other way to do it?

View 7 Replies View Related

Create Table: Want A Column With Money Data Type

Dec 14, 2007

Hi all!

I want to create a table. One of the columns should be in the data type MONEY with two digits on the right side of the decimal point.
How is that possible?

Thanks a lot and greetings from vienna

landau

View 2 Replies View Related

DB Design :: Create Table On Given Data Model Diagram

Jul 27, 2015

I never created table on the basis of Data model diagram . I have to create the 3 table on the basis of given Data model diagram. There are 3 tables

1.md_geographyleveltype
2.md_geographylevel
3.md_geographylevelxref

I have tried to create 2 table but unable to create 3rd table.

CREATE TABLE [dbo].[md_geographylevel](
[type_key] [int] NOT NULL,
[geog_key] [int] NOT NULL,
[Type_description] [nvarchar](50) NULL,
[Store_flag] [nvarchar](10) NULL,
[Type_short_desciption] [nvarchar](50) NULL,

[Code] ....

I am getting difficulties to create table script for table

md_geographylevelxref

How to create the table create script for

md_geographylevelxref

View 2 Replies View Related

Create Temp Table To Store Data From Database(mssql)

Jun 26, 2007

I am a starter of vb.net and trying to build a web application. Do anyone know how to create a temp table to store data from database? I need to extract data from 3 different tables (Profile,Family,Quali). Therefore, i need to use 3 different queries to extract from the 3 tables and then store it in the temp table. Then, i need to output the data from temp table to the screen. Do anyone can help me?

View 2 Replies View Related

SQL 2012 :: Automatically Create Insert Statements For Table Data

Jun 10, 2014

How to create insert statements of the data from a table for top 'n' rows. I know we can create using generate scripts wizard, but we can't customize the number of rows. In my scenario i got a database with 10 tables where every table got millions of records, but the requirement is to sample out only top 10000 records from each table.

I am planning to generate table CREATE statements from GENERATE Scripts wizard and add this INSERT STATEMENT at the bottom.

EX : INSERT [dbo].[table] ([SERIALID], [BATCHID] VALUES (126751, '9100278GC4PM1', )

View 4 Replies View Related

T-SQL (SS2K8) :: Create Numerous Directories On Server Using Data From Table

Apr 15, 2015

SQL 2008

I have a table that has company id, attachment file name, folderexists columns.

First what I need to do is create a series of folder or directories on a networked server using the company id as the folder name where the folder name does not already exist.

Second I need to move files based on attachment file name and company id to the proper folder.

For those who want to know, this is a remediation project because of a bug in our application.

The application is supposed to created the folder based on company id and then put the attachment in that folder.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved