Monday, March 26, 2012
Problem with installing sp4
looking in sqllog, I have this lines (at the end of file).
...
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
12:13:12 Begin ServPriv (MSSQLSERVER)
12:13:12 End ServPriv()
12:13:13 Upgrading databases
12:13:13 Upgrading databases on instance 'MSSQLSERVER'
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:13:13 Process Exit Code: (0)
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:13:13 Process Exit Code: (0)
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
12:13:34 Process Exit Code: (0)
12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
"C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
"C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
12:13:34 Process Exit Code: (1)
12:14:10 Error running script: replsys.sql (1)
12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:14:25 Process Exit Code: (0)
12:14:25 Action CleanUpInstall:
12:14:25 Installation Failed.
Have you looked in this file?
C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
R.
"Radovan" <radovan@.servis24.hr> wrote in message
news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> I can't install sp4. I got error :Error running script: replsys.sql (1)
> looking in sqllog, I have this lines (at the end of file).
> ...
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
> 12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
> Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
> 12:13:12 Begin ServPriv (MSSQLSERVER)
> 12:13:12 End ServPriv()
> 12:13:13 Upgrading databases
> 12:13:13 Upgrading databases on instance 'MSSQLSERVER'
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:13:13 Process Exit Code: (0)
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:13:13 Process Exit Code: (0)
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
> 1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
> 12:13:34 Process Exit Code: (0)
> 12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
> "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
> "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
> 12:13:34 Process Exit Code: (1)
> 12:14:10 Error running script: replsys.sql (1)
> 12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\s cm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:14:25 Process Exit Code: (0)
> 12:14:25 Action CleanUpInstall:
> 12:14:25 Installation Failed.
>
|||Check what other processes are running on your server. I had the same
problem updating to SP4. I had to stop MOM services, Windows update
processes, and end anything else that may be using SQL. Then the SP4
install will go OK.
Mike
R wrote:[vbcol=seagreen]
> Have you looked in this file?
> C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
> R.
> "Radovan" <radovan@.servis24.hr> wrote in message
> news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...
|||Thanks that helps.
Radovan
"inqbbus" <inqbbus@.gmail.com> wrote in message
news:1126820621.538655.83620@.g47g2000cwa.googlegro ups.com...
> Check what other processes are running on your server. I had the same
> problem updating to SP4. I had to stop MOM services, Windows update
> processes, and end anything else that may be using SQL. Then the SP4
> install will go OK.
> Mike
> R wrote:
>
Problem with installing sp4
looking in sqllog, I have this lines (at the end of file).
...
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
12:13:12 Begin ServPriv (MSSQLSERVER)
12:13:12 End ServPriv()
12:13:13 Upgrading databases
12:13:13 Upgrading databases on instance 'MSSQLSERVER'
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:13:13 Process Exit Code: (0)
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:13:13 Process Exit Code: (0)
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
12:13:34 Process Exit Code: (0)
12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
"C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
"C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
12:13:34 Process Exit Code: (1)
12:14:10 Error running script: replsys.sql (1)
12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:14:25 Process Exit Code: (0)
12:14:25 Action CleanUpInstall:
12:14:25 Installation Failed.Have you looked in this file?
C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
R.
"Radovan" <radovan@.servis24.hr> wrote in message
news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> I can't install sp4. I got error :Error running script: replsys.sql (1)
> looking in sqllog, I have this lines (at the end of file).
> ...
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
> 12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
> Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
> 12:13:12 Begin ServPriv (MSSQLSERVER)
> 12:13:12 End ServPriv()
> 12:13:13 Upgrading databases
> 12:13:13 Upgrading databases on instance 'MSSQLSERVER'
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:13:13 Process Exit Code: (0)
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:13:13 Process Exit Code: (0)
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
> 1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
> 12:13:34 Process Exit Code: (0)
> 12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
> "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
> "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
> 12:13:34 Process Exit Code: (1)
> 12:14:10 Error running script: replsys.sql (1)
> 12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlS
etup\Bin\scm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:14:25 Process Exit Code: (0)
> 12:14:25 Action CleanUpInstall:
> 12:14:25 Installation Failed.
>|||Check what other processes are running on your server. I had the same
problem updating to SP4. I had to stop MOM services, Windows update
processes, and end anything else that may be using SQL. Then the SP4
install will go OK.
Mike
R wrote:[vbcol=seagreen]
> Have you looked in this file?
> C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
> R.
> "Radovan" <radovan@.servis24.hr> wrote in message
> news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...|||Thanks that helps.
Radovan
"inqbbus" <inqbbus@.gmail.com> wrote in message
news:1126820621.538655.83620@.g47g2000cwa.googlegroups.com...
> Check what other processes are running on your server. I had the same
> problem updating to SP4. I had to stop MOM services, Windows update
> processes, and end anything else that may be using SQL. Then the SP4
> install will go OK.
> Mike
> R wrote:
>sql
Problem with installing sp4
looking in sqllog, I have this lines (at the end of file).
...
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
12:13:12 Begin ServPriv (MSSQLSERVER)
12:13:12 End ServPriv()
12:13:13 Upgrading databases
12:13:13 Upgrading databases on instance 'MSSQLSERVER'
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:13:13 Process Exit Code: (0)
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:13:13 Process Exit Code: (0)
12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
12:13:34 Process Exit Code: (0)
12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
"C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
"C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
12:13:34 Process Exit Code: (1)
12:14:10 Error running script: replsys.sql (1)
12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
1 -Action 6 -Service MSSQLSERVER
12:14:25 Process Exit Code: (0)
12:14:25 Action CleanUpInstall:
12:14:25 Installation Failed.Have you looked in this file?
C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
R.
"Radovan" <radovan@.servis24.hr> wrote in message
news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> I can't install sp4. I got error :Error running script: replsys.sql (1)
> looking in sqllog, I have this lines (at the end of file).
> ...
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
> 12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
> Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
> 12:13:12 Begin ServPriv (MSSQLSERVER)
> 12:13:12 End ServPriv()
> 12:13:13 Upgrading databases
> 12:13:13 Upgrading databases on instance 'MSSQLSERVER'
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:13:13 Process Exit Code: (0)
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:13:13 Process Exit Code: (0)
> 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> 1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
> 12:13:34 Process Exit Code: (0)
> 12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
> "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
> "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
> 12:13:34 Process Exit Code: (1)
> 12:14:10 Error running script: replsys.sql (1)
> 12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> 1 -Action 6 -Service MSSQLSERVER
> 12:14:25 Process Exit Code: (0)
> 12:14:25 Action CleanUpInstall:
> 12:14:25 Installation Failed.
>|||Check what other processes are running on your server. I had the same
problem updating to SP4. I had to stop MOM services, Windows update
processes, and end anything else that may be using SQL. Then the SP4
install will go OK.
Mike
R wrote:
> Have you looked in this file?
> C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
> R.
> "Radovan" <radovan@.servis24.hr> wrote in message
> news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> > I can't install sp4. I got error :Error running script: replsys.sql (1)
> >
> > looking in sqllog, I have this lines (at the end of file).
> >
> > ...
> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0, 0
> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> >
> > 12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
> >
> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0, 0
> >
> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned: 0, 0
> >
> > 12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
> > Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
> >
> > 12:13:12 Begin ServPriv (MSSQLSERVER)
> >
> > 12:13:12 End ServPriv()
> >
> > 12:13:13 Upgrading databases
> >
> > 12:13:13 Upgrading databases on instance 'MSSQLSERVER'
> >
> > 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> > 1 -Action 6 -Service MSSQLSERVER
> >
> > 12:13:13 Process Exit Code: (0)
> >
> > 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> > 1 -Action 6 -Service MSSQLSERVER
> >
> > 12:13:13 Process Exit Code: (0)
> >
> > 12:13:13 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> > 1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
> >
> > 12:13:34 Process Exit Code: (0)
> >
> > 12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d master -o
> > "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
> > "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.sql" -Usa -P"
> >
> > 12:13:34 Process Exit Code: (1)
> >
> > 12:14:10 Error running script: replsys.sql (1)
> >
> > 12:14:10 C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
> > 1 -Action 6 -Service MSSQLSERVER
> >
> > 12:14:25 Process Exit Code: (0)
> >
> > 12:14:25 Action CleanUpInstall:
> >
> > 12:14:25 Installation Failed.
> >
> >|||Thanks that helps.
Radovan
"inqbbus" <inqbbus@.gmail.com> wrote in message
news:1126820621.538655.83620@.g47g2000cwa.googlegroups.com...
> Check what other processes are running on your server. I had the same
> problem updating to SP4. I had to stop MOM services, Windows update
> processes, and end anything else that may be using SQL. Then the SP4
> install will go OK.
> Mike
> R wrote:
>> Have you looked in this file?
>> C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out
>> R.
>> "Radovan" <radovan@.servis24.hr> wrote in message
>> news:OWXdLAeuFHA.2072@.TK2MSFTNGP14.phx.gbl...
>> > I can't install sp4. I got error :Error running script: replsys.sql (1)
>> >
>> > looking in sqllog, I have this lines (at the end of file).
>> >
>> > ...
>> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\setup.iss returned: 0,
>> > 0
>> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0,
>> > 0
>> >
>> > 12:13:12 SetFileSecuritySQLAndAdmin for returned: 3, 3
>> >
>> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlsp.log returned: 0,
>> > 0
>> >
>> > 12:13:12 SetFileSecuritySQLAndAdmin for C:\WINNT\sqlstp.log returned:
>> > 0, 0
>> >
>> > 12:13:12 SetFileSecPerfAndLogUsers for C:\Program Files\Microsoft SQL
>> > Server\MSSQL\Binn\SQLCTR80.DLL returned: 1332, 1332
>> >
>> > 12:13:12 Begin ServPriv (MSSQLSERVER)
>> >
>> > 12:13:12 End ServPriv()
>> >
>> > 12:13:13 Upgrading databases
>> >
>> > 12:13:13 Upgrading databases on instance 'MSSQLSERVER'
>> >
>> > 12:13:13
>> > C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
>> > 1 -Action 6 -Service MSSQLSERVER
>> >
>> > 12:13:13 Process Exit Code: (0)
>> >
>> > 12:13:13
>> > C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
>> > 1 -Action 6 -Service MSSQLSERVER
>> >
>> > 12:13:13 Process Exit Code: (0)
>> >
>> > 12:13:13
>> > C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
>> > 1 -Action 1 -Service MSSQLSERVER -StartupOptions \-T4022 \-T4010 \-m
>> >
>> > 12:13:34 Process Exit Code: (0)
>> >
>> > 12:13:34 C:\SQL2KSP4\x86\BINN\osql.exe -Slpc:BOGIBATINA -b -n -d
>> > master -o
>> > "C:\Program Files\Microsoft SQL Server\MSSQL\install\replsys.out" -i
>> > "C:\Program Files\Microsoft SQL
>> > Server\MSSQL\install\replsys.sql" -Usa -P"
>> >
>> > 12:13:34 Process Exit Code: (1)
>> >
>> > 12:14:10 Error running script: replsys.sql (1)
>> >
>> > 12:14:10
>> > C:\DOCUME~1\radovan\LOCALS~1\Temp\1\SqlSetup\Bin\scm.exe -Silent
>> > 1 -Action 6 -Service MSSQLSERVER
>> >
>> > 12:14:25 Process Exit Code: (0)
>> >
>> > 12:14:25 Action CleanUpInstall:
>> >
>> > 12:14:25 Installation Failed.
>> >
>> >
>
Friday, March 23, 2012
Problem with Insert statement - Arithmetic overflow
I'm trying to do a script that can combine data from different databases and
then present them in a list to for some payment purposes. I have little
problem though with a small bit of the script.
The following small part of the script works fine :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR , belb
This is part works fine - I get 1731 records inserted into my temp table.
I'd like to get the records grouped a little bit further though, so I've
tried with the modification below :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
Here I just remove the "belb" column in the GROUP BY clause and now I get
the following error :
"Arithmetic overflow error converting float to data type numeric.
The statement has been terminated."
I don't quite understand why I get this error message since it's the same
values I'm trying to insert in both cases.
If I just do a -
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
- I get 129 records which looks fine and looks like what I want.
The spe_temp..LonSum table is created as -
CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
I hope that some of you can shed some light on this?
Regards
Steen
The greatest amount you can store in a decimal(9,2) column is 9,999,999.99.
Is the sum for one of the CVR's you group by greater than that?
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
> Hi
> I'm trying to do a script that can combine data from different databases
> and
> then present them in a list to for some payment purposes. I have little
> problem though with a small bit of the script.
> The following small part of the script works fine :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR , belb
> This is part works fine - I get 1731 records inserted into my temp table.
> I'd like to get the records grouped a little bit further though, so I've
> tried with the modification below :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR
> Here I just remove the "belb" column in the GROUP BY clause and now I get
> the following error :
> "Arithmetic overflow error converting float to data type numeric.
> The statement has been terminated."
> I don't quite understand why I get this error message since it's the same
> values I'm trying to insert in both cases.
> If I just do a -
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR
> - I get 129 records which looks fine and looks like what I want.
> The spe_temp..LonSum table is created as -
> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
> CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
> Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
> numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
> I hope that some of you can shed some light on this?
> Regards
> Steen
>
|||Hi Jacco
You're right that there could be an issue here. The biggest value seems to
be 33.213.057,179999199 but even though I change the [Amount] and [Belb]
definition for my temp table to e.g. (Decimal 25,12) it still gives me the
error.
Regards
Steen
Jacco Schalkwijk wrote:[vbcol=seagreen]
> The greatest amount you can store in a decimal(9,2) column is
> 9,999,999.99. Is the sum for one of the CVR's you group by greater
> than that?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
|||Can you post the result of:
SELECT CVR, SUM([Amount]), SUM([belb])
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
?
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
> Hi Jacco
> You're right that there could be an issue here. The biggest value seems to
> be 33.213.057,179999199 but even though I change the [Amount] and [Belb]
> definition for my temp table to e.g. (Decimal 25,12) it still gives me the
> error.
> Regards
> Steen
>
> Jacco Schalkwijk wrote:
>
|||Hi Jacco
I got the problem solved - and it was the definition of the Decimal column
that wasn't big enough. First time I changed the definition I just changed
the syntax for CREATE TABLE.... - but I actually missed to re-create the
table.....doohhhh.....;-).
Thanks for you help.....it was spot on....
Regards
Steen
Jacco Schalkwijk wrote:[vbcol=seagreen]
> Can you post the result of:
> SELECT CVR, SUM([Amount]), SUM([belb])
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
> AND Belb <>0
> GROUP BY CVR
> ?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
sql
Problem with Insert statement - Arithmetic overflow
I'm trying to do a script that can combine data from different databases and
then present them in a list to for some payment purposes. I have little
problem though with a small bit of the script.
The following small part of the script works fine :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR , belb
This is part works fine - I get 1731 records inserted into my temp table.
I'd like to get the records grouped a little bit further though, so I've
tried with the modification below :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
Here I just remove the "belb" column in the GROUP BY clause and now I get
the following error :
"Arithmetic overflow error converting float to data type numeric.
The statement has been terminated."
I don't quite understand why I get this error message since it's the same
values I'm trying to insert in both cases.
If I just do a -
SELECT SUM([Amount]), SUM([belb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
- I get 129 records which looks fine and looks like what I want.
The spe_temp..LonSum table is created as -
CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
I hope that some of you can shed some light on this?
Regards
SteenThe greatest amount you can store in a decimal(9,2) column is 9,999,999.99.
Is the sum for one of the CVR's you group by greater than that?
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
> Hi
> I'm trying to do a script that can combine data from different databases
> and
> then present them in a list to for some payment purposes. I have little
> problem though with a small bit of the script.
> The following small part of the script works fine :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR , belb
> This is part works fine - I get 1731 records inserted into my temp table.
> I'd like to get the records grouped a little bit further though, so I've
> tried with the modification below :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR
> Here I just remove the "belb" column in the GROUP BY clause and now I get
> the following error :
> "Arithmetic overflow error converting float to data type numeric.
> The statement has been terminated."
> I don't quite understand why I get this error message since it's the same
> values I'm trying to insert in both cases.
> If I just do a -
> SELECT SUM([Amount]), SUM([belb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Belb <>0
> GROUP BY CVR
> - I get 129 records which looks fine and looks like what I want.
> The spe_temp..LonSum table is created as -
> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
> CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
> Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
> numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
> I hope that some of you can shed some light on this?
> Regards
> Steen
>|||Hi Jacco
You're right that there could be an issue here. The biggest value seems to
be 33.213.057,179999199 but even though I change the [Amount] and [B
elb]
definition for my temp table to e.g. (Decimal 25,12) it still gives me the
error.
Regards
Steen
Jacco Schalkwijk wrote:[vbcol=seagreen]
> The greatest amount you can store in a decimal(9,2) column is
> 9,999,999.99. Is the sum for one of the CVR's you group by greater
> than that?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...|||Can you post the result of:
SELECT CVR, SUM([Amount]), SUM([belb])
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Belb <>0
GROUP BY CVR
?
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
> Hi Jacco
> You're right that there could be an issue here. The biggest value seems to
> be 33.213.057,179999199 but even though I change the [Amount] and [
;Belb]
> definition for my temp table to e.g. (Decimal 25,12) it still gives me the
> error.
> Regards
> Steen
>
> Jacco Schalkwijk wrote:
>|||Hi Jacco
I got the problem solved - and it was the definition of the Decimal column
that wasn't big enough. First time I changed the definition I just changed
the syntax for CREATE TABLE.... - but I actually missed to re-create the
table.....doohhhh.....;-).
Thanks for you help.....it was spot on....
Regards
Steen
Jacco Schalkwijk wrote:[vbcol=seagreen]
> Can you post the result of:
> SELECT CVR, SUM([Amount]), SUM([belb])
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
> AND Belb <>0
> GROUP BY CVR
> ?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
Problem with Insert statement - Arithmetic overflow
I'm trying to do a script that can combine data from different databases and
then present them in a list to for some payment purposes. I have little
problem though with a small bit of the script.
The following small part of the script works fine :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([beløb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Beløb <>0
GROUP BY CVR , beløb
This is part works fine - I get 1731 records inserted into my temp table.
I'd like to get the records grouped a little bit further though, so I've
tried with the modification below :
Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
SELECT SUM([Amount]), SUM([beløb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Beløb <>0
GROUP BY CVR
Here I just remove the "beløb" column in the GROUP BY clause and now I get
the following error :
"Arithmetic overflow error converting float to data type numeric.
The statement has been terminated."
I don't quite understand why I get this error message since it's the same
values I'm trying to insert in both cases.
If I just do a -
SELECT SUM([Amount]), SUM([beløb]), CVR
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Beløb <>0
GROUP BY CVR
- I get 129 records which looks fine and looks like what I want.
The spe_temp..LonSum table is created as -
CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
I hope that some of you can shed some light on this?
Regards
SteenThe greatest amount you can store in a decimal(9,2) column is 9,999,999.99.
Is the sum for one of the CVR's you group by greater than that?
--
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
> Hi
> I'm trying to do a script that can combine data from different databases
> and
> then present them in a list to for some payment purposes. I have little
> problem though with a small bit of the script.
> The following small part of the script works fine :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([beløb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Beløb <>0
> GROUP BY CVR , beløb
> This is part works fine - I get 1731 records inserted into my temp table.
> I'd like to get the records grouped a little bit further though, so I've
> tried with the modification below :
> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
> SELECT SUM([Amount]), SUM([beløb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Beløb <>0
> GROUP BY CVR
> Here I just remove the "beløb" column in the GROUP BY clause and now I get
> the following error :
> "Arithmetic overflow error converting float to data type numeric.
> The statement has been terminated."
> I don't quite understand why I get this error message since it's the same
> values I'm trying to insert in both cases.
> If I just do a -
> SELECT SUM([Amount]), SUM([beløb]), CVR
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
> Beløb <>0
> GROUP BY CVR
> - I get 129 records which looks fine and looks like what I want.
> The spe_temp..LonSum table is created as -
> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb Decimal(9,2),
> CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
> Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
> numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
> I hope that some of you can shed some light on this?
> Regards
> Steen
>|||Hi Jacco
You're right that there could be an issue here. The biggest value seems to
be 33.213.057,179999199 but even though I change the [Amount] and [Beløb]
definition for my temp table to e.g. (Decimal 25,12) it still gives me the
error.
Regards
Steen
Jacco Schalkwijk wrote:
> The greatest amount you can store in a decimal(9,2) column is
> 9,999,999.99. Is the sum for one of the CVR's you group by greater
> than that?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
>> Hi
>> I'm trying to do a script that can combine data from different
>> databases and
>> then present them in a list to for some payment purposes. I have
>> little problem though with a small bit of the script.
>> The following small part of the script works fine :
>> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR , beløb
>> This is part works fine - I get 1731 records inserted into my temp
>> table. I'd like to get the records grouped a little bit further
>> though, so I've tried with the modification below :
>> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR
>> Here I just remove the "beløb" column in the GROUP BY clause and now
>> I get the following error :
>> "Arithmetic overflow error converting float to data type numeric.
>> The statement has been terminated."
>> I don't quite understand why I get this error message since it's the
>> same values I'm trying to insert in both cases.
>> If I just do a -
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR
>> - I get 129 records which looks fine and looks like what I want.
>> The spe_temp..LonSum table is created as -
>> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb
>> Decimal(9,2), CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
>> Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
>> numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
>> I hope that some of you can shed some light on this?
>> Regards
>> Steen|||Can you post the result of:
SELECT CVR, SUM([Amount]), SUM([beløb])
FROM Excel...Grundlag$
WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0 AND
Beløb <>0
GROUP BY CVR
?
--
Jacco Schalkwijk
SQL Server MVP
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
> Hi Jacco
> You're right that there could be an issue here. The biggest value seems to
> be 33.213.057,179999199 but even though I change the [Amount] and [Beløb]
> definition for my temp table to e.g. (Decimal 25,12) it still gives me the
> error.
> Regards
> Steen
>
> Jacco Schalkwijk wrote:
>> The greatest amount you can store in a decimal(9,2) column is
>> 9,999,999.99. Is the sum for one of the CVR's you group by greater
>> than that?
>>
>> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
>> news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
>> Hi
>> I'm trying to do a script that can combine data from different
>> databases and
>> then present them in a list to for some payment purposes. I have
>> little problem though with a small bit of the script.
>> The following small part of the script works fine :
>> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR , beløb
>> This is part works fine - I get 1731 records inserted into my temp
>> table. I'd like to get the records grouped a little bit further
>> though, so I've tried with the modification below :
>> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR
>> Here I just remove the "beløb" column in the GROUP BY clause and now
>> I get the following error :
>> "Arithmetic overflow error converting float to data type numeric.
>> The statement has been terminated."
>> I don't quite understand why I get this error message since it's the
>> same values I'm trying to insert in both cases.
>> If I just do a -
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR
>> - I get 129 records which looks fine and looks like what I want.
>> The spe_temp..LonSum table is created as -
>> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb
>> Decimal(9,2), CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
>> Periode Int, Sats int, Areal_total numeric(9,2), Areal_andelsbolig
>> numeric(9,2), Procent numeric(9,2), LoenSumBeloeb decimal(9,2) )
>> I hope that some of you can shed some light on this?
>> Regards
>> Steen
>|||Hi Jacco
I got the problem solved - and it was the definition of the Decimal column
that wasn't big enough. First time I changed the definition I just changed
the syntax for CREATE TABLE.... - but I actually missed to re-create the
table.....doohhhh.....;-).
Thanks for you help.....it was spot on....
Regards
Steen
Jacco Schalkwijk wrote:
> Can you post the result of:
> SELECT CVR, SUM([Amount]), SUM([beløb])
> FROM Excel...Grundlag$
> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
> AND Beløb <>0
> GROUP BY CVR
> ?
>
> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
> news:Oixs1L2PFHA.1176@.TK2MSFTNGP12.phx.gbl...
>> Hi Jacco
>> You're right that there could be an issue here. The biggest value
>> seems to be 33.213.057,179999199 but even though I change the
>> [Amount] and [Beløb] definition for my temp table to e.g. (Decimal
>> 25,12) it still gives me the error.
>> Regards
>> Steen
>>
>> Jacco Schalkwijk wrote:
>> The greatest amount you can store in a decimal(9,2) column is
>> 9,999,999.99. Is the sum for one of the CVR's you group by greater
>> than that?
>>
>> "Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
>> news:ejWLt61PFHA.3788@.tk2msftngp13.phx.gbl...
>> Hi
>> I'm trying to do a script that can combine data from different
>> databases and
>> then present them in a list to for some payment purposes. I have
>> little problem though with a small bit of the script.
>> The following small part of the script works fine :
>> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR , beløb
>> This is part works fine - I get 1731 records inserted into my temp
>> table. I'd like to get the records grouped a little bit further
>> though, so I've tried with the modification below :
>> Insert into spe_temp..LonSum (Amount_, Beloeb,CVR)
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR
>> Here I just remove the "beløb" column in the GROUP BY clause and
>> now I get the following error :
>> "Arithmetic overflow error converting float to data type numeric.
>> The statement has been terminated."
>> I don't quite understand why I get this error message since it's
>> the same values I'm trying to insert in both cases.
>> If I just do a -
>> SELECT SUM([Amount]), SUM([beløb]), CVR
>> FROM Excel...Grundlag$
>> WHERE PERIODE IN (@.Per_date3,@.Per_date2, @.Per_date1) AND amount <>0
>> AND Beløb <>0
>> GROUP BY CVR
>> - I get 129 records which looks fine and looks like what I want.
>> The spe_temp..LonSum table is created as -
>> CREATE TABLE spe_temp..Lonsum (Amount_ decimal(9,2), Beloeb
>> Decimal(9,2), CVR varchar(10)COLLATE SQL_Danish_Pref_CP1_CI_AS ,
>> Periode Int, Sats int, Areal_total numeric(9,2),
>> Areal_andelsbolig numeric(9,2), Procent numeric(9,2),
>> LoenSumBeloeb decimal(9,2) )
>> I hope that some of you can shed some light on this?
>> Regards
>> Steen
problem with If Exist select
vbsscript that queries a sql 2005 database to see if a record exists
and if so update some values and if it doesn't then insert an entry. On
the If Exists(Select * FROM HDW WHERE UserID = " & strID & ") line I'm
getting the following error:
Char: 11
Error: Syntax error
Code: 800a03ea
Can anyone tell me what I'm doing wrong.
Thanks.
Set objCon = CreateObject("adodb.connection")
objCon.Open("Driver={SQL Server}; Server=NDS-SQL2005; Database=User;
uid=something; pwd=something")
on error resume Next
If Exists(Select * FROM HDW WHERE UserID = " & strID & ")
strSQL = "UPDATE HDW SET IPAddress = '" & strIP & "' AND (MAC = '" &
strMac & "') AND (Processor = " & strProc & ") And (Memory =" & strMem
& ")"
Else
strSQL = "insert into HDW(UserID, IPAddress, MAC, Processor, Memory) "
& _
"values ('" & strID & "', '" & strIP & "', '" & strMac & "', " &
strProc & ", " & strMem & ")"
End If
if err.number <> 0 then
msgbox err.description
end if
on error resume next
objCon.Execute(strSQL)
if err.number <> 0 then
msgbox err.description
end if
objCon.Closemcgrew.michael@.gmail.com wrote:
> Have patience, I'm just a script kiddie. I'm trying to write a
> vbsscript that queries a sql 2005 database to see if a record exists
> and if so update some values and if it doesn't then insert an entry. On
> the If Exists(Select * FROM HDW WHERE UserID = " & strID & ") line I'm
> getting the following error:
> Char: 11
> Error: Syntax error
> Code: 800a03ea
> Can anyone tell me what I'm doing wrong.
> Thanks.
>
> Set objCon = CreateObject("adodb.connection")
> objCon.Open("Driver={SQL Server}; Server=NDS-SQL2005; Database=User;
> uid=something; pwd=something")
> on error resume Next
> If Exists(Select * FROM HDW WHERE UserID = " & strID & ")
> strSQL = "UPDATE HDW SET IPAddress = '" & strIP & "' AND (MAC = '" &
> strMac & "') AND (Processor = " & strProc & ") And (Memory =" & strMem
> & ")"
> Else
> strSQL = "insert into HDW(UserID, IPAddress, MAC, Processor, Memory) "
> & _
> "values ('" & strID & "', '" & strIP & "', '" & strMac & "', " &
> strProc & ", " & strMem & ")"
>
instead of using if exits (select...........)
u should open a recordset of this SQL query and check condition....
let say if Rst as recorset..
then ur statement should be like this
if Rst.eof then
strSQL = "UPDATE HDW SET IPAddress = '" & strIP & "' AND (MAC =
'" &
strMac & "') AND (Processor = " & strProc & ") And (Memory =" &
strMem
& ")"
else
....|||Better yet, put stored procedures in your database and call them from VB.
Pass criteria using the parameters objects. Dynamic SQL can get you into
all kinds of problems.
Also, you can include all of this logic in a single stored procedure and
make one call to the database, rather than having the VB app checking all of
this logic on the client. You need to look at the type of logic you need to
enforce and determine whether to do this on the client app or the database,
but it is worth considering.
SQL Injection and Parameters:
http://www.sqlservercentral.com/col...ectionpart1.asp
http://www.sqlservercentral.com/col...qlinjection.asp
Dynamic SQL in stored procedures:
http://www.sommarskog.se/dynamic_sql.html
"SQL-Star (Rajeev Shukla)" <dreams.alot@.gmail.com> wrote in message
news:1145465365.635163.158830@.e56g2000cwe.googlegroups.com...
> mcgrew.michael@.gmail.com wrote:
> instead of using if exits (select...........)
> u should open a recordset of this SQL query and check condition....
> let say if Rst as recorset..
> then ur statement should be like this
> if Rst.eof then
> strSQL = "UPDATE HDW SET IPAddress = '" & strIP & "' AND (MAC =
> '" &
> strMac & "') AND (Processor = " & strProc & ") And (Memory =" &
> strMem
> & ")"
> else
> ....
>
Tuesday, March 20, 2012
Problem with generating stored procedures from script
I am generating sored procedures from my script. It contains about 90 of
them, but for few I get a warning like:
"Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'STP_Set'. The stored procedure will still be
created."
What does it mean and can it cause some problems?
How to eliminate it?
Thank you.
PrzemoThis warning message is issued when a stored procedure is compiled but the
compiler cannot find all of the dependent stored procedures it references.
For example, if SPa calls SPb but SPb is compiled before SPa, you will
receive the warning. To eliminate the message, you need to compile all of
your procedures in dependency order.
--Brian
(Please reply to the newsgroups only.)
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3D491C7D-3CEF-4161-8DCA-188BE1D37A83@.microsoft.com...
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still
> be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo|||The stored procedure refers to another stored procedure that doesn't exist.
It is only a warning. If
you don't want that warning, you need to create the procedures in the right
order.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3D491C7D-3CEF-4161-8DCA-188BE1D37A83@.microsoft.com...
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still b
e
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo|||You referenced an object named 'STP_Set' which doesn′t exists at the
execution of the create procedure script. If the table is created later in
the script you can ignore this message, otherwise you have to create this
objects (Manually or via script).
--
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Przemo" wrote:
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still b
e
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo|||you may like to try a database build and see if you have anything broken in
your database - try DB Ghost (http://www.dbghost.com) - it has a build
component that takes a set of scripts, figures out the order and builds a
database which will quickly show you if you have any breakages.
regards,
Mark Baekdal
MSN m_baekdal@.hotmail.com
+44 (0)141 416 1490
+44 (0)208 241 1762
http://www.dbghost.com
http://www.innovartis.co.uk
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Przemo" wrote:
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still b
e
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo
Problem with generating stored procedures from script
I am generating sored procedures from my script. It contains about 90 of
them, but for few I get a warning like:
"Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'STP_Set'. The stored procedure will still be
created."
What does it mean and can it cause some problems?
How to eliminate it?
Thank you.
PrzemoThis warning message is issued when a stored procedure is compiled but the
compiler cannot find all of the dependent stored procedures it references.
For example, if SPa calls SPb but SPb is compiled before SPa, you will
receive the warning. To eliminate the message, you need to compile all of
your procedures in dependency order.
--
--Brian
(Please reply to the newsgroups only.)
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3D491C7D-3CEF-4161-8DCA-188BE1D37A83@.microsoft.com...
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still
> be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo|||The stored procedure refers to another stored procedure that doesn't exist. It is only a warning. If
you don't want that warning, you need to create the procedures in the right order.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3D491C7D-3CEF-4161-8DCA-188BE1D37A83@.microsoft.com...
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo|||You referenced an object named 'STP_Set' which doesn´t exists at the
execution of the create procedure script. If the table is created later in
the script you can ignore this message, otherwise you have to create this
objects (Manually or via script).
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Przemo" wrote:
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo|||you may like to try a database build and see if you have anything broken in
your database - try DB Ghost (http://www.dbghost.com) - it has a build
component that takes a set of scripts, figures out the order and builds a
database which will quickly show you if you have any breakages.
regards,
Mark Baekdal
MSN m_baekdal@.hotmail.com
+44 (0)141 416 1490
+44 (0)208 241 1762
http://www.dbghost.com
http://www.innovartis.co.uk
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Przemo" wrote:
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo
Problem with generating stored procedures from script
I am generating sored procedures from my script. It contains about 90 of
them, but for few I get a warning like:
"Cannot add rows to sysdepends for the current stored procedure because it
depends on the missing object 'STP_Set'. The stored procedure will still be
created."
What does it mean and can it cause some problems?
How to eliminate it?
Thank you.
Przemo
This warning message is issued when a stored procedure is compiled but the
compiler cannot find all of the dependent stored procedures it references.
For example, if SPa calls SPb but SPb is compiled before SPa, you will
receive the warning. To eliminate the message, you need to compile all of
your procedures in dependency order.
--Brian
(Please reply to the newsgroups only.)
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3D491C7D-3CEF-4161-8DCA-188BE1D37A83@.microsoft.com...
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still
> be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo
|||The stored procedure refers to another stored procedure that doesn't exist. It is only a warning. If
you don't want that warning, you need to create the procedures in the right order.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Przemo" <Przemo@.discussions.microsoft.com> wrote in message
news:3D491C7D-3CEF-4161-8DCA-188BE1D37A83@.microsoft.com...
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo
|||You referenced an object named 'STP_Set' which doesn′t exists at the
execution of the create procedure script. If the table is created later in
the script you can ignore this message, otherwise you have to create this
objects (Manually or via script).
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Przemo" wrote:
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo
|||you may like to try a database build and see if you have anything broken in
your database - try DB Ghost (http://www.dbghost.com) - it has a build
component that takes a set of scripts, figures out the order and builds a
database which will quickly show you if you have any breakages.
regards,
Mark Baekdal
MSN m_baekdal@.hotmail.com
+44 (0)141 416 1490
+44 (0)208 241 1762
http://www.dbghost.com
http://www.innovartis.co.uk
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Przemo" wrote:
> Hi,
> I am generating sored procedures from my script. It contains about 90 of
> them, but for few I get a warning like:
> "Cannot add rows to sysdepends for the current stored procedure because it
> depends on the missing object 'STP_Set'. The stored procedure will still be
> created."
> What does it mean and can it cause some problems?
> How to eliminate it?
> Thank you.
> Przemo
Monday, March 12, 2012
Problem with Failure Constraint
Hi,
As part of my SSIS package I have a script task, that set its result based on the value of a package variable. From this task I have two precedence constraints, a sucess constrain and failure constraint that lead to two different tasks.
When the script task ends with a success result, the task that is connected by the success constraint is initiated, but when the script task ends with a failure result, it is marked with red color and the execution of the whole package stops (the next task that is connected by the failure constraint is not initiated).
All tasks are assigned with False to the properties: FailPackageOnFailure & FailParentOnFailure
Please assist.
Hmmmm....strange!
Can you post the contents of the .dtsx file up here so we can repro?
If you could take out all external references (e.g. connection managers, configurations, etc...) it'd be a big help!
Thanks
Jamie
|||Is there a way to attach the file?|||Have you increased MaxErrorCount property? (I don't remember the details of interactions between it and other two properties, but try increasing it).|||Thanks for you help.
I believe I solved the problem: the task, that was connected to the script task by the failure constraint, could be executed also as an error handling task of another task, therefore all faliure constraints should have LogicalAnd property set to False.
Friday, March 9, 2012
Problem with dtutil hanging
I am using a script to copy a number of packages (50+) from my desktop computer (file system) to a remote server (MSDB). The script works fine, but I can never get through the entire script without it hanging up. Some times only 3-4 packages get copied, sometimes a lot more. If I close the windows cmd window and restart at the point it hung, it continues, but usually hangs up again. If you repeat this 2 or 3 times, it eventually gets all of the packages copied. It does not always hang at the same point. I have tried doing the copies with "quiet" mode - overwriting the existing packages and I have tried first deleting the packages, then copying - doesn't make a difference. I have also tried moving the packages to a couple of different installations of SQL Server 2005 using the script - the remote one and the local one on my desktop - same thing on both.
If I have the script echo a message just after each copy, the message just after the last successful copy never appears (and I know the copy is successful, because I deleted all the packages first and have checked that the package is there after the script hangs).
The copy command I am using look like this:
dtutil /FILE %1 /Decrypt %3 /Encrypt SQL;%~n1;2;%3 /DestServer %4 /DestUser admincis /DestPassword %2 /quiet
ECHO Done deploying package %~n1
%1 is the file spec of the ".dtsx" file to be copied
%2 is the password of the user account on the server
%3 is the encryption password (same one used on both ends)
%4 is the name of the server being copied to
Any ideas?
Jane Gaby
One addition to my original post. I just tried this from a different computer - copied the .dtsx files over and the scripts and ran from there with no problem - no hangup. The computer I used was another server, not a desktop. Anyway it looks like the problem is perhaps with my desktop.
Jane Gaby
Wednesday, March 7, 2012
Problem with droping users, please help
I'm trying to write a script that will make sure the user accounts are set up correctly after de attaching a database moving it to another machine and reattaching it. The problem is the user example1 had a login Name of example1 but after I've copied it over and re attached it the user example1 has No user at all, throught EM all I have to do is Delete the Database user and recreate it correctly, but We need to do this as part on a script, However I don't seem to be able to do the same thing through SQL.
The way I was attempting to drop and recreate the user was like this:
Execute sp_dropuser example1
Execute sp_addlogin example1
Execute sp_adduser example1
Execute sp_addrolemember @.rolename = db_datareader, @.membername = example1
Execute sp_addrolemember @.rolename = db_datawriter, @.membername = example1
However it comes back with this error:
Server: Msg 15175, Level 16, State 1, Procedure sp_droplogin, Line 93
Login 'example1' is aliased or mapped to a user in one or more database(s). Drop the user or alias before dropping the login.
Server: Msg 15025, Level 16, State 1, Procedure sp_addlogin, Line 56
The login 'example1' already exists.
Does any one now how I can get it too work like the EM version!
My eternal gratitude, NixiesYou need to exec sp_grantdbaccess first before you do exec sp_addrolemember.|||Originally posted by joejcheng
You need to exec sp_grantdbaccess first before you do exec sp_addrolemember.
Just doubled checked, dbaccess is fine and the sp_addrolemember went through with out any errors. My big problem is that I can't drop the user to recreate them. Any ideas?|||I had a similar problem a while back and was able to use the procedures from Microsoft to fix. Check out:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;298897.
Basically, you need to resynchronize the login SID's before you can perform any security edits. Hope this helps.