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.





Use Variables As A Storage [read/write] ?


Hello Guys,
in SSIS I want to get a set of data and do some modifications on it before I insert it into the destinatipn. So far so good. Some of the modifications will include comparisions between two columns and if certain field is NULL then I want to get the value from the other one I was comparing to. When using conditional splits, I only get the rows to be redirected so that I can do whatever next. However, I want like use the variables as a storage so that I can put the value of one of the two columns in this variable which will be actually loaded into the destination finally. Any help?
Thanks




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Read/Write For Variables
Hi,
 
I am using a Script Component and I have a Read/Write Variable varStatusCase (as assigned in the Custom Properties of my Script Component). I used this inside my script to get a specific value. However, when I ran it I get this error:
 
The collection of variables locked for read and write access is not available outside of PostExecute.
 
How do I repair this?
 
Thanks,
 
cherriesh

View Replies !   View Related
How To Read/write Global Package Variables In An Active X Script?
Is this possible.  How can one do it?   Thanks for any info you have.

View Replies !   View Related
HowTo: Read/write Package Level Variables In Custom Task
Hello all,

I have been struggling trying to read and/or write package level variables from within my custom task.  I'd like to be able to get and set values from within the Execute method of my custom task.  I have searched this forum and the books online and can't seem to find the answer.  I thought maybe I could use an expression on my task (mapping the package variable to a custom task public property) but that doesn't seem to be working for me.  I also would have thought I could use the VariableDispenser object from within my task but the collection is empty.  I have 3 package level variables configured and can't seem to find a way to access them (with intentions of getting/setting).  Could someone point me to a good doc or provide an example that may accomplish this?  Thanks!

(I'm using package level variables as a means of passing simple information between tasks that are not using a DB, if there is a better way I'm open to suggestions.)

Jay_G

View Replies !   View Related
Reset Database Files From Read-only To Read-write
I have two database files, one .mdf and one .ndf.  The creator of these files has marked them readonly.  I want to "attach" these files to a new database, but cannot do so because they are read-only.  I get this message:
 
Server: Msg 3415, Level 16, State 2, Line 1
Database 'TestSprintLD2' is read-only or has read-only files and must be made writable before it can be upgraded.

What command(s) are needed to make these files read_write?
 
thanks

View Replies !   View Related
Storage Location For A Configuration File For Global Variables In DTS
Hello,

We have an existing OLD System in SQL Server 2000 DTS Packages.
The Whole application runs on DTS.
There are several Packages which are called from a Master Package. Each Child packages have their own Global Variables. Most of them are the File Location variables to have the Source Location of the Input Data, mainly from the Excel Files.
Now, even if the Global Variables are there to change whenever they want to change the Locations of the Files, they have to goto each child package and change the variable themselves.
To resolve this issue, they want a configuration File (INI) / Table which would store those Variables. My thought is to read from that File/Table and Update all the packages' global variables through an ActiveX Script as the First Step of the Master package. That would eliminate the need of changing anything in the existing System.
But the Problem is the management (PM / DBAs / Team members) have different views to store the Configuration data.
1. Some wants it into a Different Database, having one table for this application so in future they can also add another table for some other application.
2. Some wants to store it in a Table in the Same Database of this Application.
3. Some wants to save it as a INI file.

As i'm the one who's going to really implement it, they have asked me to research for a best solution out there.

so I request to help me to decide which is a good solution and why.

Best Regards,
Deepak

View Replies !   View Related
XML Read And Write
Pls help guys

I need to know whether its possible to read or write in to XML documents from SQLServer directly using stored procedures.

I basically need to created a number of XML documents on a nightly basis.,..........also i need to read a no of XML docs to SQLServer...

Is it wise to use stored procedures for this?
Or are there performance issues.........and do u suggest doing in in .NET


Your comments are appreciated..

Regards

Benny

View Replies !   View Related
Different Cpu Read Write
 

I have a query that runs for 10 sec on one database( A) and 5 min on another database(B) even though two database have identical scheam, tables, index and statistics..
 
 
I ran a profiler and got the below information
                    CPU    READ   Write
Database A: 92051   711956    8774
Database B: 91812   7621589   315822
 
 
A query runs on database has a significant larger read and write.. I don;t understand why this is happening? even though these two database have the same structure?? it has the same execution plan as well..
 
 
How can i solve this issue?

View Replies !   View Related
Read And Write Access
My database is uploaded at my host, but when im trying to create an account i get partly this message.
Im sure its an easy thing to do, if i know how, to permit user to create an account.
How do i configure the database to "read and write access"???
 
Rolf

View Replies !   View Related
Write In And Read From My_File.txt
Hi ..
I want to Write in files or read from files
for example i have My_File.txt . i need a syntax and i want to call this syntax in my Store procedure and this syntax write forexample " Hello Word " in My_File.txt .
and i want another syntax that read from My_File.txt forexample "Word" from My_File.txt . what are those syntaxes do that ??

thanks

View Replies !   View Related
Read/Write To Same Table
Hi, we're trying to read from a table and write back to the same table and are having a lot of trouble with blocking. What could we do to prevent our application from hanging due to blocking of this type?

View Replies !   View Related
Read/Write Performance
Hello,

We currently run sql 2005 server and also sql express in our dev environments. We use sql express as an offline store (smart client). We have a similar/exact schema on the sql 2005 server and also the express.

We use the auto attach feature to connect to the express version of the database. Both the developer machines and the one that is running the sql 2005 server have exactly the same hardware configuration. The only difference may be that the server box is not running the VS.Net environment. The disk space etc is pretty much the same. Actually we run another database server(DB2) on the 2005 server machine.

We have observed that sql express is much slower and queries execute much slower aswell. For example, this may not be a totally scientific way of checking but a long running query on the server took only 2 minutes while on express it took longer than 9 minutes. The schema and data etc are the same.

Is there something we need to look into as far as read write speed/performance goes ?

TIA,

Avinash

View Replies !   View Related
Read And Write A Constraint Or Default Value
Okay, maybe I'm getting ahead of myself.
Using SQL Server Express, VWD and .net 2.0 I've figured out how to drop a Table Column Constraint or Default Value/Binding and then Create it again using a stored procedure. What I can't figure out is how to retrieve that column's constraint value and write it to, say a label, in an aspx page, simply for reference. Is it possible? In this case the Data Type of the column is money.
I'm using it to perform a calculation to a column with a value that the user inserts into another column. (Column1(user input) minus Column2(with Default Value) = Column3(Difference). I just want to read Column2's Default Value for reference so I know whether to change it or not.

View Replies !   View Related
Implementing Read-write Locks
Hi,I would like to use database locking mechanism to control access to anexternal resource (like file system).What I need is1. an exclusive (write) lock conflicting with any access to theresource (both for read and write)2. non-exlusive (read) lock conflicting with writes onlyHow this could be done?I'd appreciate any reply.Vadim

View Replies !   View Related
Implementing Read-write Locks
Hi,
I woild like to use database locking mechanisms in order to control access to an external resource (like file system).
What I need is
1. an exclusive (write) lock conflicting with any access to the resource (both for read and write)
2. non-exlusive (read) lock conflicting with writes only
How this could be done?
I'd appreciate any reply.
Vadim

View Replies !   View Related
Read / Write Into .doc From SQL Stored Procedure
                  I need to create a flat file as word document, may i know how to write text from stored procedure if a file is already exist then the text will append, how to do it ?

 

                        Thank you.

View Replies !   View Related
Password To Read/write My Query
I use excel as an interface to write query to retrieve data from a database in network drive.  My problem is everyone can open and edit my query. Of course, the univeral database access user name and password will ask but everyone know this.
 How can I put password to prevent any query modification?
 
Thanks
Daniel
 

View Replies !   View Related
Read/Write Operation On SQLCE 3.0 Using VC++
Dear All,
 
I am looking for a sample code to do read/write operation on SQLCE 3.0 using VC++. For SQLCE 2.0 I have used ATL Consumer template and works well.
 
Thanks in Advance.
 
Param

View Replies !   View Related
Last Read/write Time Of Table
Is there a way to get the last read/write time of a table?

I want to have a few tables, but only allow them to exist if they have been used in the last 30 days. I want to set up a "purge" job to clear out any tables that have not been used in 30 days.

View Replies !   View Related
Denormalization, 2 Databases , 1 Read 1 Write Db
Hi,
I was reading that many of these high traffic websites actually have 2 databases, 1 database is used ONLY for reads, while the other is for writes.

How does one go about creating such a setup? How does the database where writes are allowed replicated the data to the read only database server?

View Replies !   View Related
Looking For A Db Schema Read/write/synch Tool
Hello,I'm relatively new to the database world so please forgive me inadvance for my ignorance. I have recently been tasked at my job withfinding a tool that will perform the following tasks: 1) extractschemas from a db, 2) produce a difference report between schemas fromtwo databases, and 3) synchronize two schemas. The purpose is forproduct upgrades during which an existing database schema will need tobe synchronized with a baseline schema.The tool must support the following database vendors (versions givenin parenthesis): Oracle (8i/9i), Sybase (12.x), Informix (9.x), MSS2000, and IBM DB2 (7/8).I have spent the last several days downloading and researching avariety of tools such as Aqua Data Studio, DbVisualizer, DBExplorer,DBDiff, and AdeptSQL. I thought it would be a good idea to post amessage to a few database newsgroups and ask for any recommendationsdatabase developers may have.So if anyone has any recommendations on such a tool or softwarepackage, I would greatly appreciate any information.Thanks!Chad Smith

View Replies !   View Related
Stored Procedure To Read And Write Between XML And SQLServer
Hi All,
I need some help from you experts.

I need to develop something that reads from xml files and writes in to sqlserver, also it should read from SQLServer and writes to xml.

I should be able to give this as a job to exectue daily ,etc.

Can we do this using stored procedures in SQLServer.
Pls paste some sample code, if any or direct me to any url with better info.

Thanks in advance

View Replies !   View Related
Attempted To Read Or Write Protected Memory
One of the packages we've created a while ago is now, suddenly, giving us a strange error:

View Replies !   View Related
Attempt To Read Or Write Protected Memory
 

Hi All,
 
I am getting "Attempt to read or write protected memory" when i browse my cube.
 
Can any one help on this?
 
Thanks in advance,
Anand Rajagopal
 

View Replies !   View Related
Read Write Image Data With Sqlceserver
I was wondering if it is possible to read image data from a database in .net compact framework. Since cf does not have image.fromstream(memstream) to work with, I don't know how else to read the image from the database and then place it into a picturebox.

Here is the code I have been trying out:

Dim Img As Image
        '
        Dim conn As New SqlCeConnection("Data Source = My Documents est2.sdf")

      
        conn.Open()
       
        Dim sql As String = "SELECT * FROM Dater"
        Dim cmd As New SqlCeCommand(sql, conn)
        Dim reader As SqlCeDataReader = _
          cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
    
        While reader.Read()
          
            TextBox1.Text = reader.Item("name")
            Dim b(reader.GetBytes(1, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte

            reader.GetBytes(1, 0, b, 0, b.Length)
            Dim ms As New System.IO.MemoryStream(b)
            Dim bmp As New Bitmap(ms) <-Error: Value does not fall within expected range
            Img = bmp
        
        End While
     
        PictureBox2.Image = Img



I get an error ,Value does not fall within expected range.

Does this mean the image was not save correctly in the database?

Thanks for any help

View Replies !   View Related
Copy Of Standby/readonly DB Into A Read/write DB
Any idea to copy a standby/readonly database.  We a have a standby/readonly DB from logshipping for hot standby and we would like to make a copy of this standby/readonly DB into a read/write DB in the same server for daily testing.  Thanks in advance!

View Replies !   View Related
Does Cursor Convert Table To Read/write?
Hello,

Any help here much appreciated.

I am using sql server 2000 to perform address cleansing. there is a point in my scripting when a table i pass values to becomes read/write.

i suspect this is when i run a cursor through the table.

Is anyone able to confirm for me whether running a cursor changes a table's properties?

Many thanks.

Tim

Ps as the table seems to be read/write it is harder to tell if NULLs are in the table and this is messing with joins I have further down the track.

View Replies !   View Related
Read Write Same Variable In Script Task
I want to write a variable say testVar in PostExecute of my script. I also want to read the same variable at the start of my script block.

How to specify this variable in the script transformation editor

ReadOnlyVariables = ????
WriteOnlyVariables = ???

If i just define

WriteOnlyVariables = testVar

will it work . I mean i cannot use testVar in both read & write


Any suggestions...


Thanks

View Replies !   View Related
Data Read / Write Problem With Concurrent Users On With Dll
Hi,I have a web app, that runs fine, except for one particular section that uses a class called by an event in the code behind. The class resides as a dll in the bin folder. We had no problems during testing, when only one user was running this dll. Problems soon occurred when multiple users tried running it. Here's the error & stack: 06/02/2007 09:25:26 ==> cburns ==> There is already an open DataReader associated with this Command which must be closed first.   at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command)   at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader()   at ESP.Validator.Data.DatabaseEvents.DatabaseEventManager.Read(IEventable eventObject, Int16 eventType, DateTime earliestDate, DateTime latestDate) in C:My PathValidatorValidator.NETDataDatabaseEventsDatabaseEventManager.cs:line 92   at ESP.Validator.Data.Translink.CATCard.GetDespatchDate() in C:My PathProjectsValidatorValidator.NETDataTranslinkCATCard.cs:line 94   at ESP.Validator.Data.Translink.ExistingSchemeEntitlement.ReadCards() in C:My PathProjectsValidatorValidator.NETDataTranslinkExistingSchemeEntitlement.cs:line 215   at ESP.Validator.Data.Translink.ExistingSchemeEntitlement.Read() in C:My PathProjectsValidatorValidator.NETDataTranslinkExistingSchemeEntitlement.cs:line 147   at ESP.Validator.Data.Translink.TranslinkApplicant.ReadEntitlements() in C:My PathProjectsValidatorValidator.NETDataTranslinkTranslinkApplicant.cs:line 369   at ESP.Validator.Data.Translink.TranslinkApplicant.Read() in C:My PathProjectsValidatorValidator.NETDataTranslinkTranslinkApplicant.cs:line 353   at ESP.Validator.Data.Translink.PrePrintedLetter.Read() in C:My PathProjectsValidatorValidator.NETDataTranslinkPrePrintedLetter.cs:line 282   at ESP.Validator.ValidationProcessor.Read(ValidationSubject subject) in C:My PathProjectsValidatorValidator.NETValidationProcessor.cs:line 82   at clear_applications_scan_applications.ProcessValidation() It seems the data reader is getting reused. We have ensured after each read the reader is closed. Though all users are using the same connection string. Could it be a connection pool problem, with the connection being overwritten during execution? Should i edit it according to the users logon?I am really at a loss for ideas, and I don't mind admitting I am a bit out of my depth with this one!! Any ideas/suggestions would be greatly appreciated. Thanks 

View Replies !   View Related
How To Encrypt And Decypt As A IUSR With Read And Write Only Rights
How to decrypt or encrypt without making user a db_owner. It is for a web
application and I do not want make the web user a db_owner. Is there a
way to make this work without making the user a db_owner. Currently the
user is a db_datareader and db_datawriter.

I created an asymmetric key
for encryption by password. I am not using a master key because I want
to keep the password seperately on the web server, so a hacker cannot
get access to both if database gets hacked.

These are the steps I took when I logged in to SQL server management studio using windows authentication:

CREATE ASYMMETRIC KEY ccnumber WITH ALGORITHM = RSA_512
ENCRYPTION BY PASSWORD = 'password';

INSERT INTO Payments (CreditCardNumber,enc_CreditCardNumber)
values( '458724124',
EncryptByAsymKey(AsymKey_ID('ccnumber'), '458724124') )

SELECT CONVERT(varchar(50), DecryptByAsymKey( AsymKey_Id('ccnumber'), enc_CreditCardNumber, N'password' ))
AS Creditcardnumber , Creditcardnumber
FROM payments where Creditcardnumber = '458724124'

When
I use the above select statement it works if I make the user a db_owner
but I get null if the user is just db_reader and db_writer.

Is there a way to do encryption without making the user a db_owner?

View Replies !   View Related
Error - Attempted To Read Or Write Protected Memory
Hi,
 
I am back with one more problem..
 
I have created few reports using SSRS 2005. I am using Oracle database in Data Source to fetch my data. It is working fine and showing me report correctly. But after running the report 8 to 10 times, it starts giving me Memory error. To get rid of that, I need to recycle (stop-start) ReportingService from IIS.
 
I am exactly getting following error...
 
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 
I am not getting the actual problem, why is it giving memory error only after running few times? Please let me know if anyone facing same problem or knowing the solution for the problem.
 
Thanks,
HMaheta
 
 

View Replies !   View Related
How To Read A Set Of Rows Into Session Variables? C#
Hello ASP.NET C# and SQL gurus
 I want to read the results of a set of rows into session variables -- how is it possible?
 Let me try explain.  I have a query which returns multiple rows, e.g. the following query
SELECT PROFILE_ID, PROFILE_NAME FROM USER_PROFILES returns 5 rows i.e 5 sets of profile_ids and profile_names.
 Now, I want to capture these and store them in session variables thus.
Session["PROFILEID_1"] =
Session["PROFILEID_2"] =
Session["PROFILEID_3"] =
Session["PROFILEID_4"] =
Session["PROFILEID_5"] =
Session["PROFILENAME_1"] =
Session["PROFILENAME_2"] =
Session["PROFILENAME_3"] =
Session["PROFILENAME_4"] =
Session["PROFILENAME_5"] =
 
Thanks in advance!
Fouwaaz

View Replies !   View Related
Is Ssis The Only Technology That Can Read/write Raw Data Type Files?
I'm contemplating a sql server archive strategy that rolls really old data off any sort of dbms and onto low cost media like dvds in a non relational archive format.  I dont want to ever worry about these archives spanning different versions of sql when i go to retrieve a range of data that happens to span sql versions (eg one disc was sourced from 2005 another by 2008 but my report needs a union of both). 
 
So I'm thinking about neutral/efficient formats for these archives and a live homegrown catalog that can determine exactly what disc(s) need to be mounted based on passed from and to date parameters...all so that the data that might span discs (and versions and maybe even schemas) can be merged and loaded into my sql version d'jour's "throw away" archive database for a one time report or other unplanned activity.
 
I remember raw data types being very convenient as an ETL format for our customers who have ssis, but wouldn't want our sqlexpress customers to be left without the archiving capability.  Do the "things" that read and write raw data files really originate in some special T-SQL command that all sql editions can use, or is it strictly an ssis thing?    

View Replies !   View Related
Foreach Loop Read Table Data And Write To File
Hi,
 
I want to do the following with a ssis package:
 
INPUT:
A table contains 2 columns with data i need. column A=Filename and column B=FileContent
 
PROCESS:
I need to loop through ea record in the table and retrieve columns A and B. Then for ea column i need to write the Content hold in column B into File hold in column A.
 
I so far found out, that i need a Execute SQL Task in Control Flow querying the table and get columns A and B into 2 variables, plus a 3rd var holding the object. Then the output goes into a Foreach Loop Container. From this point i don't know how to continue. I tried to put a Data Flow Task inside the Foreach Loop, but couldn't find out how i now get the 2 variables to the Data Flow Task and use them to for the file to be written and the content to be placed in the file.
 
Is there any example similiar to that so i could learn how to start on that?
 
Thanks
Danny

View Replies !   View Related
' Attempted To Read Or Write Protected Memory' While Generating A Snapshot
Hi all,

The shotshot agent is generating a snapshot, I got the error ' Attempted to read or write protected memory. This is often an indication that other memory is corrupt'.   Then, the agent failed.   I tried to restart the agent and generate a snapshot again.  This time, it run normally.   So far, I got this error twice since the replication launched.   Kindly advise.  Thanks a lot.

View Replies !   View Related
SqlDataSource + GridView - Scalar Variables Not Being Read
Hi all, first post, and I am desperate.
I have a SqlDataSource with a Select, Update and Delete command. From what I understand, scalar variables should be read automatically from the GridView's BoundField columns when it executes a command on it. Here is my code:
 
<asp:GridView
ID="teamGrid"
EmptyDataText="n/a"
DataKeyNames="TeamId"
AutoGenerateColumns="false"
DataSourceID="teamSource"
OnRowEditing="validateEdit"
OnRowDeleting="validateDelete"
runat="server">
 
<Columns>
<asp:CheckBoxField DataField="TeamApproved" HeaderText="Approved" />
<asp:BoundField DataField="TeamName" HeaderText="Team Name" />
<asp:TemplateField HeaderText="City">
<ItemTemplate>
<asp:Label runat="server"><%# Eval("City") %></asp:Label>, <asp:Label runat="server"><%# Eval("ProvinceCode") %></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="RequestedDivision" HeaderText="Division Req." ControlStyle-Width="60px" />
<asp:BoundField DataField="DivisionCode" HeaderText="Assigned Division" ControlStyle-Width="60px" ConvertEmptyStringToNull="true" NullDisplayText="n/a" />
<asp:BoundField DataField="DivisionNumber" HeaderText="Division Number" ControlStyle-Width="60px" ConvertEmptyStringToNull="true" NullDisplayText="n/a" />
<asp:BoundField DataField="Password" HeaderText="Password" ConvertEmptyStringToNull="true" NullDisplayText="n/a" />
<asp:CheckBoxField DataField="Paid" HeaderText="Paid" />
<asp:HyperLinkField Text="view players" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center" DataNavigateUrlFields="TeamId" DataNavigateUrlFormatString="viewTeamPlayers.aspx?teamId={0}" ShowHeader="false" />
<asp:CommandField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30px" ButtonType="Link" EditText="edit" ShowEditButton="true" ShowHeader="false" />
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30px">
<ItemTemplate>
<asp:LinkButton runat="server" CausesValidation="False" CommandName="Delete" OnClientClick='return confirm("Deleting this team will also delete the players. Are you sure you wish to continue?");' Text="delete" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource
ID="teamSource"
ConnectionString="<%$ ConnectionStrings:MB %>"
SelectCommand="SELECT TeamId, TeamName, ProvinceCode, City, DivisionCode, DivisionNumber, TeamApproved, RequestedDivision, Paid, Password, CaptainId, Player2Id, Player3Id, Player4Id FROM [Team]"
UpdateCommand="UPDATE [Team] SET TeamName = @TeamName, DivisionCode = @DivisionCode, DivisionNumber = @DivisionNumber, TeamApproved = @TeamApproved, Paid = @Paid, Password = @Password WHERE TeamId = @TeamId"
runat="server" />
</form>
 
I apologize for the way the code is put in, the code thing cut off a lot of the text! The problem I'm getting is, when the 'Update' button is hit, I get the error: Must declare the variable '@TeamId'.
 
I've tried putting "Update Parameters", that takes away the error, but the row does not update. I've browsed the internet and saw the same problems in lots of areas, but either a) none of the solutions work for me, or b) they don't really apply to my case.
 I'm using ASP .NET 2.0, and (obviously) C#. SQL Server database.
 Any help is greatly appreciated. Thanks in advance,
 
- Branden

View Replies !   View Related
Read Only Variables Disappear For Config File
I might be wrong but concept of read-only variable is that in your code you can instantiate it but never change it.

However - if you make a variable read-only - they disappear from the configuration wizard variables list.

Isnt the purpose of .config file to instantiate variables?

View Replies !   View Related
Read All Variables In A Script Task W/o Enumerating Them
I'm having trouble with my configurations. All of my configurations are targeting variables and the various properties are all set to expressions containing the targeted variables. I would like (during debugging) to dump out all of the variables.
 
Is there a way to access all variables from a script task? It looks like you have to enumerate the variables you want in the ReadOnlyVariables or ReadWriteVariables properties. I'd rather not miss one by forgetting to list it.
 

View Replies !   View Related
What Permission I Need To Grant To A User If He Need To Read Or Write A Link Server Tables
hello,

 

What role or system privilege do I need to grant to a user if he need to read  the data from a table which is in a link server object? where I can find the document about these commands.

 

Thanks

View Replies !   View Related
Access Read Only Variables In Script Component In A Dataflow
I have a set of comma separated variables in a Script Component list. I want to access them in Script code and use them to build string in the code.

View Replies !   View Related
Read Of Flat File, Some Data On 1st Row Should Be Stored In Variables
I'm reading a Flat File.
The 1ste record containts special Info that is needed for first preparing the database on a buld insert of the remaining lines.
 
How could i realize this, just read 1 line, store some of that data into variables, execute some proc's and then read the rest of the file ?
 
Kind Regards.

View Replies !   View Related
Concurrency Issue On A Single Database User For An Online Read/write Application
Hi to all DBAs,

I would like to ask if there will be a write and concurrency issue if i would create an online application with just one user connecting to the database, just like most open source php/mysql that can be downloaded

i.e
Setup 1. I will grant a single user that will connect to a database and will be set to a config.inc.php file and then create a table users (userid, username, password) and this table will be used for the application authentication and access control.

Setup 2. or is it much better to grant users that will connect to the database and have the table users for access control of the application?

to further illustrate my query:

Setup 1 would be:
###################Table: Users
user a@ipadd --> db1 --> userid mary --> myOnlineApp
user a@ipadd --> db1 --> userid john --> myOnlineApp
user a@ipadd --> db1 --> userid paul --> myOnlineApp


and Setup 2 would be:
#####################Table: Users
user mary@ipadd --> db1 --> userid mary --> myOnlineApp
user john@ipadd --> db1 --> userid john --> myOnlineApp
user paul@ipadd --> db1 --> userid paul --> myOnlineApp

will Setup 1 be enough if I will use SQL Server as database?

or Setup 2 is better user/database architecture?

This application will be online enrollment for a school with 16,000 students

very much appreciated for the feedbacks and suggestions

^_^x

View Replies !   View Related
Error While Trying To Assign A Value To A Read Write Variable In SSIS Package Script Component
Hi,

       I am trying to develop a SSIS package which will read the records from the flat file and insert them into a destination table. I have some validations written in script component. I have declared two Read Write variables with package level scope. when i try to assign a value to the variable in the script component and run the package, the package throws me an error "The collection of variables locked for read and write access is not available outside of PostExecute".

 

What should be done to over come the problem please help me on this regard 

 

Thanks

Madhavan.M

View Replies !   View Related
Script Component As Source: The Collection Of Variables Locked For Read Access Is Not Available At This Point.
Hello, I am trying to configure a Script Component as a data source.  Although this should be a simple exercise, I am running into a problem. 
 
My control flow contains a Foreach Loop with a file iterator.  The Directory Expression of the Foreach Loop Editor is supplied by an expression mapped to a package level variable called inputdirectory.  The FileNameRetrieval Expression is mapped to a package scoped variable called filename.
 
My data flow is encapsulated by the Foreach Loop, and contains a Script Component as Source for the Data Flow Source, and a Flat File for the Data Flow Destination.  The contents of the Script Designer are as follows:
 



Code Block
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports System.IO
Public Class ScriptMain

Inherits UserComponent
Dim thisFileDate As Date
Dim thisFileName As String
Dim thisFilePath As String
Public Overrides Sub CreateNewOutputRows()

thisFileName = ReadOnlyVariables("filename").Value.ToString()
thisFilePath = ReadOnlyVariables("inputdirectory").Value.ToString()
thisFileDate = File.GetCreationTime(thisFilePath & "" & thisFileName)
FileSpecBuffer.AddRow()
FileSpecBuffer.FileName = thisFileName
FileSpecBuffer.FullPath = thisFilePath & "" & thisFileName
FileSpecBuffer.CreateDate = thisFileDate
End Sub
End Class
 
 




When I debug the package, I get the following error:
 
The collection of variables locked for read access is not available at this point.

at Microsoft.SqlServer.Dts.Pipeline.ScriptComponent.get_ReadOnlyVariables()

at ScriptComponent_67311120e6eb4162a3ea1f70847f04de.ScriptMain.CreateNewOutputRows()

at ScriptComponent_67311120e6eb4162a3ea1f70847f04de.UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers)

at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
 
My googlefu fails me at reconciling this.  I have read various posts about changing the line ReadOnlyVariables("filename").Value to ReadWriteVariables("filename").Value, and handling the buffer assignment in PostExecute.  The problem is that all examples shown are either for Script Component as Destination or Script Component as Transformation.  I have tried playing with the Custom Properties in the Script Commponent set the ReadOnlyVariables and ReadWriteVariables, using a PreExecute method, a PostExecute method, all with different errors returning.  I'm at a loss here.  Could anybody provide me with a simple working example so that I can correctly populate my output buffer in the context of Script Component as Source?

 
I fully understand that I could just run a Script Task Using System.IO.Directory, and System.IO.File, but I really want to make this package work in the manner I've described.  Any help would be appreciated.
 
Thanks,
 
John T

View Replies !   View Related
&&"Attempted To Read Or Write Protected Memory Error&&" In SSIS
I'm trying to import data from a Sybase ASE 12.0 database called "OurTestDatabase" into MS SQL Server 2005. I started SSIS Wizard and indicated "Sybase ASE OLEDB Provider" as a source and SQL Native Client as the target. I'm gettign the following error message:

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

Cannot get supported data types from the database connection

"Provider=Sybase.ASEOLDEDBProvider;Password=;Persist Security Info=True;User ID=sa;Data Source=sybase;Initial Catalog=OurTestDatabase"

Additional information

|_ Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (System.Data)

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

The same data source worked with DTS when we thought we'd convert to MS SQL Server 2000. Is this a bug in SSIS? What can be done? Using ".Net Framework Provider for ODBC" is not a good option because this doesn't allow me to choose any tables from the Sybase source.

Any help is greatly appreciated.

View Replies !   View Related
Attempted To Read Or Write Protected Memory. This Is Often An Indication That Other Memory Is Corrupt. (Microsoft Visual Studio)
Hello. I have received the follwoing error upon an attempt to Browse the Cube. All other tabs are functional, including the Calculations tab. We are running Windows Server 2003 SP2 and SQL Server 2005 SP2. Any suggestions would be greatly appreciated!

**EDIT** - Have confirmed SP1 for VS2005 is installed both locally and on server, also.


Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Microsoft Visual Studio)

------------------------------
Program Location:

   at Microsoft.Office.Interop.Owc11.PivotView.get_FieldSets()
   at Microsoft.AnalysisServices.Controls.PivotTableFontAdjustor.TransformFonts(Font font)
   at Microsoft.AnalysisServices.Browse.CubeBrowser.UpdatePivotTable(Boolean translate)
   at Microsoft.AnalysisServices.Browse.CubeBrowser.UpdateAll(Boolean translate)
   at Microsoft.AnalysisServices.Browse.CubeBrowser.InitialUpdate()
   at Microsoft.AnalysisServices.Browse.CubeBrowser.SupportFunctionWhichCanFail(FunctionWhichCanFail function)

View Replies !   View Related
Can't Install IBM Tivoli Storage Manager Server On Windows 2003 X64 Storage Server, How Can I Fix The Pkg?
I am a Windows developer for the IBM Tivoli Storage Manager Server (TSMS) product.
Our product installation is built with InstallShield and uses the Windows Installer.
 
On a new installation of Windows 2003 x64 Storage Server R2, at a customer's site, the TSMS product fails to install.
The install of the OS has version 3.01.400.3959 of the Windows Installer and I see no newer version that installs.
 
Part of our product is 32 bit (console) and another part is x64 (server).
When installing I can see that the install's default is being redirected/reset to C:Program Files (x86)TivoliTSM after it is explicitly set by a custom action to ..Program Files.. . I further observe that our custom actions to write 64 bit registry entries are being refused.
 
    REGSAM samMask = KEY_ALL_ACCESS;
    if ( regIsWow64Process () ) samMask = samMask | KEY_WOW64_64KEY;
    lStatus = RegCreateKeyEx( hLocalConnectKeyRoot,
                              szSubkey,
                              0L,
                              NULL,
                              REG_OPTION_NON_VOLATILE,
                              samMask,
                              NULL,
                              hKey,
                              &dw ) ;
The above fails to create the key.
 
We have tried four versions of our TSMS spanning many changes but the install acts the same.
This does not happen on any other Windows OS we test on but we do not test on Windows 2003 Storage Server R2 being that it is an OEM product. We did test on Windows server 2003 R2 x64 and do not see this problem.
 
Do you have any suggestions on how to tackle this problem?
I have full installation traces but can only see that the registry work is being refused. I can't see why.
 

View Replies !   View Related
Read From One Server And Write To Another Server
Do we have any way to update the stored procedures to read the data from tables in production server and to update the tables in Test server?

Thanks

View Replies !   View Related
ERROR: A Variable May Only Be Added Once To Either The Read Lock List Or The Write Lock List.
Hi,
I have set of 2 DTS packages, one of which calls the other by forming a command-line (dtexec) using a Execute Process task.

From the parent package-> Execute Process Task->
dtsexec /F etc... /<pkg variable> = "servername" 

Each of the parent and the called package have a variable: "User::DWServerSQLInstance" which is mapped to the SQL server connection manager server name property using an expression. The outer package has the above variable and so does the inner called package (which gets assigned through the command line from the outerpackage call to inner)

I "sometimes" get the following error:

OnError,I4,TESTDOMAdministrator,ACDWAggregation,{A1F8E43F-15F1-4685-8C18-6866AB31E62B},{77B2F3C7-6756-46EB-8C01-D880598FB4B3},5/22/2006 5:10:28 PM,5/22/2006 5:10:28 PM,-1073659822,0x,The variable "User::DWServerSQLInstance" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

Help would be appreciated!

I have seen other posts on this but, not able to relate the solution to my scenario.

View Replies !   View Related
A Variable May Only Be Added Once To Either The Read Lock List Or The Write Lock List
Hi All,

 

I have seen a few other people have this error.

Package works fine when run from BIDS, DTExec, dtexecui. When I schedule it, It get these random errors. (See below)

The main culprit is a variable called "RecordsetFileDIR" which is set using an expression. (@[User::_ROOT] + "RecordSets\")

A number of other variables use this as part of their expression and as they all fail, pretty much everything dies.

I have installed SP1 (Not Beta) on server. Package uses config files to set the value of _ROOT.

 

The error does not always seem to be with this particular variable though. Always a variable that uses an expression but errors are random. Also, It will run 3 out of 10 times without a problem. I am the only person on the server at the time.

Any ideas?

 

Cheers,

Crispin

 

Error log:

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073659822,0x,The variable "User::RecordsetFileDIR" is already on the read list. A variable may only be added once to either the read lock list or the write lock list.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073639420,0x,The expression for variable "rsHeaderFile" failed evaluation. There was an error in the expression.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636247,0x,Accessing variable "User::rsHeaderFile" failed with error code 0xC00470EA.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified.  Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified.  Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified.  Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1071636390,0x,The file name is not properly specified.  Supply the path and name to the raw file either directly in the FileName property or by specifying a variable in the FileNameVariable property.

OnError,,,DF_Header_Header,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,Move All Data,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,Load Open Batches and Process Files,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

OnError,,,POSBasketImport,,,10/05/2006 12:03:34,10/05/2006 12:03:34,-1073450901,0x,"component "rsHeader" (365)" failed validation and returned validation status "VS_ISBROKEN".

 

View Replies !   View Related

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