Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Single Table Load


I thought I had posted this question already, but didn't see it in
the list. I apologize if this is a repost.

I am running SQL Server 6.5 SP 4.

I am attempting to load a single table from backup, but continually get
the error about schemas not matching. Interestingly, it comes back with
a status 4, and not the status 3 indicating a mismatch on Ansi_Padding.
The statement I am using is
load table demhist from internal_tape with file=5,nounload

I have tried creating the table from scratch and using select * into...
I have tried both above with both settings of Ansi Padding. The table
I am trying to load contaings char columns which allow nulls. I have
experimented with loading 2 other tables. One of the other tables loads
and one doesn't. The one which does not load also has char columns which
allow nulls, while the one that does load does not have char columns
which allow nulls.

Is it a known problem or limitation on the table load that it cannot reload
tables that contain char columns which allow nulls?




View Complete Forum Thread with Replies

Related Forum Messages:
How To Load Text File Into Single Row ?
Hi
how to load text file into single row

I already created dts using
Read File Transformation to place
data in to buffer table then
update row in main table

Is Any way to do it without using DTS , just with T- Sql or bcp ?

View Replies !
Report Does Not Load When Single Valued Parameter Is Changed ???
Hi all,

I have a report running with both a db and Analysis services data source..When I change any of the multi-valued parameters a post-back is done and then the page is re-loaded all good. However. When I change one of the single value parameters a post-back occurs however the page said "Report parameter values must be specified before the report can be displayed. Choose parameter values in the parameters area and click the Apply button." If I THEN press APPLY the report loads perfectly with the selected option.

I have un-hidden ALL my parameters and they all seem to get values.. Does anyone have any clue what could be going wrong ?


Thanks.

View Replies !
Combine Data In Single Row From Single Table
How can i combine my data in single row ? All data are in a single table sorted as employeeno, date


Code:

Employee No Date SALARY
1 10/30/2006 500
1 11/30/2006 1000
2 10/25/2006 800
3 10/26/2006 900
4 10/28/2006 1000
4 11/01/2006 8000


Should Appear


Code:

EmployeeNo Date1 OLDSALARY Date2 NEWSALARY
1 10/30/2006 500 11/30/2006 1000
2 10/25/2006 800
3 10/26/2006 900
4 10/28/2006 1000 11/01/2006 800

PLEASE HELP I REALLY NEED THE RIGHT QUERY FOR THIS OUTPUT.

THANKS IN ADVANCE

View Replies !
Table Load
After working on this with no luck for a couple of days I am sick of pounding my head against a wall!  I need help!!  I am trying to load 3 flat files into one table and I am not sure how to do it using SSIS.  I just need some guidence as to where to go.  I can load 1 flat file into the table but 3 is the issue and combining the data so it is loaded in sequential rows.  I have had it load, but it has been in three pieces one after the other.  I am just not sure where to go and I really need some help!  Thank you for any assistance or advice!

View Replies !
How To Load A Table Into Memory ?
How can I load a table into memory in SQL Server 2000 or SQL Server 2005 ?
How can I keep the table always in memory in SQL Server 2005 ?
 with all my thanks

View Replies !
Load Table Error
I'm receiving the following error at one of my production sites and can't determine the problem. I'm restoring one table to tempdb, but the LOAD command isn't finding the table definition/address information in SYSOBJECTS for that table. I've ran a dbcc checktable on sysobjects and it's fine. Any other suggestions? (FYI - there are some errors when running a checkdb, but none on sysobjects - a FIX_AL is scheduled to be run soon.).

THX,
Mike
------------------------------------------------------------------------

load table tempdb..acct_map_condition
from disk = 'd:mssqlackupcarman.dump'
with source = 'acct_map_condition'

Msg 4039, Level 10, State 1
Warning, file <1> on device 'd:mssqlackupcarman.dump' was dumped from database 'carman'.
Msg 8409, Level 16, State 1
Invalid source table 'acct_map_condition' specified in LOAD TABLE. Could not find table in SYSOBJECTS in dump. Table load has been aborted for table 'acct_map_condition'.

View Replies !
Load A Table From A File
I want to load a table from a file.
My file has a fixed length(fixed block) and have the same
fields of the table.
I need the right sintaxis, because The next with errors:

"load from file1 insert into table1"

ANY ADVICE will be greatly apreciatted because I'm not an
expert in databases. Thank you veru much.

Nauj

View Replies !
Table Load Problem
I am trying to load a table via SSIS from a text file (becdldep), which I have defined in the package as fixed width. The fourth column in my table is defined as decimal (6, 4) and the input is the six digits 246128. I get the following error message:

Error: 0xC020901C at becdldep to Securities, Securities [1006]:
There was an error with input column "Column 4" (1313) on input
"OLE DB Destination Input" (1019). The column status returned was:
"Conversion failed because the data value overflowed the specified type.".

When I define the column as float the value is accepted without an error but it is seen as 246128 rather than 24.6128. I could update the column with a divide by 1,000 but is there an easier solution?

View Replies !
Auto Create && Load In SQL Table
Hi does anyone know how to create a sql table and then import a list by just clicking on a button to call a procedure?CREATE TABLE clients(ClientID VARCHAR(5), ClientName VARCHAR(30), PRIMARY KEY (ClientID));LOAD DATA LOCAL INFILE 'C:/client.csv' INTO TABLE clientsLINES TERMINATED BY '
';

View Replies !
Determine Table Load Order
Does anyone have a script that analyzes primary and foreign key relationships of tables and produces a suggested load order based upon dependancies?

Thanks,

Fred.

View Replies !
Load Table 8412 Error
We have a table where a column has been corrupted due to
a program error. I am attempting to reload the table from
backup but get the following error:
Msg 8412, Level 16, State 4
Schemas differ between source table 'demhist' and target table 'demhist0225'.
Table load has been aborted for table 'demhist0225'.

Reading knowledge base made me change the Ansi Padding, but to no avail.
Here is the script I am using to do the reload.
drop table demhistload..demhist0225
go
set ansi_padding on
select * into demhistload..demhist0225 from orderdb..demhist where 1=2
load table demhistload..demhist0225 from internal_tape
with nounload,file=5,source="demhist"

I have tried this with ansi_padding on and off and in two different
databases.

The table includes datetime,char,varchar,float,int and timestamp columns
(no text or image). I can post the table description from sp_help if that
would help.

thanks for any help.
ben

View Replies !
LOAD TABLE With UNC Doesn&#39;t Work
Since I have to go across the network, I'm trying to use the UNC. However, this won't even work when I'm using the UNC to point to the server on which this is run. I'm trying to restore a single table on 6.5. What is the obvious piece that I'm missing?

This works.

LOAD TABLE address
FROM DISK = 'd:MSSQLackupDBBackup.DAT'
WITH source='address'


This doesn't.

LOAD TABLE address
FROM DISK = 'server1d$MSSQLackupDBBackup.DAT'
WITH source='address'

View Replies !
Load Table From Backup Error...
I posted this a while back with no responses...does anyone know of another SQL Server discussion site that I can post this question to? I'm still having problems.

TIA,Mike

----8<-----original post--------------
I'm receiving the following error at one of my production sites and can't determine the problem. I'm restoring one table to tempdb, but the LOAD command isn't finding the table definition/address information in SYSOBJECTS for that table. I've ran a dbcc checktable on sysobjects and it's fine. Any other suggestions? (FYI - there are some errors when running a checkdb, but none on sysobjects - a FIX_AL is scheduled to be run soon.).

THX,
Mike

------------------------------------------------------------------------

load table tempdb..acct_map_condition
from disk = 'd:mssqlackupcarman.dump'
with source = 'acct_map_condition'

Msg 4039, Level 10, State 1
Warning, file <1> on device 'd:mssqlackupcarman.dump' was dumped from database 'carman'.
Msg 8409, Level 16, State 1
Invalid source table 'acct_map_condition' specified in LOAD TABLE. Could not find table in SYSOBJECTS in dump. Table load has been aborted for table 'acct_map_condition'.

View Replies !
Trying To Load Table With Clustered Index
We are trying to load flat text files with upwards of 7 million records into a table on SQL. The table has a clustered index on 3 fields. We setup the indexes prior to importing the data. We are sometimes able to complete smaller tables (500,000-750,000 records), however when we try the larger tables an error occurs :

Error at Destination for row number 6785496. Errors encountered so far in this task: 1

Location: somerge.c:1573
Expression: mrP->mrStatus!=MERGERUN::NONE
SPID: 11
Process ID: 173

The destination row number is the same number as the total number of rows that we are trying to load.

None of the recods end up importing. The row number it gives is always the total number of records that was in the text file I was trying to import. I tried to import the text files first and then build the clustered indexes but a table with only 300,000 records ran for nearly 4 days without completing before we killed it.
Be for we try to load the file we always delete whatever is there. Some of the files that we try to load are new and we have to set up the indexes from scratch.
We are using a DTS wizard. Someone told me to find a way to get it to commit every 1000 or so but I can't find a way to do it. I looked and looked but can't find it !!!


Please help me on where to look......:(


Thanks,
Cheri

View Replies !
How To Load Data Into A Table Using A Synonym?
I'd like to use a data flow task to load data into a table by specifying the synonym name of the destination table, instead of the actual table name.

The OLE DB Destination is forcing me to pick an actual table or view from a drop down list. Any ideas on how to get around this?

Thank you.

View Replies !
VCHAR To XML After Table Is Load Via SSIS
 
I loaded a vchar column using script trans (SSIS doesn't support XML data types  :/)  to format the XML data properly.  Since the XML data in the vchar column was not encoded, when I try to alter the vchar column to xml after the table is loaded it fails.  I assume this is because the parser is having trouble with the content of the data within the xml tags. 
 
This is how I coded the XML rather than using a xml method.  "true" places the element end tag.
 

 

newXML += FormatElement("CONFERENCE") _

+ FormatElement("NAME") + ConvertToESC(RTrim(Mid(Row.activity, 1, 34))) _

+ FormatElement("NAME", True) _

+ FormatElement("START_DATE") + ConvertToESC(RTrim(Mid(Row.activity, 35, 8))) _

+ FormatElement("START_DATE", True) _

+ FormatElement("END_DATE") + ConvertToESC(RTrim(Mid(Row.activity, 43, 8))) _

+ FormatElement("END_DATE", True) _

+ FormatElement("CONFERENCE", True)
 
 
My question is, can I either load the data, using T-SQL, into an XML data type from a vchar column or is there a way to alter the type from vchar to xml without encountering the following parsing error?
 
 

Msg 9421, Level 16, State 1, Line 1

XML parsing: line 1, character 64, illegal name character
 
Thanks for any suggestions!
 
James
 

View Replies !
Odd Behaviour When I Load A File Into A Table
Hi all of you,
 
I've got an issue with a plain file. This file owns (n) rows. Some of them have less information than others.
I mean:
 
1             2             3             4             enric      enric1    enric3
1             2             3             5                             enric2
1             2             3             6                                                            enric4
1             2             3             8
1             2             3             9
 
File is loaded into the table successfully but my DTSX only loads all those rows totally full, the rest ones no. ?¿?¿
               
1             2             3             4             enric      enric1    enric3
 
I'm stuck with this and at the same time, suppose that it'll be a stupid thing.
 
Thanks indeed for your time,
 
Enric

View Replies !
How To Load Text File Into A Table?
1 4/19/06                                                                               abc3100UD:Dcod25-uss1                              PAGE      1

                                      REPORT ON xxxx cs PREVIOUS DAY
-
                                                          PREV                REP
       LOAN #                BORROWER              STAT   STAT   APP DATE   INITIAL    ORD DT          LOANAMT         CLIENTNAME
0    0123454681   xxxx, xxxxxxxxxx                 10    9      06/04/05     abc       060418            $310,000.00   ABC temp plus
                                                                             1                           $310,000.00

     0523468431   xxxxx, xxxxx xx                  14    13      06/04/04     efg      060418            $127,120.00   cAPITAL MANAGEMENT INC
                                                                             1                           $127,120.00

     0542616443   xxxxx, xxxx xxxxxx               14    13      05/12/01     hij      060418            $200,000.00   fRIENDS CLUB
                                                                             1                           $200,000.00

     0516545461   xxxxx, xxxxxxxx x                205    204    06/03/02     klm      060418            $283,992.00   MICROTECH TECHNOLOGY
     0135554455   xxxxx, xxxxx xx                  115    114    06/04/04              060418            $230,000.00   ABC TEMP PLUS
                                                                             2                           $513,992.00

     0151981313   xxxxxxxx, xxxx xxxxxx            205    204    06/04/05     nop      060418             $80,000.00   INTERNAL REFERRAL
                                                                             1                            $80,000.00

     0111111111   xxxxx, xxxxx                     115    114    06/03/05     qrs      060418             $86,800.00   gMA INC
     0222222222   xxxx, xxxxxxxxxx                 115    114    06/04/03              060418            $156,720.00   INTERNAL
     0333333333   xxxxx, xxxxxx             205    204    06/04/03              060418   $156,720.00 HOME
                                                                             3                           $400,240.00


    TOTAL                                                                    9                        $8,005,672.00
1                         abc351Uab:cod5K-SUM
-
   5a
 INITIAL       COUNT
0  ABC                 1
   EFG                 1
   HIJ                 1
   KLM                 2
   NOP                 1
   QRS                 3


How can I load the above txt file into a table with following schema?

Loan(BorrowerName, Loan#)

All I need is the borrower name which are xxxxx, xxxx and loan numbers.


 

View Replies !
Table Adapter Generates Bad SQL Under Load
I have an application (ASP.NET 2.0/SQL Server 2005) which makes heavy use of table adapters for pulling records from SQL. Under heavy load, we get a lot of SQL Server Timeout errors. We have run a trace on SQL Server and it shows that several of the SQL statements being passed into SQL Server, from the Table Adapters, have bad SQL.

For example, here is the SQL in one of the table adapters

SELECT    HomeMsgID, messageName, messageHTML, messageText, populationID
FROM        MyUCR_HomeMessages
WHERE    (populationID IN
                          (SELECT    populationID
                            FROM          MyUCR_Population_CPID AS
MyUCR_Population_CPID_1
                            WHERE      (CPID = @CPID))) AND (isVisible = 1)
AND (showDate <= @showDate) AND (removeDate >= @removeDate)

I call it with the following:

DateTime showDate = DateTime.Today;
DateTime removeDate = DateTime.Today;

myUCR_HomePageMsgsTableAdapters.MyUCR_HomeMessagesTableAdapter ta = new
myUCR_HomePageMsgsTableAdapters.MyUCR_HomeMessagesTableAdapter();
myUCR_HomePageMsgs.MyUCR_HomeMessagesDataTable dt = new
myUCR_HomePageMsgs.MyUCR_HomeMessagesDataTable();

ta.FillByCPID(dt, showDate, removeDate, CPID);

What the SQL trace shows, when it fails, is this (notice the extra single
quotes around the showDate, removeDate parameters):
E000
exec sp_executesql N'SELECT    HomeMsgID, messageName, messageHTML,
messageText, populationID
FROM        MyUCR_HomeMessages
WHERE    (populationID IN
                          (SELECT    populationID
                            FROM          MyUCR_Population_CPID AS
MyUCR_Population_CPID_1
                            WHERE      (CPID = @CPID))) AND (isVisible = 1)
AND (showDate <= @showDate) AND (removeDate >= @removeDate)',N'@showDate
datetime,@removeDate datetime,@CPID int',@showDate=''2007-02-05
00:00:00:000'',@removeDate=''2007-02-05 00:00:00:000'',@CPID=3071225
1[Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2007'.

I recreated the SQL to use a stored procedure, and got a similar error:

E000exec dbo.spFillHomeMsgByCPID @showDate=''2007-02-05
00:00:00:000'',@removeDate=''2007-02-05 00:00:00:000'',@CPID=3008195
5[Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '2007'.

However, if I create dynamic SQL and use the following, there are no errors.

string mySql = string.Empty;
mySql = "SELECT HomeMsgID, messageName, messageHTML, messageText,
populationID FROM MyUCR_HomeMessages WHERE (populationID IN (SELECT
populationID FROM MyUCR_Population_CPID AS MyUCR_Population_CPID_1  WHERE
(CPID = " + CPID + "))) AND (isVisible = 1) AND (showDate <= '" + showDate +
"') AND (removeDate >= '" + removeDate + "')"; SqlDataAdapter adapter = new
SqlDataAdapter(mySql, ConfigurationManager.ConnectionStrings["MyUCR2007ConnectionString"].ToString());
DataSet RecordCount = new DataSet();
adapter.Fill(RecordCount);
DataTable testDT = RecordCount.Tables[0];

I am using VSTS with the Service Pack installed. SQL 2005 is running on W2K3 Enterprise, fully patchedThanks,James

View Replies !
Table Design & Load Consideration
I m designing a table which will hold about 40 million records.
The data which is going to be inserted into the table is a alphanumeric unique code eg: (CABBXFGRET). Similarly there will be 40M codes, all are indexed starting with character 'C', with the second alphabet used as an index for about 5 million codes each.

Is it advisable to have 1 table and load all the records in it or is it more sensible to split the codes in to various tables based on index.

Eg: All codes starting with 'CA.....' till 'CC.....' in one table. etc.

So that the search logic can be designed based on the index of the code.

Logically considering this is helping us reduce the latency in search due to the heavy volume. But i m concerned that this doesnt follow the rules of normalization.

Any suggestions from the DB gurus out there is very much appeciated.

Thanks
sunil.

View Replies !
Load XML Document Content In Table
I have a table having XML column. I want to read a XML document and insert content of the XML file into this xml column.
CREATE TABLE [XMLTest](
[DataAsXML] [xml] NULL,

[CreatedDate] [datetime] NULL
)

I have tried the following query
declare @filepath varchar(100)

declare @filename varchar(100)

set @filename = 'Referred'

set @filepath = 'D:ReportOutput'+ @FileName +'.xml'

print @filepath

insert into XMLTest

SELECT xCol,getdate()

FROM (SELECT * FROM OPENROWSET

(BULK @filepath,SINGLE_BLOB) AS xCol) AS R(xCol)



Problem is that When I give complete file path for BULK instead of variable name i.e. BULK 'C:Test.xml', query runs fine. But when I try to use @filepath, I get error "Incorrect syntax near '@filepath'." What am I doing incorrect? Also,If some one can suggest a better approach to load content of XML document to table?

Regards

View Replies !
How To Load A Script File Into Table?
Do anyone know of an easy way to load the contents of a SQL script file into a NVARCHAR(MAX) column in a table?

It would be very handy to be able to do this so I can have SQL scripts loaded in a table and then execute them from a job.

Declare @MyScript nvarchar(max)

select @MyScript = MyScript from MyScriptTable where ScriptName = ‘MySQLScript’

execute ( @MyScript )

CODO ERGO SUM

View Replies !
Load Large Dimension Table
I have a customer dimension talble ( 50 million rows) , and the customer data keep changing...
what is the best way to load this diemension table without losing the integrity of data?

I don;t want to load 50 million rows everytime .. and i want to keep the history of changes on customer's record...so a unique key can be represented for a single customer (for example ,even though a customer has changed her last name after got married)
do i have to use the slowly changing dimension type 2 for this? can you show me some examples? HOw can i implement this?

View Replies !
Trying To Return A Single Record For Each Client From Child Table Based Upon A Field Of Date Type In Child Table
I have table "Clients" who have associated records in table "Mailings"
I want to populate a gridview using a single query that grabs all the info I need so that I may utilize the gridview's built in sorting.
I'm trying to return records containing the next upcoming mailing for each client.
 
The closest I can get is below:
I'm using GROUP BY because it allows me to return a single record for each client and the MIN part allows me to return the associated record in the mailings table for each client that contains the next upcoming 'send_date' 
 
SELECT MIN(dbo.tbl_clients.client_last_name) AS exp_last_name, MIN(dbo.tbl_mailings.send_date) AS exp_send_date, MIN(dbo.tbl_mailings.user_id) AS exp_user_id, dbo.tbl_clients.client_id, MIN(dbo.tbl_mailings.mailing_id) AS exp_mailing_idFROM dbo.tbl_clients INNER JOIN
dbo.tbl_mailings ON dbo.tbl_clients.client_id = dbo.tbl_mailings.client_idWHERE (dbo.tbl_mailings.user_id = 1000)GROUP BY dbo.tbl_clients.client_id
The user_id set at 1000 part is what makes it rightly pull in all clients for a particular user. Problem is, by using the GROUP BY statement I'm just getting the lowest 'mailing_id' number and NOT the actual entry associated with mailing item I want to return.  Same goes for the last_name field.   Perhaps I need to have a subquery within my WHERE clause?Or am I barking up the wrong tree entirely..

View Replies !
BCP A Single Table
I've managed to BCP in a single table form a backup DAT file into a database, but it took WAY to long (1 hour+ on a meaty server) and I can't understand why.

The table only had a few rows of data and only had a few small dependancy tables.

The table has a primary key, hence an index so the BCP becomes a logged operation but it still should not take this long.

Here is the BCP command line that I ran :-

bcp <dbname>.dbo.<tablename> in <DAT filename> /U sa /P /S <server> /m 1 /n

Could anyone please shed some light on this. Is there anyway of 'fast' bcp'ing this table into the database overwriting the existing one.

Failing that, is there any way of scripting the transfer of a table from one server to another.

Many thanks.

Dave

View Replies !
SSIS Table Load With Guid Values
I am trying to load a SQL 2005 table that consists of two guid values in two fields. I have a flat file in tab delimited form that has guid values as strings to load into the table. I used a flat file source module in SSIS; which then goes to a Data Conversion module that takes the flat file and does a conversion to type unique indentifier [DT_GUID]; this goes to a OLE DB destination which is a SQL 2005 table that has no records and only those two fields. I get this following primary error:
 
[Data Conversion [498]] Error: Data conversion failed while converting column "Column 0" (373) to column "Copy of Column 0" (511).  The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
 An example of the two values in the .txt flat file source:
84d92cbb-4b4b-435b-8d8a-789ea930283c 328340cd-85fd-4210-8d82-000024093d7c
 Any ideas what may be causing this? This should be pretty straight forward load. But it is guid which seems to always cause cast issues.

View Replies !
SCD Type 2 &"Dimentional Table Load
:) I am trying to update my Dimention table during the load process with Last_Trans_Flag set to 'A' -active or 'I' -inactive. The Last_Trans_Flag for the new record being inserted is set to 'A' and the previous records for the customer are set to 'I'.

During the initial load of the SCD, the first occurrence of each customer will be set an 'I' flag and the most recent
customer with max(effective_date) will be set to 'A' .



I need the query to accomplish this. Thanks!

View Replies !
Why Is DTS Faster Than A Query To Load A Remote Table?
Hello

DTS is notoriously faster than making the following statement:

insert into synonym_MyRemoteTable
select * from myLocalTable

Why is it so?

Thanks a lot.

View Replies !
Using BULK INSERT To Load File To Table
Is that possible to load files (*.bmp, *.jpg etc) to table (field type IMAGE) using BULK INSERT?
Or is it better to do it otherwise?

Thanks

View Replies !
Load The Conditional Split Conditions From A Table
Hi everybody,

 

I want to load the conditions for a conditional split from a table, so that the bussiness logic can be changed with a simple user interface .

 

How can I do this?

 

 

Best regards

 

John

View Replies !
How To Load Fact Table And Dimension Using SSIS?
Hi All,

I am just curious to know how I can load data from a data warehouse to an Analysis Service Cube (both to the fact tables and dimensions).

Does any body have some way to achieve this? 

I appreciate if any body provide me a good material which describe this scenario.

Sincerely,

--Amde

 

 

View Replies !
Performing A Data Load Using A Control Table
Does anyone have an example of performing a source to destination data load with another SQL Select Statement controlling source statement?  What I would like to do is split up a huge data move by performing a loop on the source and modifying the source select "where" clause using values from a control table.  I understand how to modify the source statement by using an expression statement with variables.  Now I'm trying to figure out how to loop through a control table to drive the source task.

Any tips would be greatly appreciated,

Brent

View Replies !
Not Able To Load The Application In Case Web Farm Garden When We Load Data Through Background Thread.
Hi,
 
Here I will describe my problem.
 1. We are loading large amount of data from database on background thread which is starting on Application_start event   in global.aspx.cs file.The data is later cached  for subsquent request to improve the performance.
2. Now when we put the application on web farm garden, it is not able to load the application.
3. We are sending the request the servers through Router kind of application.
4 This application is working fine on single server enviornment.
 
Please help us.
 
Ajay Kumar Dwivedi

View Replies !
Deadlock On Single Table
We have one user who enters a transaction and then does a single rowupdate (updates all columns but only one is changing - this is due tothe way our sql is generated in the application), at this pointanother user enter a transaction and tries to update the same row (heunderstandably has to sit and wait while he is blocked by the originaluser). The original user then updates the same row again – at thispoint the second user is chosen as a deadlock victim and killed. If Itry and recreate this with any other tables(or pubs) I get my expectedbehaviour of the original user just doing 2 successful updates and thesecond user then completing his update once the original user haseither committed his changes or rolled back. The query plan indicatesthat a drop and insert of the row is happening (this is not the casewith any other tables where we get our expected behaviour). This onlyhappens when the index is clustered - if we use a non-clustered indexit does not occur.Is this expected behaviour? it seems dangerous to me as the firstuser has not commited or rolled back his updates. It was onlyhighlighted by a fault in our application that caused the secondupdate to be executed.I have some thoughts about it being something to do with a row lockbeing relased due to a delete / insest of the row in the second update(we see this in the execution plan).....Any help much appreciated as I am struggling to get my head round howthe second user was ever able to get hold of the resource.

View Replies !
Intersection On A Single Table
Hi all !

I have a table with no keys (temp table) which looks like this :
col1|col2|col3
001|A|.087
001|B|.032
001|C|.345
002|A|.324
002|B|.724
003|A|.088
003|C|.899
001|A|.087
001|A|.234
001|B|.032

As you see, there is some duplicate entries in it. I would like to get a list of all the rows that have the same col1 and col2 BUT different col3 value. The result should return col1=001 col2=A but NOT col1=001 col2=B. I tried a lot of queries with EXISTS, HAVING, etc... but nothing seems to work.

Anyone have an idea how I can do it ?

View Replies !
Single Table Restore
Hi!

This morning, I needed to restore 1 table to a database because it had
accidentally been deleted (don't ask). Each time I tried to restore the
single table, I would select TOOLS| DATABASE BACKUP/RESTORE| RESTORE
tab from Enterprise Manager, then I select SINGLE TABLE, but am only
given the existing table names as choices to restore. This happens when
I select to restore 'FROM DEVICE' as well.

Am I doing something wrong or is this how MS SQL6.5 is supposed to
work? Am I only able to restore a corrupt table and not a missing
table? I ended up restoring the entire database...

Thanks for your help!
Toni Eibner

View Replies !
Single Table Restoration
It appears that in SQL 2000 restoring a single table is a bit more tedious and less user friendly as in earlier versions (6.5). Can anyone explain in a nutshell the easiest/quickest way to restore a single table from a backup?

Thanks,

Christine

View Replies !
Backup A Single Table
I have a table with about 5000000 Ml records that I need to copy to other database. What will be the easy way to do it? Can I backup a single table?
Any suggestions!

View Replies !
Restore Single Table
How can I restore just one table from the full backup? It was very easy with 6.5 but I am not sure whether it's possible with 7.0 and if it is possible, how to do it.

Thanks in advance.

View Replies !
How Do I Restore A Single Table???
Does anyone know if I can restore an individual table in SQL 7.0?
I know I can DTS from a copy of the database but how can I restore a table directly from a backup file.

Thanks
Ben

View Replies !
Restoring A Single Table
Hi,
I have an urgent need to restore a single table from a backup file. Please let me know how I can do that. Thanks in advance for your help.

Sravan.

View Replies !
Restore A Single Table
Does anyone know of a way to restore a single table using SQL 7.0? I know that I can build a dummy database and do a database restore, then copy the table from database to database. But....was wondering if there is a way to restore a single table from a backup. Is losing the ability to restore a single table one of the 'features' of 7.0?

View Replies !
Two Different Datasets In A Single Table.
 

Hi,
 
I need to display the datas in a table format. I have placed a table and now i need to use two different datasets for a single table. Those two different datasets are generated based on two different stored procedures. Those stored procedures retrieve data from two different sql tables. Can any one explain me how to use two different datasets for a single table. As far i have tried i was able to fetch only the first record of the other dataset. But i need to fetch all the records of both the dataset. Thanks in advance for any help.
 
Thanks,
Sangeethaa

View Replies !
Need To Restore A Single Table
 Is it possible to restore a single table in SQL.  If so does anyone have any idea how to go about it.  Thanks in advance for the help.

View Replies !
Restore A Single Table
Hi,

I have a problem. For some reason I needed to restore a single (large) table that shares a filegroup with other tables. I have a full backup of the database. How can I restore my particular table?

-- Srinivas

View Replies !
Backing Up A Single Table?
Is there a way to back up one table at a time?

View Replies !
Backup A Single Table ?
Is there a tool out there to backup only one table at time
in SQL Server 2005 ?

View Replies !
Bulk Load XML File To SQL Server (Express) Table
Hi All,I have an asp.net 2.0 app that needs to bulk load data from an xml file into a Sql Server (Express) table. Is there an easy way to do this?Thanks,Claude.

View Replies !
How To Load Periodic SnapShot Fact Table With SSIS
I need help from you data warehouse / SSIS experts out there!  I have a Transaction Fact Table with dollar amounts as the measurements.  The grain is one row per transaction.  I want to roll this up into a Monthly Periodic Snapshot based on 5 keys.  I am having no problem where there is transaction data for each month.

However, the problem I am having is - how do I gracefully insert the Monthly rows for the five keys where there was no activity in the transaction fact table - I am sure there is a slick way to do this with SSIS but I am definitely having a mental block on how to accomplish this.  Any help would be appreciated!

View Replies !
Bulk Load From Text Delimited File To SQL Table
Hi,
 
I am new to SSIS but i have avg working knowledge in sql. 
My problem is as follows ,I have a text pipe dilimited file in some folder and the number of columns and the name of the column is not consistant. It can have N number of column and it can have any column names. I need to load this text file data into a sql table. All that i want is to load this file to SQL Database with some temp name. Once i get the table in SQL Database, i can match the column names of both taget table and this temp table and only push those column which matches with the target table. For this i can frame Dynamic SQL. This part is clear to me.
 
Now the problem is , I developed a SSIS pacakge to push the text file to SQL Table. I am able to do this. But if i change the column names or added new column SSIS is not able to push the new columns. Is this functionality available in SSIS, is it can be dynamic like this?
 
I hope i am clear with my prob... if need any clarification please let me know
 
thanks in advance
 
Mike

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved