Losing Connection Mid-Way Through For-Each Loop

Apr 17, 2008

Hi - I am attempting to run an SSIS package through a SQL Agent job step. The package is fairly basic - I run some Execute SQL tasks, build an ADO recordset, enter into a For-Each loop, and perform some table updates based on the ADO recordset. So far so good. Approximately 1/3 of the records in my For-Each loop are processed, then I get a "Failed to acquire connection error". All I am doing for each iteration of the For-Each loop is updating one record in a table based upon the current value that is being processed from the ADO recordset. I am running the job on a 64-bit box, version 9.00.3050.00. I have also run this on two other 64-bit boxes (versions 9.00.1399.06 and 9.00.1406.00) and had the same issue. The owner of the Agent job is a sysadmin on the box. I don't understand why some items would be processed, then the connection drops mid-way through processing. What's even odder is the connection is dropped at the same point every time I run. The connection that I have defined in my package (I only have one connection defined in my package) is Provider type "Native OLEDBSQL Native Client", and I am using Windows authentication. The version of Visual Studio that I have developed this package in is 8.0.50727.42. Please help.

View 7 Replies


ADVERTISEMENT

IIS Losing Connection To SQL Server 2005

Mar 5, 2008

Hi, I'm working on a project that connects to a database on every view of a site.  It works fine for a few hours but eventually it just stops connecting to the database.  There's nothing in the application logs to suggest where to look, it seems like the connections are just dying. 
I am creating the connection in a pretty normal manner:SqlCommand myAwesomeCommand = new SqlCommand();myAwesomeCommand.Connection = new SqlConnection(myAwesomeConnectionString);myAwesomeCommand.CommandText = myAwesomeSQL;myAwesomeCommand.CommandType = CommandType.Text;  // Otherwise known as awesomeText
myAwesomeCommand.ExecuteScalar();
I also use a SqlDataAdapter and fill it for some of my stuff for grabbing more complex data, but all happy System.Data.SqlClient stuff.
But yeah, the thing seems to just give up after a few hours.  Everything I have read about connection pooling in ADO.Net says that the connections won't be reused.  And yes, I believe I am closing all of my connections after I use them.  The site is getting, oh, 7500 hits an hour maybe?  Somewhere around that, maybe more maybe a little less.
Anyone have any ideas?

View 2 Replies View Related

Application Role Losing Connection?

Sep 6, 2007

Hi,

I'm testing the use of application roles for security. The customer I work for has still a lot of ASP intranet applications running. We're migrating the databases to a SQL Server 2005 server.

I've changed the connection string to a user without any permissions but to log on. After that I use an application role for permission to select different tables and to execute Stored Procedures.

The first queries do execute but after that I get "Permission denied", like I haven't got the application role anymore.

Any ideas?

Adrian

View 6 Replies View Related

Connection Manager Losing Credentials

Sep 11, 2007

On my SSIS package I have 2 connection managers, both are connecting to an Oracle db. I enter in the ID and Password then click 'test connection' I'm able to connect to the database fine. I then go to a data flow of one of my control flow task. Open up my OleDb Source and click preview. The SQL query executes with no issues. I can see the data from my connection manager source.

I then go and run the package and I get this error message:


[OLE DB Source [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "OracleConnection" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

I've been racking my brain on this for a few days and still no luck on getting this to work.

View 8 Replies View Related

SQLExpresss Losing Connection To VB6 Application

Apr 2, 2007

I have a VB6 application that has MSDE as its current backend. In
testing moving to SLSQLExpress I've noticed, since this application is run on laptops, that if I disconnect the network cable while I'm in the VB6 app I lose "connection" to the database. If I end task on the app and restart it it works fine. If I reconnect the network cable while the app is running and then disconnect it the app runs fine. Also this happens when I'm connected to a wireless network and then disconnect and disable that connection.

In my template.ini file I have DISABLENETWORKPROTOCOLS=0. Is there a setting I'm missing? I can't seem to find anything else to set in the ini file.

View 4 Replies View Related

SQL Server Losing Connection When Connection From A Remote Server

Jul 12, 2006

Hi

I have two machines, the one has Windows 2003 server and the other has Windows Xp Pro on.

The 2003 one has SQL Standard Edition 2000 on where as the XP Pro has MSDE 2000.

I'm trying to run a windows based app from the 2003 server and it connects to a database on the XP Pro PC.

When running the application i keep getting the following exception:

"A Transport-Level error has occured when sending the request to the server (Provider: Named Pipes Provider, error: 0 - The specified network name is no longer available)

After using Preformance monitor on the XP machine it seems that when the app starts and the user logins in it make a SQL connection but then the connection is lost then the exception pops up. then i click continue and try it again then it works, then a couple of secs when using the system it pops up again. The Performance Monitor Test shows that the SQL connection keep being lost. The network is fine. its has something to do with SQL and Named Pipes and stuff.



When running the app on the Xp machine and the Connection is made to the 2003 machine there is no problem.

There are other connection made to the Windows XP Machine but i doubt that it affects the app.

The Windows firewall is off as well.

Please can anyone help.



View 4 Replies View Related

Checking Server Connection Before A For Each Loop

Apr 9, 2008

I have a list of servers on a table, I take this list and pass to a for each loop container and that will grab some system information from each server that we give for our internal auditors.

The issue that I'm currently having with this package is that some times, 1 or 2 servers from the list are down and/or extremelly busy and it times out, either case causes the whole package to fail.

What I'm trying to do is, test the connection to the server prior passing the server name to the For Each Loop Container and log that information somewhere (Maybe a boolean field in a table), so then I check after the package finish and validate that the server was actually up or down.

Any ideas or suggestions?

Thanks,
Igor Santos

View 8 Replies View Related

Please Help! Dynamic DB Connection In Foreach Loop

Apr 4, 2006

Hello-

I'm trying to read a table that has database connection information for other DBs and use this within an "Execute SL Task" task. I have seen a number of posts that talk about this possibility, but I have not been able to get it to work yet.

When I've tried to set the connection to a variable (@[User::DB_ConnectionStr]) in the Expressions area of the SQL Task, the Connection type defaults to OLE DB and I can't seem to force it back to ADO or ADO.net.

I've tried doing this with the variable being set to both a connection object and a String with the connection string, but neither seems to work.

Any suggestions? Should this be a string value of the connection string? Am I missing something when trying to set the connection type?



Thanks much!

Tristan

View 3 Replies View Related

Opening And Closing A Connection In A Loop, Should I Or Shouldn't I?

Oct 31, 2006

i have a loop that can run say 30k times.  in there i am using the try / catch / finally blocks to handle ADO.NET Transactions (thanks CADDRE!)Should i open and close the SQL Connection for each record? or open it and close it outside of the loop only once ?thanks in advance, mcm  

View 3 Replies View Related

Script Component In Loop Tries To Evaluate Connection

May 12, 2006

I have a script component which loads a file which is in a custom format. The script component is inside a For Each Loop Container and it uses a flat file connection manager. The loop sets the connection string for the connection manager.

The problem I'm having is that the connection string needs to be set to something every time that I start the package but I don't know ahead of time what file there will be, so I get a System.IO.FileNotFoundException error on the script component. If I manually set the variable for the connection string and point it to a file that exists, then the package runs fine but at the end of the package the connection string is set to the last file loaded and this file will no longer exist the next time the package runs.

I hope this makes sense...

View 1 Replies View Related

Help- Problem With Foreach Loop And Excel Connection Manager

Nov 29, 2006



Hi,

I'm trying to write a package that imports a bunch of Excel files into a sql server table. My import routine works fine when I do not use a foreach loop container. I then add a Foreach Loop Container with a Foreach File Enumerator and create a variable to store all of the excel file names to use with my excel connection manager in the connection string property.



When I run the debugger I get the following error:



TITLE: Package Validation Error

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

Package Validation Error

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

ADDITIONAL INFORMATION:

Error at Import New Data [My Data (Excel) [4234]]: The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.

Error at Import New Data [DTS.Pipeline]: component "My Data (Excel)" (4234) failed validation and returned error code 0xC020801C.

Error at Import New Data [DTS.Pipeline]: One or more component failed validation.

Error at Import New Data: There were errors during task validation.

Error at ImportMyData [Connection manager "Excel Connection Manager"]: An OLE DB error has occurred. Error code: 0x80040E4D.

(Microsoft.DataTransformationServices.VsIntegration)



I've read the varous posts on this forum and others with people having this problem and nothing that was recommended to them works for me. I've also read the Msdn article 'How to:Loop through Excel files and Tables' and followed the directions there without success. I've tried the following with no success:

I've tried to create first a hard coded connection string in the excel conn. manager which works but as soon as I set the experessions: connection string property = my file enumerator variable it breaks.

Turned the Delay Validation to True for the package as well as the task

Set the Connection string equal to not just the variable coming from the file enumerator but to the full connection string : "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::excel_filename] + ";Extended Properties="Excel 8.0;HDR=YES";"

I've also tried to set the excel filepath property instead of the connection string and this didn't work either.



I'm getting really frustrated. Any advice on why something so simple doesn't work for me would be appreciated.

Thanks



Anya

View 3 Replies View Related

Dts Package Foreach Loop Container And Excel Connection Manager

Sep 28, 2006

How can I use a foreach loop container with an Excel connection manager. It is virtually impossible to configure the ConectionString property through expressions builder. Everything works fine with a Flat File connection manager but when it comes to Excel, I get the following error message: Error 1 Validation error. Extract Four: Extract Four [1]: The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. Tarification.dtsx 0 0


Please ! Heeeelp ! tel me how I can loop through Excel files !

View 16 Replies View Related

Receiving Errors When Using Foreach Loop And Excel Connection Manager...

May 25, 2007

Purpose: Need to import excel source data into SQL Server 2005 tables. Excel source data comes in nulitple excel files with the same structure but different data. I would appreciate someone taking a look at the following information and notifying me of what I am doing incorrectly.

I Inserted a foreach loop container, a data flow task located inside the foreach loop contaiiner, an excel and SQL Server 2005 connections.

After trying multiple times I went the following URL and followed step by step direction on how to connect excel workbooks dynamically: http://msdn2.microsoft.com/en-us/library/ms345182.aspx . I also used http://www.sqlstrings.com/ as a reference when creating the connection string.


Creating a Foreach Loop Container:

1. Opened foreach loop container 2.Set the Enumerator to 'Foreach File Enumerator" and configured the enumerator by setting the directory location and file base name to E:ClientsDep CommBEABEA_Test_Source and *PersonnelExpense*.xls respectively. 3. Clicked Variable Mapping; created two variables called, "ExcelFile", and "ExtProperties" and closed out of the foreach loop container.

I. Created Excel Connection:

Created excel connection called, €œDynamic Excel Connection Manager,€? that initially pointed to one of the excel workbooks.
Went to the connection properties by right clicking the connection manager.
Expanded Expressions and clicked the ellipsis button to bring up property expressions
Chose Connection String in the Property.
Clicked the Expression Ellipsis button.
Put the following inside the Expression multi line text box:
A. "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::ExcelFile] + ";Extended Properties="" + @[User::ExtProperties] + """

Clicked the Evaluate Expression button to get the following:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=;Extended Properties=""
Clicked Ok button
Inserted a Data flow task inside the foreach loop container.

II. Configured Tasks that is associated with Dynamic Excel Connection Manager or Package:

Set the Foreach loop container Delay Validation to true.
Set the Data Flow Task Container Delay Validation to true.
Set the Dynamic Excel Connection Manager Delay Validation to true.
Set the SQL Server Connection Manager Delay Validation to true.
Set the Package Delay Validation to true.
Package Locale ID set to English


Ran the package after connecting the excel source data flow to the OLEDB destination and have inserted part of the error in this post. Please see below.

Error: 0xC0202009 at Package, Connection manager "Dynamic Excel Connection Manager": An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Could not find installable ISAM.".

I modified the connection string after receiving the error by removing the extended properties. The following is the modified connection string: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::ExcelFile]

I repeated step I.6 above and received the following expression: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=

I ran the package and received the following error in part: OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unrecognized database format 'E:ClientsDep CommBEABEA_Test_SourcePersonnelExpense_OCCs_051007.xls'."


I did not find anything helpful when I searched for the above errors and would very much appreciate anyone€™s assistance on this issue as this issue needs to be taken care of ASAP.

Does anyone have any ideas as to why I received this error and what can I do to resolve this issue?

Your assistance in this matter is truly appreicated!
Thanks!!
Lee

View 7 Replies View Related

Unable To Retrieve Column Information In Flatfile Connection Within Foreach Loop Container

Jan 11, 2007

Hello, I am getting very frustrated! I have got a Foreach loop container which I am processing files within a folder. I have a flatfile connection manager which I have set up using a test file and have updated the expressions attribute to be the package variable I set up in the collection for the loop container however everytime I run it I get the error: 0xC0202094 cannot retrieve the column information from the flatfile connection manager. I can only guess that it is either the variable being passed to the connection manager or the way I set up the connection manager. When I msgbox the variable in a script component before the dataflow step, the variable for the file seems fine. Any suggestions are REALLY appreciated.

Yours

Jayne

View 2 Replies View Related

Getting Access Denied To FileName Error When Using The Execute Sql Task (With File Connection) Into A Foreach Loop Container.

Jan 18, 2007

Hi ALL,

Getting Access Denied To FileName Error When Using the Execute Sql Task (With File Connection) into a Foreach Loop Container.

Please Note :

I have a folder containing .sql files. I have to dynamically loop through the files and send them as a File connection Folder to the Execute Sql Task.

When I run this Package I am getting the follwoing error :

[Execute SQL Task] Error: An error occurred with the following error message: "Access to the path 'C:ProjectsFuzzy Lookup DataFlow ExampleScripts' is denied.".

Also I have logged in to the machine as Administrator and to Sql Server with sa.

Please help.



Thanks.

Regards,

Salil

View 1 Replies View Related

SQL Server 2008 :: Difference Between FOR LOOP And FOREACH LOOP?

May 28, 2010

difference between FOR LOOP and FOREACH LOOP with example(if possible) in SSIS.

View 4 Replies View Related

Losing It Again - How To Pass Value To Sp?

Mar 15, 2007

I cannot remember how to pass a value to a stored procedure.  I would work this through but I am really running out of time, any help greatly appreciated.  This is my stored procedure and I need to pass CompanyID from the code behind page in for the stored procedure @C_ID value.
PROCEDURE dbo.EditCompanyInfo  @C_ID int, @CS_CompanyName nchar(100), @CS_City nchar(50) AS UPDATE tblCompanyInfo_Submit SET CS_CompanyName = @CS_CompanyName, CS_City = @CS_City  WHERE C_ID = @C_ID RETURN
This is my aspx. page:
 <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server" >    <asp:TextBox ID="TextBox1" runat="server"> </asp:TextBox>    <br />    <asp:TextBox ID="TextBox2" runat="server"> </asp:TextBox>&nbsp;<br />    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />    <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource2" Height="50px"        Width="125px">        <Fields>            <asp:CommandField ShowEditButton="True" ShowInsertButton="True" />        </Fields>    </asp:DetailsView>    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>"        InsertCommand="CompanyInfoSubmit" InsertCommandType="StoredProcedure"  OnInserted="SqlDataSource2_Inserted"        SelectCommand="SELECT CS_CompanyName, CS_City FROM tblCompanyInfo_Submit WHERE C_ID = @CompanyID "        UpdateCommand="EditCompanyInfo" UpdateCommandType="StoredProcedure">        <UpdateParameters>            <asp:Parameter Name="CS_CompanyName" Type="String" />            <asp:Parameter Name="CS_City" Type="String" />        </UpdateParameters>        <InsertParameters>            <asp:Parameter Direction="ReturnValue" Name="ReturnValue" Type="Int32" />            <asp:Parameter Name="CS_CompanyName" Type="String" />            <asp:Parameter Name="CS_City" Type="String" />        </InsertParameters>    </asp:SqlDataSource>    <br /></asp:Content>
CODE BEHIND:
public partial class aaatest : System.Web.UI.Page{    int CompanyID;     protected void Page_Load(object sender, EventArgs e)    {        if (!Page.IsPostBack)        {            DetailsView1.ChangeMode(DetailsViewMode.Insert);            TextBox1.Text = "insert";            TextBox3.Text = Convert.ToString(CompanyID);        }    }    protected void SqlDataSource2_Inserted(object sender, SqlDataSourceStatusEventArgs e)    {        {            foreach (System.Data.SqlClient.SqlParameter param in e.Command.Parameters)            {                string RValue = Server.HtmlEncode(param.Direction.ToString());                if ( RValue == "ReturnValue" && Page.IsPostBack)                {                    TextBox1.Text = Server.HtmlEncode(param.Value.ToString());                    TextBox2.Text = "Return";                    CompanyID = Convert.ToInt16(TextBox1.Text);                    TextBox3.Text = Convert.ToString(CompanyID);                }            }        }    }}
 
 
 

View 1 Replies View Related

Losing AM/PM From Query

Apr 1, 2008

I have a stored procedure and one of the fields in the SELECT is a datetime type. On SELECT I am getting the date and the time but no AM/PM returned. The datetime in the query is returned in this format:
2008-03-21 08:37:20.000
 Any help is appreciated.

View 3 Replies View Related

SQL Losing Data

Jul 23, 2005

We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBClinked tables. I recently created a new set of tables for the app, and usersare complaining that unsaved data is being lost when they move to a newrecord. This seems to be the case when there are multiple users. When thereis a single user using it, we don't seem to have that problem.It seems that we had this problem when we first converted from an MDB backend to a SQL 7 back end, years ago, but we haven't had this problem in awhile. These are the first "entirely new" tables created in several years,and we seem to be having that problem again.Is this something with SQL 7 when it's dealing with new tables? Any ideas onwhat to do?Thanks!Neil

View 32 Replies View Related

Why Do I Keep Losing My Changes (VS2005) ?

Feb 13, 2008

I'm a newbie to both Windows Forms development and SQL Server CE, so please bear with me...

I am developing a vocabulary builder application, and my data keeps reverting to the data set I originally imported. I keep losing the records I've added using the application I'm developing, or from within VS2005. I know about the 'Copy To Output Directory' option in the Solution properties and I set this to 'Do not copy'.

What gives? Not sure what other information you might need, but I suspect it's something really basic...
Thanks!

View 9 Replies View Related

Loop Though Table Using RowID, Not Cursor (was Loop)

Feb 22, 2006

I have a table with RowID(identity). I need to loop though the table using RowID(not using a cursor). Please help me.
Thanks

View 6 Replies View Related

Losing Table Attributes..

Aug 1, 2000

. When I copy tables from one database to another (Using DTS Wizard) I lose my settings .. primary keys + default values !!
Any help would be appreciated..
.
Thanks

View 2 Replies View Related

SQL DSN Losing Default DB Setting?

Mar 19, 2004

This isn't really DB related, except for the connection, but I was wondering if any of you guys had run into this before.

I have a ODBC System DSN Setup for a connection to my MSSQL2K Server. My users will occasionally lose the Default Database setting (Drop-down during DSN Setup), forcing me to go in and reset it. It's getting to be a pain in the ass and I was wonder if any of you guys had run into this before.

Thanks!
Ed

View 1 Replies View Related

Losing Integer Values

Jun 12, 2007

Following on from some problems I have been having with flat files, I seem to be stumbling from one issue to another.

I have coded my text file with some very contrived delimiters to ensure that my real data isn't tripping up the package. I am stripping all line break chars, tabs etc.

Now I seem to get all rows imported, but numerous integer columns within the file are being set to zero.

When I toggle the Keep Null options in the data flow task it will either import the row, but with the zeros, or not import the row at all. I have opened the file in text editors, and Excel and it all seems fine - in fact the same source file works OK with DTS/2000.

At a guess it seems as though these columns are seen as null by the package and so with the option switched on it defaults to zero - but they are most certainly not null in the file!! The table is a staging tabe and so is very basic in structure (no defaults or constraints)

SSIS seems a bit buggy or at the very least over sensitive to me - I am at the point of abandonment of it!!

Please has anyone seen similar issues?

View 6 Replies View Related

SSIS Losing Password

Feb 18, 2008

Hi, i am having a problem when i tried to execute a SSIS package from a job in sql server 2005
First of all, when i create a new connection in the designer, i complete with server, user and password, and test connecion succesfull.
Then, i execute all the package and it works fine.
After building it, i tried tu execute the package using the file that it ve just been created into bin folder, but the connecttions didnt have the tag password, so after user id i add ;password=xxxx in every connection and it works fine. But every time i wantex to execute, i have to write the password.
Also i tried openeing the text file that the DTS created, but when i open it again, the password wasnt there.
Finally, i tried to create a job that execute this file, and i have to write the password as i did when i execute directly from the file, but i couldnt run. It has an authentication problem. If i open again the step configuracion, the password is not there.
The same that happen every time, but now i can run the package

Any idea?

Thanks a lot

View 2 Replies View Related

Losing Double Quotes??

Aug 10, 2007

Hi,

I have written a little bit of VB.NET code that basically takes three strings, transforms them, and returns a single string to be stored in my table.

I am running into a strange problem, however... for some reason, a number of my processed rows are missing a pair of double quotes (").

The vast majority of the records are formatted properly, and have the double quotes in the expected locations.

The most frustrating thing about it is that I have included the offensive input strings in my Test.sql test script, and when I step through the entire routine, the return value is perfect...

i apologize for being the worst ever at posting questions here, please let me know if i can add anything

View 4 Replies View Related

Merge Replication Losing Changes.

Jan 11, 2007

 

Hi,

I am facing a wierd problem while sync'ing. When I am do a synchonize from a mobile device to the server DB, one of my table column fails to update while all other columns get updated.

The table uses row level tracking (tried making it column level too) and the field which fails to update is a date field (Nullable).

This happens in case of syncing after updating >1 records on device. But syncing after updating just 1 record on device, this date field gets updated as expected.

Note: I have filters set for this table. The filter downloads fields only with this date field=null.

I need to downlaod all records meeting this filter condition but at the same time, this filter should not be applied while uploading changes as I think this is what the problem is.

If anyones has faced this and got a solution, please let me know.

Thanks.

 

 

 

View 3 Replies View Related

Databases Losing Permissions

Oct 26, 2007

We have several servers running SQL Server 2005. Each of these were upgraded from SQL Server 2000. Each server has about 50 databases on it. Each database has a table with the same name, containing login information to the database that the table resides in.

We have a VB 6.0 application that allows our Help Desk to do a SELECT on the table that contains login information. All it does is a SELECT; no UPDATEs, DELETEs, INSERTs, or DDL operations are performed by this application. The application logs into the databases using a Security Group login (let's call it MyGroup). Each member of the Help Desk team is a member of MyGroup.

About twice a month, the MyGroup security group loses SELECT permissions on all of the databases on a server. The server affected usually is different each time, but sometimes the same server will be affected two times in a row.

So far, we just run a script to update the SELECT permissions on the table in each of the databases, and this takes care of the problem (for now). But the problem seems to be recurring regularly.

What would make the server lose all permissions for a particular security group? The other logins continue to work fine. Only this one security group seems to be affected.

I just can't figure this one out! Help, please!

Nancy

View 4 Replies View Related

Losing Logins When Restoring Database

Aug 7, 2000

When I a set of databases from backup all login information is lost. The front end of the application provides a way to create new users, but it is a very long process. I am looking for a script or stored procedure that will help attach the users to the database.

View 3 Replies View Related

Restoring Database And Losing Users

Apr 12, 2000

I backed up and restored a database successfully except for the users. The only user that shows is dbo, but I can't add a user with the proper user name from my old server; I get the error that the user or role already exists in the current database.

When I go to role, name of public, there is the user I need to add. I can't remove it as it's a table owner, but I need to add it to the list of users, so I need to remove it then re-add it.

I tried using EXEC sp_changeobjectowner to no avail.

Thanks for any help/guidance.

View 2 Replies View Related

Losing Unique When Exporting To Another Sql Server

May 1, 2007

I have 2 machines, each running the same version of SQL Server. I'm trying to use the dts to export my data from one to the other, and it works fine, except for the fact that I lose my unique index on a field. Is there a way I can keep this from happening, or am I going to have to recreate it each time? I wouldnt think I would have to, seems like bad design to me.

View 1 Replies View Related

Resest ID Column Without Losing Data?

May 17, 2005

Does anyone know how to reset or reorder a primary key id column without losing any data in the table.

at the moment my id's are: -

7
9
19
21

and I want them to be: -

1
2
3
4

View 4 Replies View Related

Losing Record After Synchronizing Subscriptions

Feb 18, 2007

Hi


We got a server running SQL server 2000 SP4 with a database that€™s being replicated
There are 17 subscribers running MSDE SP4 using merge replication. Replication is started manualy

Initially we tested this with two subscriptions an everything went well, but now, since 3 months, we are facing a weird problem while sync'ing. We have massive data loss on records that where inserted at the subscribers. Records seem to disappear, but only record that have a foreign key constraint. What I mean is that for example a record is inserted at the table that holds our client records with primary key €˜ClientID€™ and then a record is inserted in a table with actions for that client with a foreign key €˜ClientID€™ referring to the client table. After sync€™ing that client record is inserted correctly in database on the publisher but the records in the table with actions are gone.

As far as I know the tables are correctly formed with identity set not for replication and so on.
Shortly, I can€™t find any problem, a specially when it doesn€™t happen always.


If anyones has faced this and got a solution, please let me know.
Thanks.

Raf


View 3 Replies View Related







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