Friday, March 30, 2012
scripting data
I need to take data from a SQL Serer 2005 database, and load into a
remote 2000 database. I've already been able to script and create the
database objects (MS SQL Server 2005 has a nifty option which allows
you to scripting for SQL Server 2000 compliance). Now i just need to
get the data in.
Is there a tool or utility out there that i can use to generate insert
statements for all the tables in database?
Thanks much for any advice regarding this.
You could uses SSIS to transfer the data, however if you want to generate
insert scripts then take a look at sp_generate_inserts
http://vyaskn.tripod.com/code.htm#inserts
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"farseer" <farseer@.optonline.net> wrote in message
news:1171346776.733940.21960@.a75g2000cwd.googlegro ups.com...
> Hi,
> I need to take data from a SQL Serer 2005 database, and load into a
> remote 2000 database. I've already been able to script and create the
> database objects (MS SQL Server 2005 has a nifty option which allows
> you to scripting for SQL Server 2000 compliance). Now i just need to
> get the data in.
> Is there a tool or utility out there that i can use to generate insert
> statements for all the tables in database?
> Thanks much for any advice regarding this.
>
|||Hi
You are able to create a linked server between both and share the data
"farseer" <farseer@.optonline.net> wrote in message
news:1171346776.733940.21960@.a75g2000cwd.googlegro ups.com...
> Hi,
> I need to take data from a SQL Serer 2005 database, and load into a
> remote 2000 database. I've already been able to script and create the
> database objects (MS SQL Server 2005 has a nifty option which allows
> you to scripting for SQL Server 2000 compliance). Now i just need to
> get the data in.
> Is there a tool or utility out there that i can use to generate insert
> statements for all the tables in database?
> Thanks much for any advice regarding this.
>
|||Try www.sqlscripter.com to script your data.
Its free.
"farseer" wrote:
> Hi,
> I need to take data from a SQL Serer 2005 database, and load into a
> remote 2000 database. I've already been able to script and create the
> database objects (MS SQL Server 2005 has a nifty option which allows
> you to scripting for SQL Server 2000 compliance). Now i just need to
> get the data in.
> Is there a tool or utility out there that i can use to generate insert
> statements for all the tables in database?
> Thanks much for any advice regarding this.
>
Wednesday, March 28, 2012
scriptexec sp4?
I've done this before, but I'm getting this error? i check permissions &
normal stuff...
Server: Msg 21330, Level 16, State 1, Procedure sp_MScopyscriptfile, Line 31
Failed to create a sub-directory under the replication working directory.(md
"\\GWF-DB\d$\SQL\MSSQL\ReplData\20050722165541703")
am i missing anything?
Scott Kramer
CDS Technologies, Inc.
www.clevelanddata.com
www.groundzerolan.com
www.team501.com
damn, i found it under the server publisher options, kind like a working
dir, ?!?
"S c o t t K r a m e r" <sckramer2000@.hotmail.com> wrote in message
news:e37d4$42e15dde$a227293d$22391@.ALLTEL.NET...
> sp_scriptexec, pro p[ropagate a script to merge subs...
> I've done this before, but I'm getting this error? i check permissions &
> normal stuff...
> Server: Msg 21330, Level 16, State 1, Procedure sp_MScopyscriptfile, Line
> 31
> Failed to create a sub-directory under the replication working
> directory.(md "\\GWF-DB\d$\SQL\MSSQL\ReplData\20050722165541703")
> am i missing anything?
> --
> Scott Kramer
> CDS Technologies, Inc.
> www.clevelanddata.com
> www.groundzerolan.com
> www.team501.com
>
Friday, March 9, 2012
script error checking
So I′ve built a litle executable that executes an updating script using the
osql tool during the installation process.
In the end, the program checks for any entry in a specific table containing
error lgo information.
To prevent users from using the application if any error occurs, I′ve
written some errors checking in the script, as follows:
DECLARE @.errorsave int
IF NOT EXISTS(SELECT nm_version FROM VerInfo where nm_version = 2)
BEGIN
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
BEGIN TRANSACTION
ALTER TABLE .... /* first change */
SET @.errorsave = @.@.ERROR
IF @.errorsave <> 0 GOTO CONTROL_ERROR
ALTER TABLE .... /* second change */
SET @.errorsave = @.@.ERROR
IF @.errorsave <> 0 GOTO CONTROL_ERROR
-- update version info block
INSERT INTO [dbo].[VerInfo] (nm_version) VALUES (2)
COMMIT TRANSACTION
END
CONTROL_ERROR:
IF @.@.TRANCOUNT>0
BEGIN
ROLLBACK TRANSACTION
INSERT INTO [dbo].[LogInfo]([TX_Description])
SELECT description FROM [master].[dbo].[sysmessages]
WHERE error = @.errorsave
END
GO
The problem is:
There are some specific situations (like drop column) where, if an error
occurs, the script just stops running and does not perform the error log
saving routine, while, in other situations (like drop table) that saves the
error into "LogInfo" table, as expected.check out this link for a good discussion on SQL error handling:
http://www.sommarskog.se/error-handling-I.html
Wednesday, March 7, 2012
Script a database fail
Dear experts,
I've a database in sql2005 and now I want to build a same one on another machine. I've searched thru google and told that i can use backup& restore or using script. I've tested using backup/restore and it works great now i want to give a test to script. I've script the database successfully to a sql script file, however, when i run it against the new database server, the new database was not created as expected. Could anybody explain why? Thanks in advance
Are you getting any error messages?
|||How did you create script? Have you tried to create it with Database Publishing Wizard:http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
With this peace of software you can create script directly from Visual Studio and you can choose do you want only schema of your database, or do you want schema and data.
Saturday, February 25, 2012
Scorecard accelerator. How the score value is calculated?
I want to know what is the rule behind the score calculated value in the
scorecard accelerator application.
I've a satisfaction value (which is a %) of 80%; my target is 85%
Score = 75%?
any idea?
thanks,
Jerome.
Hi - did you ever get your answer to this? I'm trying to figure it out
as well.
Thanks,
Dean
J=E9j=E9 wrote:
> Hi,
> I want to know what is the rule behind the score calculated value in
the
> scorecard accelerator application.
> I've a satisfaction value (which is a %) of 80%; my target is 85%
> Score =3D 75%?
>=20
> any idea?
>=20
> thanks,
>=20
> Jerome.
|||look at the private dedicated newsgroup for the office scorecard
accelerator.
But, to resume... the complete formula is explained in the online help ;-)
http://localhost/sites/ScorecardDeve...p_overview.htm
To resume, the score is evaluated by evaluating the position of the
normalized value into the bands. So, for example, if you have a 2 band
indicator with boundaries set like this:
0$ - 800 000$ - 1 000 000$
If your value is 500 000$ the score is not 50% but 31.25% (if there is no
error in my formula ;))
a score of 50% is 800K$ (which is exactly the middle band)
For the 500 K$ value --> you are in the first band
500 / 800 = 0.625 --> relative position of the value in the first band
Because you have 2 bands only each band = 50%
so...
50% * 0.625 = 31.25%
A value of 900K$ give you a score of 75%:
900K4 give you the second band.
(900 - 800) / (1000 - 800) = 100 / 200 = 0.5
50% * 0.5 = 25%
The lower band = 50% so the final score is:
50% (position of the lower band) + 25% (relative position in the band) = 75%
Well... read the only help, the re is beautyfull pictures !

"Dean" <dfurness@.quilogy.com> wrote in message
news:1104984835.007747.223610@.c13g2000cwb.googlegr oups.com...
Hi - did you ever get your answer to this? I'm trying to figure it out
as well.
Thanks,
Dean
Jj wrote:
> Hi,
> I want to know what is the rule behind the score calculated value in
the
> scorecard accelerator application.
> I've a satisfaction value (which is a %) of 80%; my target is 85%
> Score = 75%?
> any idea?
> thanks,
> Jerome.