Wednesday, March 28, 2012
How to transfer data?
script files to build the structure.
How can I easily transfer some table data?
I have a few tables that need some data (not a lot of data but some data in
around 8 tables).
Thanks,
ShaneHi,
Did you meant to transfer data from one MSDE SQL server to another?
then you can,
1. BCP OUT the data from source server in txt files
2. BCP IN to destination server
Have a look into the BCP command in books online.
Note:
If the data trasfer is going to happen in a single server between databases
or with in a database then you can use
Insert into table_name select col1,col2,col3... from table_a, table_b and
then conditions
Thanks
Hari
MCDBA
"SStory" <TheStorys@.TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:O3#GbM1GEHA.2516@.TK2MSFTNGP12.phx.gbl...
> I am installing MSDE, then a batch file calls osql which calls
> script files to build the structure.
> How can I easily transfer some table data?
> I have a few tables that need some data (not a lot of data but some data
in
> around 8 tables).
> Thanks,
> Shane
>
How to transactionally update a DB Schema?
upgrade the various databases associated with my company's productized and
custom applications.
I've come up with what I think is an effective way of storing, specifying,
and executing the required T-SQL scripts to change the database from one
schema version to a new one, but I am having trouble reconciling how to deal
with potential errors while upgrading.
Is there a way to transactionally perform various "CREATE/ALTER
TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so that
if one fails that I can rollback to before the upgrade started? If SQL
Server doesn't provide this functionality, what would be a "best practice"
to handle these types of errors?
Thanks,
Matthew Belk
BizSpeed, Inc.
You can execute DDL as part of an explicit transaction so that you can
rollback in the case of an error. However , I personally would backup the
database prior the upgrade and restore if an error is encountered.
Hope this helps.
Dan Guzman
SQL Server MVP
"Matthew Belk" <mbelk@.bizspeed.com> wrote in message
news:uqNW53WHEHA.3564@.TK2MSFTNGP09.phx.gbl...
> I am trying to build a database schema updater (in C#) that can be used to
> upgrade the various databases associated with my company's productized and
> custom applications.
> I've come up with what I think is an effective way of storing, specifying,
> and executing the required T-SQL scripts to change the database from one
> schema version to a new one, but I am having trouble reconciling how to
deal
> with potential errors while upgrading.
> Is there a way to transactionally perform various "CREATE/ALTER
> TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so
that
> if one fails that I can rollback to before the upgrade started? If SQL
> Server doesn't provide this functionality, what would be a "best practice"
> to handle these types of errors?
> Thanks,
> Matthew Belk
> BizSpeed, Inc.
>
|||I'm doing that, too, if something catastrophic were to happen, but in the
case of upgrading through multiple versions, I would like to commit the
transaction for each version as I successfully run all the scripts for that
version.
Thanks,
Matthew
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ezC50FXHEHA.4088@.TK2MSFTNGP10.phx.gbl...
> You can execute DDL as part of an explicit transaction so that you can
> rollback in the case of an error. However , I personally would backup the
> database prior the upgrade and restore if an error is encountered.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Matthew Belk" <mbelk@.bizspeed.com> wrote in message
> news:uqNW53WHEHA.3564@.TK2MSFTNGP09.phx.gbl...
to
and
specifying,
> deal
> that
practice"
>
sql
Monday, March 26, 2012
How to transactionally update a DB Schema?
upgrade the various databases associated with my company's productized and
custom applications.
I've come up with what I think is an effective way of storing, specifying,
and executing the required T-SQL scripts to change the database from one
schema version to a new one, but I am having trouble reconciling how to deal
with potential errors while upgrading.
Is there a way to transactionally perform various "CREATE/ALTER
TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so that
if one fails that I can rollback to before the upgrade started? If SQL
Server doesn't provide this functionality, what would be a "best practice"
to handle these types of errors?
Thanks,
Matthew Belk
BizSpeed, Inc.You can execute DDL as part of an explicit transaction so that you can
rollback in the case of an error. However , I personally would backup the
database prior the upgrade and restore if an error is encountered.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Matthew Belk" <mbelk@.bizspeed.com> wrote in message
news:uqNW53WHEHA.3564@.TK2MSFTNGP09.phx.gbl...
> I am trying to build a database schema updater (in C#) that can be used to
> upgrade the various databases associated with my company's productized and
> custom applications.
> I've come up with what I think is an effective way of storing, specifying,
> and executing the required T-SQL scripts to change the database from one
> schema version to a new one, but I am having trouble reconciling how to
deal
> with potential errors while upgrading.
> Is there a way to transactionally perform various "CREATE/ALTER
> TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so
that
> if one fails that I can rollback to before the upgrade started? If SQL
> Server doesn't provide this functionality, what would be a "best practice"
> to handle these types of errors?
> Thanks,
> Matthew Belk
> BizSpeed, Inc.
>|||I'm doing that, too, if something catastrophic were to happen, but in the
case of upgrading through multiple versions, I would like to commit the
transaction for each version as I successfully run all the scripts for that
version.
Thanks,
Matthew
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ezC50FXHEHA.4088@.TK2MSFTNGP10.phx.gbl...
> You can execute DDL as part of an explicit transaction so that you can
> rollback in the case of an error. However , I personally would backup the
> database prior the upgrade and restore if an error is encountered.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Matthew Belk" <mbelk@.bizspeed.com> wrote in message
> news:uqNW53WHEHA.3564@.TK2MSFTNGP09.phx.gbl...
> > I am trying to build a database schema updater (in C#) that can be used
to
> > upgrade the various databases associated with my company's productized
and
> > custom applications.
> >
> > I've come up with what I think is an effective way of storing,
specifying,
> > and executing the required T-SQL scripts to change the database from one
> > schema version to a new one, but I am having trouble reconciling how to
> deal
> > with potential errors while upgrading.
> >
> > Is there a way to transactionally perform various "CREATE/ALTER
> > TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so
> that
> > if one fails that I can rollback to before the upgrade started? If SQL
> > Server doesn't provide this functionality, what would be a "best
practice"
> > to handle these types of errors?
> >
> > Thanks,
> > Matthew Belk
> > BizSpeed, Inc.
> >
> >
>
How to transactionally update a DB Schema?
upgrade the various databases associated with my company's productized and
custom applications.
I've come up with what I think is an effective way of storing, specifying,
and executing the required T-SQL scripts to change the database from one
schema version to a new one, but I am having trouble reconciling how to deal
with potential errors while upgrading.
Is there a way to transactionally perform various "CREATE/ALTER
TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so that
if one fails that I can rollback to before the upgrade started? If SQL
Server doesn't provide this functionality, what would be a "best practice"
to handle these types of errors?
Thanks,
Matthew Belk
BizSpeed, Inc.You can execute DDL as part of an explicit transaction so that you can
rollback in the case of an error. However , I personally would backup the
database prior the upgrade and restore if an error is encountered.
Hope this helps.
Dan Guzman
SQL Server MVP
"Matthew Belk" <mbelk@.bizspeed.com> wrote in message
news:uqNW53WHEHA.3564@.TK2MSFTNGP09.phx.gbl...
> I am trying to build a database schema updater (in C#) that can be used to
> upgrade the various databases associated with my company's productized and
> custom applications.
> I've come up with what I think is an effective way of storing, specifying,
> and executing the required T-SQL scripts to change the database from one
> schema version to a new one, but I am having trouble reconciling how to
deal
> with potential errors while upgrading.
> Is there a way to transactionally perform various "CREATE/ALTER
> TABLE/PROCEDURE/TRIGGER/VIEW" and "INSERT/UPDATE/DELETE" statements so
that
> if one fails that I can rollback to before the upgrade started? If SQL
> Server doesn't provide this functionality, what would be a "best practice"
> to handle these types of errors?
> Thanks,
> Matthew Belk
> BizSpeed, Inc.
>|||I'm doing that, too, if something catastrophic were to happen, but in the
case of upgrading through multiple versions, I would like to commit the
transaction for each version as I successfully run all the scripts for that
version.
Thanks,
Matthew
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:ezC50FXHEHA.4088@.TK2MSFTNGP10.phx.gbl...
> You can execute DDL as part of an explicit transaction so that you can
> rollback in the case of an error. However , I personally would backup the
> database prior the upgrade and restore if an error is encountered.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Matthew Belk" <mbelk@.bizspeed.com> wrote in message
> news:uqNW53WHEHA.3564@.TK2MSFTNGP09.phx.gbl...
to
and
specifying,
> deal
> that
practice"
>
How to to develope a new PlugIN algorithm
I have a code for Nearest neighbour algorithm, I want to build a datamining algorithm using that code..
I have the following link that includes the source code for a sample plug-in algorithm written in C#.
(managed plug-in framework that's available for download here: )http://www.microsoft.com/downloads/details.aspx?familyid=DF0BA5AA-B4BD-4705-AA0A-B477BA72A9CB&displaylang=en#DMAPI.
But i am confused on where to insert my algorithm logic?
Hiya, see this sample plug-in algorithm download below. You should get the ideas for that. Hope it helps.
http://sqlserverdatamining.com/DMCommunity/_Downloads/2384.aspx
Regards,
|||The managed plug-in framework comes with a step-by-step tutorial as well as with a CHM (help) file which should help.
The download pointed by Helen will give you more insight on how the plug-in architecture actually works (the managed plug-in is a wrapper on top of the COM architecture).
The step-by-step tutorial coming with the managed plug-in also links to a few other architecture overview articles.
Briefly, assuming you will start from the completed managed plug-in sample, you should:
- override the Algorithm's InsertCases method and the case processor's ProcessCase method to perform the processing
- override the Algorithm's Predict method to perform predictions
sql