[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:

SQL DB / GAL update job

I have a GAL update job that seems to be failing due to a SQL issue...Attached is the last 50 lines of the job.

I'm  guessing that is has to do with the below...just not sure how to fix it.
 
Line 278
Cannot insert the value NULL into column 'GALLogon', table 'PSInterfaces.dbo.AddressBookTitle'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Error Message in the ErrMsg variable: 
Error on exec of PSInterfaces.dbo.GALUpdate proc.  
                                      
--------------------------------------------------------- 
----------- Last 50 lines from galupdate.ops ---------- 
--------------------------------------------------------- 
                                      
[ 2:00:23.16] >if errorlevel 1 set errmsg=BCP errors on load of GAL employee data to PSInterfaces   && goto Problem 
 
[ 2:00:23.16] >ntbecho /Log Checking size of BCP error file: WorkAddressBookTitle.bcp.err 
02:00:23: Checking size of BCP error file: WorkAddressBookTitle.bcp.err
 
[ 2:00:23.24] >sizechk.exe WorkAddressBookTitle.bcp.err 0 100   1>NUL 
 
[ 2:00:23.24] >if errorlevel 1 set errmsg=BCPErrorFile: WorkAddressBookTitle.bcp.err is too large after load of GAL data to PSInterfaces   && goto Problem 
 
[ 2:00:23.24] >ntbecho /Log Generating AD Users extract 
02:00:23: Generating AD Users extract
 
[ 2:00:23.30] >cscript GetADUsers.vbs //nologo 
 
[ 2:02:18.96] >if errorlevel 1 set errmsg=Generating AD Users extract   && goto Problem 
 
[ 2:02:18.96] >ntbecho /Log Copying AD Users extract to archives folder 
02:02:19: Copying AD Users extract to archives folder
 
[ 2:02:19.04] >copy ADUsers*.txt \\BEL-PFS-02\dataexchange\GALPSFT\ADUsersArchive /Y 
ADUsers 2008-10-23.txt
        1 file(s) copied.
 
[ 2:02:27.97] >if errorlevel 1 set errmsg=Copying AD Users extract to archives folder   && goto Problem 
 
[ 2:02:27.97] >ntbecho /Log Calling Sproc: CHC-SQLSHR05.PSInterfaces.dbo.GALUpdate 
02:02:28: Calling Sproc: CHC-SQLSHR05.PSInterfaces.dbo.GALUpdate
 
[ 2:02:28.04] >osql /SCHC-SQLSHR05 /dPSInterfaces /E /n /h-1 -w 255 /b /Q"exec dbo.GALUpdate" 
2008-10-23 02:02:28.727 PSInterfaces.GALUpdate - Calling sp_ProcessLogInit
2008-10-23 02:02:28.743 PSInterfaces.GALUpdate - Calling sp_ProcessLogInit, RowCount: 1
2008-10-23 02:02:28.743 PSInterfaces.GALUpdate - Confirming records exist in WorkAddressBookTitle
2008-10-23 02:02:28.760 PSInterfaces.GALUpdate - Confirming records exist in WorkAddressBookTitle, RowCount: 6355
2008-10-23 02:02:28.773 PSInterfaces.GALUpdate - Beginning transaction.
2008-10-23 02:02:28.773 PSInterfaces.GALUpdate - Deleting all records from dbo.AddressBookTitle
2008-10-23 02:02:28.883 PSInterfaces.GALUpdate - Deleting all records from dbo.AddressBookTitle, RowCount: 6362
2008-10-23 02:02:28.883 PSInterfaces.GALUpdate - Inserting preliminary data into AddressBookTitle
Msg 515, Level 16, State 2, Server CHC-SQLSHR05, Procedure GALUpdate, Line 278
Cannot insert the value NULL into column 'GALLogon', table 'PSInterfaces.dbo.AddressBookTitle'; column does not allow nulls. INSERT fails.
The statement has been terminated.
2008-10-23 02:02:28.977 PSInterfaces.GALUpdate - Rolling back transaction
Msg 50000, Level 16, State 1, Server CHC-SQLSHR05, Procedure sp_RaiseMsg, Line 159
2008-10-23 02:02:29.070 PSInterfaces.GALUpdate - ERROR on last Action: Inserting preliminary data into AddressBookTitle, Error: 515, RowCount: 0
 
[ 2:02:29.10] >if errorlevel 1 SET errmsg=Error on exec of PSInterfaces.dbo.GALUpdate proc.   && GOTO Problem 
 
[ 2:02:29.10] >ntbecho /Log Error in  Error on exec of PSInterfaces.dbo.GALUpdate proc.  
02:02:29: Error in Error on exec of PSInterfaces.dbo.GALUpdate proc.
 
[ 2:02:29.16] >errhandl.cmd

Open in new window

0
CG_HD
Asked:
CG_HD
1 Solution
 
MohammedUCommented:
It is a data issue, you need check with your data...

Error says in simple way that it can't insert NULL into a column which doesn't allow NULL...so check and change the data and rerun your proc/script...
0
 
CG_HDAuthor Commented:
thanks MohammedU...the issue was related to extension Attribute4 being set in some contact entries which was breaking the job.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now