Scripting Inserts / Source Control

Jan 25, 2007

Hello SQL Server Community.

I'm looking for a way to keep my database in Subversion so I can maintain it in source control.

Seems like the best way to do this would be to dump the database to a text script file. This works fine for creating the database structure and managing those change, however, that database structure is useless without the actual data in the tables.

Is there a good way to generate the inserts for the actual data? Why isn't this an option in the script wizard.

Also, does anyone have a better idea of source control of SQL Server databases in Subversion?

Thanks,
Ryan.

http://www.dynamicajax.com

View 8 Replies


ADVERTISEMENT

Scripting INSERTs In An SQL Database?

Jul 20, 2005

Hi there,Getting ready for deployment and I would like to be able to run an installscript that will not just generate the schema, but fill in some of thetables with default data. Is there a tool out there that will scan usertables in an SQL database and generate the script required in order tocreate a database with this default data?ThanksRobin

View 2 Replies View Related

XML Source Adapter Inserts NULLS Into SQL Instead Of Blanks

Jul 3, 2007



I'm working on a new project using SSIS in SQL Server 2005 and have an issue that I need resolved.

I'm loading an XML file into SSIS using the XML Source Adapter. This maps to an OLE DB destination which reads the data into a SQL table (please see below for the table structure). In between this stage is a data conversion to convert the Unicode characters from XML into non-Unicode characters.



CREATE TABLE [dbo].[XMLTest](

[Forename] [varchar](50) COLLATE Latin1_General_CI_AS NULL,

[Surname] [varchar](50) COLLATE Latin1_General_CI_AS NULL,

[PostCode] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL

)



The problem I have is with blank strings in xml are being inserted into the SQL table as NULL values and not blanks (see the xml below).



<Root>
<People>
<Forename>Duncan3</Forename>
<Surname></Surname>
<PostCode>ME16 0WH</PostCode>
</People>
</Root>



Correct me if I'm wrong but a null value in xml means the node does not exist (See the xml below)?



<Root>
<People>
<Forename>Duncan3</Forename>
<PostCode>ME16 0WH</PostCode>
</People>
</Root>



Please also find the schema attached for reference.



<?xml version="1.0"?>
<xschema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xsequence>
<xs:element minOccurs="0" name="People">
<xs:complexType>
<xsequence>
<xs:element minOccurs="1" name="Forename" type="xstring" />
<xs:element minOccurs="0" name="Surname" type="xstring" />
<xs:element minOccurs="1" name="PostCode" type="xstring" />
</xsequence>
</xs:complexType>
</xs:element>
</xsequence>
</xs:complexType>
</xs:element>
</xschema>

View 5 Replies View Related

Can A Script Handle Conditional Inserts To An OLDB Data Source?

Nov 20, 2007

I have a very simple SSIS task whcih opens a flat file data source, checks the first two characters of each row and if it is equal to "06", inserts that row into an OLDB destination table. However it is inserting EVERY row, even the ones not equal to "06" in first two columns. So, how do I get it to NOT insert the rows I don't want? Any help is very much appreciated and the following is my code:


Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)

Dim InactiveDate As String

If Left(Row.Column0, 2) = "06" Then

Row.FilingNbr = Mid(Row.Column0, 3, 10)

Row.Address1 = Mid(Row.Column0, 13, 50)

Row.Address2 = Mid(Row.Column0, 63, 50)

Row.City = Mid(Row.Column0, 113, 64)

Row.State = Mid(Row.Column0, 177, 4)

Row.Zip = Mid(Row.Column0, 181, 9)

Row.ZipExt = Mid(Row.Column0, 190, 6)

Row.AgentCountry = Mid(Row.Column0, 196, 64)

InactiveDate = Mid(Row.Column0, 264, 2) + "/" + Mid(Row.Column0, 266, 2) + "/" + Mid(Row.Column0, 260, 4)

If IsDate(InactiveDate) And InactiveDate <> "00/00/0000" Then

Row.AgentInactiveDate = InactiveDate

Else

Row.AgentInactiveDate_IsNull = True

End If

Row.AgentLastName = Mid(Row.Column0, 268, 50)

Row.AgentFirstName = Mid(Row.Column0, 318, 50)

Row.AgentMiddleName = Mid(Row.Column0, 368, 50)

Row.AgentSuffix = Mid(Row.Column0, 418, 6)

End If



End Sub


Karen

View 5 Replies View Related

Does The Configure Data Source Wizard Work For Updates,Inserts, And Deletes ?

Jun 8, 2007

Ok, I think this may have a simple answer. Basically I have no problems in setting up QueryString/Control/etc parameters when I use SELECT in the Configure Data Source Wizard as it prompts me for the necessary parameters. But when I try to use the Configure Data Source Wizard with an UPDATE, INSERT or DELETE it does NOT prompt me for the required parameters.Is this a bug or am I just missing something? Do I have to put them in manually or something?Thanks! 

View 5 Replies View Related

SqlData Source Control

May 28, 2007

hi gurus, 
I am working on creating a new project in asp.net and was having problem in locating the sqldatasource and gridview control objects in the data toolbox.
Can anybody help me in adding these controls to the toolbox?
OS=Windows XP
Server =Sql Server 2005
Visual studio 2003
 
 

View 1 Replies View Related

SQL 2005 Source Control

Jun 11, 2008

Hi,

I noticed the other day the option to use source control in SQL Server management studio. My question is how do I add sln to existing databases in order to add them to source control??

Thanks.

View 1 Replies View Related

Source Control In SSMS

Feb 15, 2007

Hi all,

I'm in need of a source control system that integrates with the Management Studio so that every time i want to modify a table, view, procedure etc I have to check it out from the object explorer and then check it back in again. I have used Visual Source Safe before but never with a database...is it fully integrated with SSMS? What can I do to make this work as smoothly as possible?

Is there any other IDE that handles this better than SSMS?

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"

View 3 Replies View Related

Permissions Regarding Source Control In TFS

Oct 5, 2007

Why can't another developer check out SSIS packages from source control in TFS. I have given the developer all the permissions out there. I was the one who had created an SSIS solution/project local on my machine and then added to source control in TFS under the teamproject. The developer can do everything except in the source control explorer, everything is grayed out. I know you can set up permissions in source control explorer, and I have done that. but still no luck. Can it be related to workspace. When I open the Souce control explorer, in the workspace, I see the name of my local machine. should it be different. or is something else an issue.

Please advice.

Thank you.



View 1 Replies View Related

OLEDB Source Control

Jan 15, 2008

I was having one package which uses a source query in OLEDB Source Control and fetches the record and a couple of lookups and then an oledb command to insert/update the records in the table using as SP. I changed the source query(Infact the package) and removed in lookup and a different SP was called similar to the old one. But my problem is the package which was before taking only minutes to update 50,000 records is now taking more than 2 hrs. The problem is the number of records it is fetching from the source each time is very less.. its fetching hardly 500 records a time compared to nearly 2500 records before. Where am i going wrong? Any suggestion greatly appreciated.

View 5 Replies View Related

How To Get Read Only Control Value Through SQl Data Source

Nov 7, 2006

Hello,
I am using this sql data source control.
<asp:textbox runat="server" id="txtFromDate" ReadOnly="true"></></asp:textbox>
 
<asp:textbox runat="server" id="txtToDate" ReadOnly="true"></asp:textbox>
--------------------------------->
<asp:sqldatasource id="dsClickInfo" runat="server" connectionstring="<%$ ConnectionStrings:activeConnectionString %>"
selectcommand="SProc_GetTransaction" selectcommandtype="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter QueryStringField="Id" Name="MerchantID" Type="int32" />
<asp:ControlParameter ControlID="txtFromDate" Name="StartDate" PropertyName="Text"
Type="String" DefaultValue="0" />
<asp:ControlParameter ControlID="txtToDate" Name="EndDate" PropertyName="Text"
Type="String" DefaultValue="0" />
</SelectParameters>
 
</asp:sqldatasource>
I abouve code txtFromDate and txtToDate are marked as readonly so sqldatasource is not able to get value from these controls.
How is it possible?
Please help me..

View 3 Replies View Related

I Want Source Control For SQL Server 2000...

Apr 17, 2005

Hi guys'n'girls...
I currently work for a company where we develop several large ASP.NET applications which are VERY data centric. But lately we have run into a problem on our developer DB...
On the project I am working on we currenctly have approx. 10 developers working concurrently on the database. That means that we often run into errors caused by two developers working on the same stored procedure, function or trigger so the developer who adds his changes last, overwrites the modifications done by the other developer. The obvious answer is source control for the db, but as far as I can tell this is only available for stored procedures and not for functions or triggers... And even the stored procedure solution isn't very safe because it only works if every developer is editing the procedures through VS.
So what do we do? There must be some solution to this problem... And I'm pretty convinced that we are not the first company to face this problem. Are we doing it the wrong way or do you know another solution?
Thanks in advance!

View 1 Replies View Related

Stored Procedures And Source Control

Oct 18, 2005

We have a large team working on applications to support our internal sales and our public dotcom site.  In the process, as you can imagine, we generate a lot of stored procedures and sql scripts going to our dba's for our staging,qa and production environments- but we don't have a solid way to manage it yet.  Some people use Source Safe?  Does anyone have any successes in this area or recomendations?Thanks!s!Stephen Rylander

View 2 Replies View Related

SP Source Code Control In MSSQL 7.0...

Sep 7, 2000

Hi,
We use a lot of stored procedures within our project and I am looking for a source code/versioning control software that can be used with SQL Server 7.0 to track any changes to these stored procedures. Does anyone have any suggestions?

Thanks in advance,
Darrin Wilkinson

View 2 Replies View Related

Control Source Field As Value List

Nov 22, 2005

Hi!
I have a strored proc which adds up fields separated by semicolon into a new one and I'd like to use it as a combo box's control source field as a Value list. But it's just insert the whole field into one line like value1;value2;value3 .
Is there any way to get these values selectable in the combo box?

Thanks in advance for any help.

Vill

View 1 Replies View Related

3rd Party Source Control That Leverages VSS

Jan 5, 2004

I noticed from this link:

http://www.aspfaq.com/show.asp?id=2495

There are four well known products that are used by medium to large size shops to help aid in change management of SQL Environments.

- AbaPerls
- DBGhost
- MSSqlExpress
- SQL Source Control

Does anyone currently use any of the above? Could you briefly explain your likes an dislikes and if you have reviewed any of the other options above when you had to make a decision as to which product to use?

View 2 Replies View Related

Source Control / Code Deployment

Jan 3, 2008

Look for recommendations for the best product out there to facilitate both source control and code deployment. Typical features I would be looking for are bullet below:

Control object versions
Tracking
History
Automated feature
Capture database changes
Roll-back feature (should such a thing exist)

Thanks

View 2 Replies View Related

Stored Procedure Source Control

Jul 20, 2005

Hi,I am trying to put SQL Server Stored Procedures into Sourcesafe as perthe Microsoft Knowledge Base article 818368, but have run into aproblem.The web server is SQL Server 2000 running on Windows 2003 Server. Theclient dev environment is Visual Studio 2003 Enterprise DeveloperEdition.I have carried out the following steps successfully:-1. Installed Sourcesafe client tools on the Server (sourcesafe is onanother server)2. Run the MSSQLServer service under a domain account that has Readand Write access to the Sourcesafe database.3. Added the above user to Sourcesafe using the Administrator tool.4. Installed the VS6 Stored Procedure Version Control components onthe Server5. Enabled Version Control for Stored Procedures on the clientHowever when I right-click on the Stored Proc node in Server explorerI do not get any of the Sourcesafe menu options. They are not greyedout, they are simply not there!Any help would be appreciated.Alternatively if anyone has recommendations for other strategies orother tools to use for this purpose than Sourcesafe then this wouldalso be welcomeKarl

View 1 Replies View Related

SSIS Project And Source Control

Aug 26, 2007

Our team has the following problem:
I create a SSIS project in VS and add it to Team Source Control. When the project and all it's files exist on a machine and I want to open the project from Source Control, everithing works fine, but when another developer, who doesn't have the files on his machine, wants to open the project from Source Control he is required to check out the project file.

I've investigated the problem and found out that each project has a database file (with .database extension) and project file contains a reference to it. Once the user opens from Team Source Control a project that isn't presented on a target machine, the VS creates a new database file on a local machine and insists to change the reference in the project file.

Does anyone have a workaround for the problem?

Thanks

View 5 Replies View Related

Reporting Service And Source Control

Aug 30, 2007

Hi

We have encountered a problem using source control with reporting services. Im writing this post to find out whether we are doing something wrong, or reporting service just don't store everything in source control.

My problem is as follows.
My collegue creates a report with a dataset and this report contains several parameters. He tests this, deploys it, and checks it into the source control through Visual Studio.
The following day I get responsibility to alter something in this report. I checks out everything from source control, starts Visual Studio. But... A few important things are missing. The credentials for the dataset for once (this is a minor issue) since these might not should be stored in source control anyways. What is worse is that all the parameter settings are missing. What was entered was a query to a stored procedure where e.g 5 parameters in the report was mapped to parameters in the stored procedure. Now the query has been changed to text type, and the parameter mapping is missing.

This does make it impossible to cooperate on creating reports. If I now make a change in the parameter configuration, my collegue won't receive this when synchronizing source control, and the risk of deploying something incorrect is too high.

Can anyone help enlighten us. Are we doing something wrong? Is there some manual step that needs to be done to ensure that everything is stored in source control? Or is it just something we have to live with, not being able to trust source control when doing Reporting Services?

Best regards
/Anders

View 1 Replies View Related

SSIS VSS Source Control Structure

Apr 22, 2007

I have all the config files for my various packages in a folder call configs. It seems that I cannot add folders to the SSIS solution. I can add config files, but they get copied into the root folder, which breaks the directory structure that I have.

Am I missing something? Is there a recommended to manage config files, and other external files used by the SSIS package, in SourceSafe and in the SSIS solution? Thank you.

View 1 Replies View Related

Problem Using Parameter On SQL Source Data Control

May 15, 2006

I have an ASP page which uses an SQL data source control, as shown below:  <asp:SqlDataSource ID="mySQL" runat="server"       ConnectionString="<%$ ConnectionStrings:mySQLConnectionString %>"      SelectCommand="SELECT device FROM device_table WHERE (device_id IN (@devicelist))">          <SelectParameters>              <asp:Parameter DefaultValue="" Name="devicelist" Type="String" />          </SelectParameters>  </asp:SqlDataSource>The problem is getting the "IN" clause of the select statement to work via the ASP page with code behind in C#.  If I test the query in the page designer when configuring the SQL control by inserting 'device-1','device-2','device-3' as the value for the "devicelist" parameter, everything works as expected.  However, when that same value is written programmatically into the DefaultValue of the parameter, the resulting query contains no results (as if the string contents are invalid).  If I alter my program to supply a single entry (with no commas) it seems to work as well.  I suspect the comma (and possibly the single-quote) characters in my string when multiple entries are involved are causing the issue.Is there a proper technique for getting the requisite quote-delimited, comma-separated list into the SQL control command parameter correctly?  Should I be using some sort of escape sequence for the single-quote and comma characters?  Should I be using another "type" for the parameter; one that accepts an array of entries?  I have not been able to find any examples or documentation that provides an answer.

View 1 Replies View Related

Source Code Control And SQL Server Express??

Apr 18, 2006

Hi,

I was wondering if anybody could advise on source code control for SQL Server express, for the table schema and stored procedures?

I currently use Sourcesafe V6 to work with visual studio 6 and 2003 (although it isn't integrated in 2003), and wondered if that can be used?

Any suggestions would be greatly appreciated, as I see this as a disaster waiting to happen!

Thanks in advance.

Mark

View 4 Replies View Related

Query Date Range SQL Data Source Control

Jan 24, 2008

I have a DB with the folloing fields... ArticleID, ArticleTitle, PublishDate(DateTime Field), EndPublishDate(DateTime Field).... What I want to do is show in a list view only the articles where the date is on or after the PublishDate and before or on the EndPubishDate.
I thought I could simply do something like this
SELECT     ArticleTitle, PublishDate, PublishEndDate, PublishedFROM         UserArticlesWHERE     (Published = @Published) AND (PublishDate >= @PublishDate) AND (PublishEndDate <= @PublishEndDate)
 
Well I can't... can someone explain how I can do this please... I understand the the PublishDate and EndPublsihDate need a variable... The info is in the DB I just don't know how to do what I need to.
 
Thanks,
 

View 4 Replies View Related

SQL Data Source Control...Generate Insert, Update && Delete Statements...

Apr 23, 2008

I have an SQL data source on my page and I select "Table".  On the next screen I pick the fields I want to show.  Then I click the "Advanced" button because I want to allow Inserts, updates and deletes.  But its all greyed out abd I can't check this option. The UID in the connection string I am connecting under has the correct permissions in SQL server to do inserts, update and deletes too.  Anyone know why it would be greyed out? The connectionstring property in the aspx code is dynamic but this shouldn't be the reason because I have used this before with success

View 2 Replies View Related

Analysis :: How To Structure Source Control Folders In Team Foundation Server

Jun 11, 2015

How to integrate current artifacts with TFS ?

For example : We have multiple applications X, Y, Z  each has  its own SSIS solution , SQL Script, MSTR report and documentation.

We move code from Dev to Test and then to PROD

How to structure the folders which will be easy to manage and easy to release ?

View 3 Replies View Related

Data Scripting Tool ( NOT DATABASE Scripting)

Mar 16, 2004

Hi to all
Is there any option in sql server DTS or any other third party tool that can script data. By scripting data i mean that....

if a table "Employee" contains 50 rows, i want the tool to write 50 insert queries for me so that i can run in it anywhere.

Problem is i have to insert data in a remote server where i cannot use DTS. I just have a text area to write my query and press the run button..

Hope u understand my problem. In case of any explanation please reply. Waiting for your response. Thanx in advance.

by to all

View 1 Replies View Related

Power Pivot :: One Slicer To Control Two Pivot Tables That Have Different Source Data And Common Key

Jul 8, 2015

I have two data tables:

1) Production data with column headers: Key, Facility, Line, Time, Output
2) Costs data with column headers: Key, Site, Cost Center, Time, Cost

The tables have a common key named obviously as Key. The data looks like this:

Key
Facility
Line
Time
Output
Alpha

I would like to have two pivot tables which I can filter with ONE slicer based on the column Key. The first pivot table shows row labels Facility, Line and column labels Time. Value field is Output. The second pivot table shows row labels Site, Cost Center, and column lables Time. Value field is Cost.How can I do this with Power Pivot? I tried by linking both tables above to a table with unique Keys in PowerPivot and then creating a PivotTable where I would have used the Key from the Keys table.

View 5 Replies View Related

How To Pass The Excel Sheet Names To The Excel Source Control Through Variables

Feb 22, 2006

I am trying to get the contents of the Excel Files dynamically and dumping into the SQL Database using SSIS. Through WMI Event Watcher, I could find when one or more Excel files dumped in a particular folder and using ForEach Loop Container I was able to take all the filenames and pass it through Variables. But at the same time in the Data Flow, I have to pass each Sheet of an Excel File to the Excel Source control and export the data to my SQL Database using OLEDB Destination.

For that I need to get the names of each sheets in an Excel File and pass it to the Excel Source Control through variables. But when I give Data Access Mode as "Table name or view name variable" and provide the variable name in that, then it is giving an error message as "A destination table name has not been provided".

And at the same time, Since I was not able to provide an static Filename (as I am passing through Variables), when I tried to map the columns in the OleDB Destination, it is not allowing me to map the columns.

So all these things I should do at Run-time using Variables in SSIS. I don't want to hard-code any filenames or Sheet names. If any one of you have a solution, please share with me.







Thanks & Regards,

Prakash Srinivasan

View 3 Replies View Related

Issue With SSRS Report Exporting To Excel With The Matrix Control Inside The Table Control

Jan 27, 2008

Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.

With Thanks
M.Mahendra

View 5 Replies View Related

Is It Possible To Embbed And Ocx Control On A Report Or Some Sort Of Interactive Control Like A Flash.ocx?

Oct 25, 2007

does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.

View 1 Replies View Related

Reporting Services From WebBrowser Control - Print = Unable To Load Client Print Control

Mar 20, 2007

UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...) 





UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.







My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."

I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.



Any ideas how to support Reporting Services "Print" from within a WebBrowser control?

RELATED THREADS

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=332145&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=264478&SiteID=1

 

 

View 1 Replies View Related

Integration Services :: Metadata Change In Source Disturbs All Configuration Of Source

Jun 18, 2015

I have a got a package with source as sql table which has got 50 columns. We are using only 10 columns out of this. Recently one column name has changed and thus throws error invalid mapping. When I open the source to do the changes noticed that all the colums are prselected now and also the datatypes got changed to default ( I had changed the datatypes as per my requirement while i developed). So now I had to select required columns from source and redo the datatype changes in advanced editor.Is there any option which doesnt disturb this settings and we just need to correct the mapping alone. 

View 4 Replies View Related







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