MAX 4.2.1 Error?
Hi!
Upon LV 8.2.1 (along with RT & FPGA modules) setup,
when "Software" in "My System" is clicked, MAXplorer just spit out the following Message (see attachments)!
Suggestions, comments ...
...and Thanx in advance!
Attachments:
Message.JPG 20 KB
Have a look here:
http://digital.ni.com/public.nsf/allkb/B9107A7F281F9B408625720B0078E5A8
Vladimir
Similar Messages
-
MAX encountered an unexpected error
need help how can i fix max ?max version 5.0
C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Logs\20111014_145326-NIMax-00000CAC.dmp
The niVISAui.mxx plug-in caused an exception in the CmxAggregateItemUI::InvokeCommand function in the NIMax process.
See these files for details:
C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Logs\20111014_145322-NIMax-00000CAC.log
C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Logs\20111014_145322-NIMax-00000CAC.dmp
The niVISAui.mxx plug-in caused an exception in the CmxAggregateItemUI::InvokeCommand function in the NIMax process.
See these files for details:
C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Logs\20111014_145324-NIMax-00000CAC.log
C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Logs\20111014_145324-NIMax-00000CAC.dmp
The exception occurred in the NIMax process in the function (Unknown).
See these files for details:
C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Logs\20111014_145326-NIMax-00000CAC.log
Solved!
Go to Solution.
Attachments:
untitled.JPG 107 KBHi,
Does this error message affect the functionality of MAX?
Regards,
Mike Altmann
LabVIEW Platform PSE
National Instruments -
Max-DB 7.5 Error, Can't make it Offline
Hello all,
I am trying to upgrade my MaxDb 7.5 to 7.6 patch level 18. Before doing this as per the SAP notes I need to make the Max-DB offline using the dbmcli > db_offline command. But when I issue this command using sqd<SID> user then it given me error which is as follows:
"Error! Connection failed to node (local) for database ACP: ERR_USRFAIL: user authorization failed" I tried to issue this command using <SID>adm and even root, but still I get the same error.
Kindly help me to resolve this issue.
Regards,
Premkishan ChourasiaHi,
you have to use a DB user to connect with using DMBCLI. For admin purposes, this is the DBM user, normally called 'control'. You should be able to connect to your db with the following syntax:
dbmcli -n <host> -d <DB name> -u <DBM-user>,<password>
Example:
dbmcli -d SDB -u control,control
(in the above example, I did not need to specify a hostname, because the db instance is on the local machine)
The above dbmcli-command will put you in a DBMCLI-session, you can then enter other commands, including your db_offline.
Ofcourse you may also directly use:
dbmcli -d SDB -u control,control db_offline.
Please let me know if this worked out for you.
Regards,
Roland -
MAX RT Target Update Error nipal.err file not found
when trying to run a test on the daq assistant, receive error stsing that drivers don't match on RT target and host. When try to reinstall NI-DAQmx 7.2.0 get error file not found ...\NI-PAL\1.8.2.3.0\nipal.err. I checked, the file is not there.
Hello,
I don't understand if you get this when trying to reinstall DAQmx on your computer or in the RT box.
I am trying to download the software to the RT target from the host (MAX Real Time Software Install Wizard).
you might want to try uninstalling all the software and then reinstalling it. If it is reinstalling in your computer, I would first try to uninstall the driver and then reinstall it. If that doesn't fix it, you can try upgrading NI-VISA and that should install the latest version of the driver you are missing. Then install DAQmx
I tried to uninstall and reinstall DAQmx on the RT target but receive the nipal.err file not found error (the file it is looking for should be on the host). I tried to reinstall VISA on the RT Target and also receive a file not found error: error reading from local disk visa-eng.err.
So no luck as of yet with the DAQmx
Tom -
HT201320 Max iphone 5 email error message
(the user name or password for "imap.mail.yahoo.com" is incorrect) this an error message i get on my iphone5 when I try to get my email has any body ever had this problem?
Hello Max from Houston,TX,
Thanks for using Apple Support Communities.
For more information on this, take a look at:
iOS: Troubleshooting Mail
http://support.apple.com/kb/ts3899
Verify if you can sign into yahoo and get your mail from their website.
Best of luck,
Mario -
Max-beans-in-cache ==== Error
Hi all,
I have a entity bean with max-beans-in-cache=5000 and one of the findByXXX fetches
more than that and the application stops with an exception. Is there anyway or
a strategy to follow when cases like this where the records of find exceeds the
max limit. This is a huge data process application and we tried to do maximum
filters to reduce the records to minimal.
Please help me with your thoughts or ideas to .. how to avoid or is there any
deployment time argument .. etc
using WL 7.0
Thanks
-arunIf you just invoke the finder, then the container should not complain
about bringing back > max-beans-in-cache elements. However if you try
to enlist > max-beans-in-cache beans in a transaction, it will throw a
CacheFull.
One way to avoid this is to limit your maxRows returned by the finder.
This can be done in the CMP descriptor.
-- Rob
Arun nair wrote:
Hi all,
I have a entity bean with max-beans-in-cache=5000 and one of the findByXXX fetches
more than that and the application stops with an exception. Is there anyway or
a strategy to follow when cases like this where the records of find exceeds the
max limit. This is a huge data process application and we tried to do maximum
filters to reduce the records to minimal.
Please help me with your thoughts or ideas to .. how to avoid or is there any
deployment time argument .. etc
using WL 7.0
Thanks
-arun -
I'm trying to create a development machine where we can test new code without using our physical hardware. I've followed this guide in setting up a simulated device. I can get to step 3.2b, but the device does not show up in the DAQ assistant. In MAX, the device self tests and self calibrates successfully, and when I open the test panels, I see some sort of signal. I assume this is a default simulated input since I haven't told the device to look for anything? Note that the two devices I'm trying to create show up in the Devices and Interfaces section, but that even after running Self-Calibrate, the Self-Calibration date is still unspecified.
When I try to test the device and create a voltage input according to the guide, I am unable to see either device in the DAQ task creator.
Steps 1 and 2 of this guide are obviously satisfied. Step 3 is not, but this is unsurprising since a simulated device wouldn't be found in the Device Manager anyways. Also, I am not running RT, so step 4 is satisfied.
Does anyone have any ideas?
Solved!
Go to Solution.That would be because the PXI 5124 is a digitizer not a analog input device. You need to use the NI SCOPE driver not NI DAQmx
Jeff -
Getting error while taking MAX DB trans log backup.
Hi,
I am getting error while taking trans log backup of Maxdb database for archived log through data protector as below,
[Critical] From: OB2BAR_SAPDBBAR@ttcmaxdb "MAX" Time: 08/19/10 02:10:41
Unable to back up archive logs: no autolog medium found in media list
But i am able to take complete data and incremental backup through data protector.
I have already enabled the autolog for MAX DB database and it is writing that log file directly to HP-UX file system. Now i want to take backup of this archived log backup through data protector i.e. through trans log backup. So that the archived log which is on the file system after trans log backup completed will delete the archived logs in filesystem. So that i don;t have to manually delete the archived logs from file system.
Thanks,
SubbaHi Lars,
Thanks for the reply...
Now i am able to take archive log backup but the problem is i can take only one archive file backup. Not multiple arhive log files generated by autolog at filesystem i.e /sapdb/MAX/saparch.
I have enabled autolog and it is putting auto log file at unix directory i.e. /sapdb/MAX/saparch
And then i am using the DataProtector 6.11 with trans log backup to backup the archived files in /sapdb/MAX/saparch. When i start the trans backup session through data protector it uses the archive stage command as "archive_stage BACKDP-Archive LOGBackup NOVERIFY REMOVE" If /sapdb/MAX/saparch has only one archive file it will backup and remove the file successfully. But if /sapdb/MAX/saparch has multiple archive files it gives an error as below,
Preparing backup.
Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
Setting environment variable 'BI_REQUEST' to value 'OLD'.
Setting environment variable 'BI_BACKUP' to value 'ARCHIVE'.
Constructed Backint for MaxDB call '/opt/omni/lbin/sapdb_backint -u MAX -f backup -t file -p SAPDB.13576.1283767878.par -i /var/opt/omni/tmp/MAX.
bsi_in -c'.
Created temporary file '/var/opt/omni/tmp/MAX.bsi_out' as output for Backint for MaxDB.
Created temporary file '/var/opt/omni/tmp/MAX.bsi_err' as error output for Backint for MaxDB.
Writing '/sapdb/data/wrk/MAX/dbm.ebf' to the input file.
Writing '/sapdb/data/wrk/MAX/dbm.knl' to the input file.
Prepare passed successfully.
Starting Backint for MaxDB.
Starting Backint for MaxDB process '/opt/omni/lbin/sapdb_backint -u MAX -f backup -t file -p SAPDB.13576.1283767878.par -i /var/opt/omni/tmp/MAX.
bsi_in -c >>/var/opt/omni/tmp/MAX.bsi_out 2>>/var/opt/omni/tmp/MAX.bsi_err'.
Process was started successfully.
Backint for MaxDB has been started successfully.
Waiting for the end of Backint for MaxDB.
2010-09-06 03:15:21 The backup tool is running.
2010-09-06 03:15:24 The backup tool process has finished work with return code 0.
Ended the waiting.
Checking output of Backint for MaxDB.
Have found all BID's as expected.
Have saved the Backup History files successfully.
Cleaning up.
Removing data transfer pipes.
Removing data transfer pipe /var/opt/omni/tmp/MAX.BACKDP-Archive.1 ... Done.
Removed data transfer pipes successfully.
Copying output of Backint for MaxDB to this file.
Begin of output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_out)----
#SAVED 1009067:1 /sapdb/data/wrk/MAX/dbm.ebf
#SAVED 1009067:1 /sapdb/data/wrk/MAX/dbm.knl
End of output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_out)----
Removed Backint for MaxDB's temporary output file '/var/opt/omni/tmp/MAX.bsi_out'.
Copying error output of Backint for MaxDB to this file.
Begin of error output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_err)----
End of error output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_err)----
Removed Backint for MaxDB's temporary error output file '/var/opt/omni/tmp/MAX.bsi_err'.
Removed the Backint for MaxDB input file '/var/opt/omni/tmp/MAX.bsi_in'.
Have finished clean up successfully.
The backup of stage file '/export/sapdb/arch/MAX_LOG.040' was successful.
2010-09-06 03:15:24
Backing up stage file '/export/sapdb/arch/MAX_LOG.041'.
Creating pipes for data transfer.
Creating pipe '/var/opt/omni/tmp/MAX.BACKDP-Archive.1' ... Done.
All data transfer pipes have been created.
Preparing backup tool.
Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
Setting environment variable 'BI_REQUEST' to value 'OLD'.
Setting environment variable 'BI_BACKUP' to value 'ARCHIVE'.
Constructed Backint for MaxDB call '/opt/omni/lbin/sapdb_backint -u MAX -f backup -t file -p SAPDB.13576.1283767878.par -i /var/opt/omni/tmp/MAX.bsi_
in -c'.
Created temporary file '/var/opt/omni/tmp/MAX.bsi_out' as output for Backint for MaxDB.
Created temporary file '/var/opt/omni/tmp/MAX.bsi_err' as error output for Backint for MaxDB.
Writing '/var/opt/omni/tmp/MAX.BACKDP-Archive.1 #PIPE' to the input file.
Prepare passed successfully.
Constructed pipe2file call 'pipe2file -d file2pipe -f /export/sapdb/arch/MAX_LOG.041 -p /var/opt/omni/tmp/MAX.BACKDP-Archive.1 -nowait'.
Starting pipe2file for stage file '/export/sapdb/arch/MAX_LOG.041'.
Starting pipe2file process 'pipe2file -d file2pipe -f /export/sapdb/arch/MAX_LOG.041 -p /var/opt/omni/tmp/MAX.BACKDP-Archive.1 -nowait >>/var/tmp/tem
p1283767880-0 2>>/var/tmp/temp1283767880-1'.
Process was started successfully.
Pipe2file has been started successfully.
Starting Backint for MaxDB.
Starting Backint for MaxDB process '/opt/omni/lbin/sapdb_backint -u MAX -f backup -t file -p SAPDB.13576.1283767878.par -i /var/opt/omni/tmp/MAX.bsi_
in -c >>/var/opt/omni/tmp/MAX.bsi_out 2>>/var/opt/omni/tmp/MAX.bsi_err'.
Process was started successfully.
Backint for MaxDB has been started successfully.
Waiting for end of the backup operation.
2010-09-06 03:15:25 The backup tool process has finished work with return code 2.
2010-09-06 03:15:25 The backup tool is not running.
2010-09-06 03:15:25 Pipe2file is running.
2010-09-06 03:15:25 Pipe2file is running.
2010-09-06 03:15:30 Pipe2file is running.
2010-09-06 03:15:40 Pipe2file is running.
2010-09-06 03:15:55 Pipe2file is running.
2010-09-06 03:16:15 Pipe2file is running.
Killing not reacting pipe2file process.
Pipe2file killed successfully.
2010-09-06 03:16:26 The pipe2file process has finished work with return code -1.
The backup operation has ended.
Filling reply buffer.
Have encountered error -24920:
The backup tool failed with 2 as sum of exit codes and pipe2file was killed.
Constructed the following reply:
ERR
-24920,ERR_BACKUPOP: backup operation was unsuccessful
The backup tool failed with 2 as sum of exit codes and pipe2file was killed.
Reply buffer filled.
Cleaning up.
Removing data transfer pipes.
Removing data transfer pipe /var/opt/omni/tmp/MAX.BACKDP-Archive.1 ... Done.
Removed data transfer pipes successfully.
Copying output of Backint for MaxDB to this file.
Begin of output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_out)----
End of output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_out)----
Removed Backint for MaxDB's temporary output file '/var/opt/omni/tmp/MAX.bsi_out'.
Copying error output of Backint for MaxDB to this file.
Begin of error output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_err)----
End of error output of Backint for MaxDB (/var/opt/omni/tmp/MAX.bsi_err)----
Removed Backint for MaxDB's temporary error output file '/var/opt/omni/tmp/MAX.bsi_err'.
Removed the Backint for MaxDB input file '/var/opt/omni/tmp/MAX.bsi_in'.
Copying pipe2file output to this file.
Begin of pipe2file output (/var/tmp/temp1283767880-0)----
End of pipe2file output (/var/tmp/temp1283767880-0)----
Removed pipe2file output '/var/tmp/temp1283767880-0'.
Copying pipe2file error output to this file.
Begin of pipe2file error output (/var/tmp/temp1283767880-1)----
End of pipe2file error output (/var/tmp/temp1283767880-1)----
Removed pipe2file error output '/var/tmp/temp1283767880-1'.
Have finished clean up successfully.
The backup of stage file '/export/sapdb/arch/MAX_LOG.041' was unsuccessful.
2010-09-06 03:16:26
Cleaning up.
Have encountered error -24919:
Can not remove file '/var/tmp/temp1283767880-0'.
(System error 2; No such file or directory)
Could not remove temporary output file of pipe2file ('/var/tmp/temp1283767880-0' ).
Have encountered error -24919:
Can not remove file '/var/tmp/temp1283767880-1'.
(System error 2; No such file or directory)
Could not remove temporary output file of pipe2file ('/var/tmp/temp1283767880-1' ).
Have finished clean up successfully.
Thanks,
Subba -
Error in File IC Work Order Report_v3-3: Max processing time or Max records
Hello Friends,
While running the Crystal report in Business Object Infoview, I am getting the below mentioned error when i am trying to go to the next page or trying to export all pages of report into PDF and any other format. I can see the first page in output and can export 1st page into PDF.
2010-12-29 17:28:05
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error in File IC Work Order Report_v3-3:
Max processing time or Max records limit reached---- Error code:-2147215357 Error code name:internal
at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.a(Unknown Source)
at com.crystaldecisions.sdk.occa.managedreports.ps.internal.f.getPage(Unknown Source)
at com.businessobjects.report.web.event.q.a(Unknown Source)
at com.businessobjects.report.web.event.q.a(Unknown Source)
at com.businessobjects.report.web.event.bq.a(Unknown Source)
at com.businessobjects.report.web.event.bt.broadcast(Unknown Source)
at com.businessobjects.report.web.event.ak.a(Unknown Source)
at com.businessobjects.report.web.a.p.if(Unknown Source)
at com.businessobjects.report.web.e.a(Unknown Source)
at com.businessobjects.report.web.e.a(Unknown Source)
at com.businessobjects.report.web.e.if(Unknown Source)
at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater.a(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.do(Unknown Source)
at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Please Help.
Thanks,
Ziad KhanOk it looks to me that there are more than 20000 rows in your backend system that have to be fetched.
You can change this limit in the Central Management Console . Login as administrator and go to Servers . Double-click on the Crystal Processign server and change the value in the field Database Records Read When Previewing or Refreshing (0 for unlimited) according to your needs. AFter the change you have to restart the Crystal processing server.
Regards,
Stratos -
Min max planning report errors out
Min max planning is defined at Organization level with the source type as
supplier.
Min max report errors out for restock option "yes".
Following is the error message in the log file
MSG-00069: Calling INV_MMX_WRAPPER_PVT.exec_min_max from Before Report Trigger
MSG-00070: INV_MMX_WRAPPER_PVT.exec_min_max returned an error:
REP-1825: Before Report trigger returned FALSE.
Have checked all the possible causes
1)work day calender
2)Default delivery location
3)profile option.
Also applied a patch for this error
Patch number 4613194
Still the issue persistsHi,
Please review the following notes:
Note: 453956.1 - INVISMMX.RDF - Mix-Max Planning Report Completes Successfully But Receive MSG-00069 in Request Log
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=453956.1
Note: 785813.1 - MSG-00069, MSG-00070 Errors Occurred While Running Min-Max Planning Report
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=785813.1
Note: 275521.1 - Min Max Rep (INVISMMX) Returns Errors MSG-00069, MSG-00070, REP-1825
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=275521.1
Note: 280605.1 - 11i INVISMMX- Error Before Report Trigger Returned False Rep-1825
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=280605.1
Regards,
Hussein -
Not sure if this shouldn't be a Test Stand problem since it happened during deployment but Max supports my VIs.
When I start Max I get this message:Max encountered an unexpected error since it was last run. For more info, visit ni.com/info and enter the Info Code MaxKnownException.
It also gave me this two attahced files.
thanks,
jvh
PS - Had to add .txt to .dmp to get it posted.
Attachments:
20101115_170228-NIMax-00000E7C.log 8 KB
20101115_170228-NIMax-00000E7C.dmp.txt 62 KBjvh75021,
What operating system are you using? What other NI software do you have on your computer and what versions?
You could try running the MAX Database Corruption Removal Tool (requires LV2009+)
http://decibel.ni.com/content/docs/DOC-12805
Or completing the steps in the article below (the Corruption Removal Tool does these steps for you)
http://digital.ni.com/public.nsf/allkb/2C7480E856987FFF862573AE005AB0D9
Regards,
Sam K
Applications Engineer
National Instruments
www.ni.com/support -
MAX error after installing NI DAQ7.0 on Labview6.i
Hello,
I'm working with LV6.i. I recently bought a new PCI-6534 card. This card isn't compatible with Ni Daq6.8 installed with LV6.i, so I changed it by Ni Daq7.0. No problems during installation (in comparison with early attemptions to install Ni Daq 6.9.3 with as result: errors in MAX, no daq icones in LV). No problems in LV; daq icones are still available. But when I open MAX, I get an error involving a read instruction to memory: "LabWindows/CVI: NiMax.exe - error".
I had installed LabWindows on my pc a couple of weeks ago, but I uninstalled it later on.
How can I resolve this problem?
kind regards,
Kevin Van de GaerI think 7.0 is actually DAQmx and the message you are seeing seems to confirm that. I'm not sure why MAX would have an error but you cannot use DAQmx with LabVIEW 6. You need the driver that is now called Traditional NI-DAQ. The latest version is 7.4.4
-
MXI-3 not working get error 10401 from max
get error 10401 when triying to access cards in PXI1000 chassis using MAX test panels
The 10401 error is usually indicative of a problem with a DAQ card, not a MXI-3 card, but anything is possible. I will give you some general tips for troubleshooting the MXI-3 kit, but the DAQ card could ultimately be the problem.
First, do you have the MXI-3 Optimization Software installed? If so, does it run properly on boot up? This software should detect the presence of the MXI-3 link. If the optimization software is having problems running, I would recommend emptying your chassis of all cards but the MXI-3 and try booting up and running the software. If problems persist, you could try changing the PCI slot of your PCI-MXI-3 card, or, if you have other MXI-3 hardware available, you could switch pieces between the kits. You could even try the system with ano
ther PC.
If the MXI-3 kit is working properly, then the DAQ card or the chassis could be causing the problem. Have you tried any other cards behind the MXI-3 link? Have you tried the problematic card in multiple slots? Was the system ever working properly? If you feel the DAQ card is the problem, I would recommend creating a new support thread so that we can get our DAQ Applications Engineers to help you troubleshoot the issue.
Here is a link to more troubleshooting tips for MXI-3:
http://digital.ni.com/public.nsf/websearch/484f81e6570ad803862569ed007aaa41?OpenDocument
Ryan Tamblin
Applications Engineer
National Instruments -
Min and MAx Value in a SELECT Statement
Hi,
I have a scenario where I am Selecting the values BETWEEN MIN and MAX values:
SELECT * FROM ABC WHERE CODE BETWEEN MIN(CODE) AND MAX(CODE)
ITS GETTING Error as:ORA-00934: group function is not allowed here
Any help will be needful for me.select substr(no,1,3)||to_char(substr(no,4,1)+1) "first missing number"
from
with t as
(select 'ABC1' no from dual
union select 'ABC2' from dual
union select 'ABC3' from dual
union select 'ABC5' from dual
union select 'ABC6' from dual
union select 'ABC8' from dual
select no, lead(no,1,0) over (order by no) next_no from t
where substr(next_no,4,1) - substr(no,4,1) > 1
and rownum = 1; -
Error: Partition function can only be created in Enterprise edition of SQL Server
By using the Generate Scripts option in SSMS, I've duplicated this DB seven times so far. I do this due to the 10 Gig limit on Sql Express 2012. I was doing this again today. I generated the script, did a search/replace to provide a new DB name for
DB number eight in the series, and then I ran the script to create the DB, causing the error message. I don't remember seeing this error in the past. It's possible I created the first edition of this DB at home, but back then I only had express edition as
I seem to recall (although I did purchase Developer a few months ago).
I don't even know what the Partition function does. I'll try to look that up tonight.
SSMS did create the DB, I just hope the error message doesn't forebode any problems.
USE [master]
GO
/****** Object: Database [Year2014_Aug_To_Dec] Script Date: 07/29/2014 03:55:19 PM ******/
CREATE DATABASE [Year2014_Aug_To_Dec]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'Year2014_Aug_To_Dec', FILENAME = N'F:\FlatFilesDatabases\Year2014_Aug_To_Dec.mdf' , SIZE = 8832000KB , MAXSIZE = UNLIMITED, FILEGROWTH = 204800KB )
LOG ON
( NAME = N'Year2014_Aug_To_Dec_Log', FILENAME = N'F:\FlatFilesDatabases\Year2014_Aug_To_Dec_Log.ldf' , SIZE = 230400KB , MAXSIZE = 2048GB , FILEGROWTH = 204800KB )
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET COMPATIBILITY_LEVEL = 110
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Year2014_Aug_To_Dec].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET ANSI_PADDING OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET ARITHABORT OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET AUTO_CLOSE ON
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET DISABLE_BROKER
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET RECOVERY SIMPLE
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET MULTI_USER
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET DB_CHAINING OFF
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
USE [Year2014_Aug_To_Dec]
GO
/****** Object: User [NT SERVICE\MSSQL$SQLEXPRESS] Script Date: 07/29/2014 03:55:20 PM ******/
CREATE USER [NT SERVICE\MSSQL$SQLEXPRESS] FOR LOGIN [NT Service\MSSQL$SQLEXPRESS] WITH DEFAULT_SCHEMA=[NT SERVICE\MSSQL$SQLEXPRESS]
GO
/****** Object: User [NT Authority\Authenticated Users] Script Date: 07/29/2014 03:55:20 PM ******/
CREATE USER [NT Authority\Authenticated Users] FOR LOGIN [NT AUTHORITY\Authenticated Users] WITH DEFAULT_SCHEMA=[NT Authority\Authenticated Users]
GO
/****** Object: User [BUILTIN\USERS] Script Date: 07/29/2014 03:55:20 PM ******/
CREATE USER [BUILTIN\USERS] FOR LOGIN [BUILTIN\Users]
GO
/****** Object: Schema [NT Authority\Authenticated Users] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE SCHEMA [NT Authority\Authenticated Users]
GO
/****** Object: Schema [NT SERVICE\MSSQL$SQLEXPRESS] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE SCHEMA [NT SERVICE\MSSQL$SQLEXPRESS]
GO
/****** Object: FullTextCatalog [Catalog1] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE FULLTEXT CATALOG [Catalog1]WITH ACCENT_SENSITIVITY = ON
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_06A2E7C5] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_06A2E7C5](varbinary(128)) AS RANGE LEFT FOR VALUES (0x00390039003200380035, 0x006E006E0033003000320034)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_11A1FB2A] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_11A1FB2A](varbinary(128)) AS RANGE LEFT FOR VALUES (0x006100730073006F006300690061007400650073, 0x006E006E003200320032003700350037003300310030003400300035)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_171D3F63] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_171D3F63](varbinary(128)) AS RANGE LEFT FOR VALUES (0x00610072006900650078006900650074, 0x006E006E003200390035003200330033003400310030)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_1FA6CD15] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_1FA6CD15](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0063006F00720070006F0072006100740069006F006E, 0x006E006E0033003500340031003800390031)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_25DC6753] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_25DC6753](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0061007000700072006F007600650064, 0x006E006E00320033003200380035)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_2B429CF3] Script Date: 07/29/2014 03:55:21 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_2B429CF3](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0069006E006500730068006F006D)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_2D3F28A7] Script Date: 07/29/2014 03:55:22 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_2D3F28A7](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0062006F0078, 0x006E006E003200390034003900320033003000350033)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_32ED1505] Script Date: 07/29/2014 03:55:22 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_32ED1505](varbinary(128)) AS RANGE LEFT FOR VALUES (0x006100690064, 0x006E006E00330036)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_3E6129B6] Script Date: 07/29/2014 03:55:22 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_3E6129B6](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0036003600340038, 0x006C00610074006F0074, 0x006E006E00360031003800380038)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_3FC721DF] Script Date: 07/29/2014 03:55:22 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_3FC721DF](varbinary(128)) AS RANGE LEFT FOR VALUES (0x006300680075006E006B, 0x006E006E0034003300330031006400360031)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_4695B1AD] Script Date: 07/29/2014 03:55:22 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_4695B1AD](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0061006D006F0075006E0074, 0x006E006E003200370064003200330032)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_475E2206] Script Date: 07/29/2014 03:55:23 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_475E2206](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0061007200610079006B)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_52082FB0] Script Date: 07/29/2014 03:55:23 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_52082FB0](varbinary(128)) AS RANGE LEFT FOR VALUES (0x00640065007400610069006C, 0x006E006E003300300038003400320032)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_53473803] Script Date: 07/29/2014 03:55:23 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_53473803](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0061006F00730069, 0x006E006E003200350032003900340031)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_6A54BA8D] Script Date: 07/29/2014 03:55:23 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_6A54BA8D](varbinary(128)) AS RANGE LEFT FOR VALUES (0x00620061006E006B, 0x006E006E003300310064003000370032)
GO
/****** Object: PartitionFunction [ifts_comp_fragment_partition_function_7D7C9D9A] Script Date: 07/29/2014 03:55:23 PM ******/
CREATE PARTITION FUNCTION [ifts_comp_fragment_partition_function_7D7C9D9A](varbinary(128)) AS RANGE LEFT FOR VALUES (0x0063006100720072006900650072, 0x006E006E00330032003700330033)
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_06A2E7C5] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_06A2E7C5] AS PARTITION [ifts_comp_fragment_partition_function_06A2E7C5] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_11A1FB2A] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_11A1FB2A] AS PARTITION [ifts_comp_fragment_partition_function_11A1FB2A] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_171D3F63] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_171D3F63] AS PARTITION [ifts_comp_fragment_partition_function_171D3F63] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_1FA6CD15] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_1FA6CD15] AS PARTITION [ifts_comp_fragment_partition_function_1FA6CD15] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_25DC6753] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_25DC6753] AS PARTITION [ifts_comp_fragment_partition_function_25DC6753] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_2B429CF3] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_2B429CF3] AS PARTITION [ifts_comp_fragment_partition_function_2B429CF3] TO ([PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_2D3F28A7] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_2D3F28A7] AS PARTITION [ifts_comp_fragment_partition_function_2D3F28A7] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_32ED1505] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_32ED1505] AS PARTITION [ifts_comp_fragment_partition_function_32ED1505] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_3E6129B6] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_3E6129B6] AS PARTITION [ifts_comp_fragment_partition_function_3E6129B6] TO ([PRIMARY], [PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_3FC721DF] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_3FC721DF] AS PARTITION [ifts_comp_fragment_partition_function_3FC721DF] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_4695B1AD] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_4695B1AD] AS PARTITION [ifts_comp_fragment_partition_function_4695B1AD] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_475E2206] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_475E2206] AS PARTITION [ifts_comp_fragment_partition_function_475E2206] TO ([PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_52082FB0] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_52082FB0] AS PARTITION [ifts_comp_fragment_partition_function_52082FB0] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_53473803] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_53473803] AS PARTITION [ifts_comp_fragment_partition_function_53473803] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_6A54BA8D] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_6A54BA8D] AS PARTITION [ifts_comp_fragment_partition_function_6A54BA8D] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: PartitionScheme [ifts_comp_fragment_data_space_7D7C9D9A] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE PARTITION SCHEME [ifts_comp_fragment_data_space_7D7C9D9A] AS PARTITION [ifts_comp_fragment_partition_function_7D7C9D9A] TO ([PRIMARY], [PRIMARY], [PRIMARY])
GO
/****** Object: StoredProcedure [dbo].[Files_RecordCountLastThreeDays_ByFolder] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[Files_RecordCountLastThreeDays_ByFolder]
@ListOfFolders varchar(max)
AS
-- This query pulls only those folders DID have at least one success (a new file added)
With FoldersWithHits AS(
SELECT COUNT(*) AS NUMFILESADDED, Value as Folder
FROM funcSplit('|', @ListOfFolders) As Folders
inner join Files on CHARINDEX(Folders.Value, Files.AGGREGATEPATH) = 1
WHERE DateAdded > DATEADD(DD, -4, GETDATE())
Group By Value
Select * from FoldersWithHits
Union All
-- To get a list of those folders that did NOT have any new files added,
-- resuse the first query - use the above list of successes to do an exclusion
select 0 as NumFilesAdded, Folders.VAlue as Folder
From funcSplit('|', @ListOfFolders) As Folders
Left Join FoldersWithHits on FoldersWithHits.Folder = Folders.Value
Where FoldersWithHits.folder is null
GO
/****** Object: StoredProcedure [dbo].[FILES_SP_FINDTHISMOVEDFILE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Proc [dbo].[FILES_SP_FINDTHISMOVEDFILE]
@NameOfFile varchar(2000),
@NameOfZipFile varchar(2000),
@FileSize int
As
-- Here find the zipfile by passing in the name of the zipfile as @NameOfZipFile
Select AggregatePath, 'Found ZipFile By Name' as TypeOfHit From dbo.Files where NameOfFile = @NameOfZipFile
UNION
Select AggregatePath, 'Found ZipFile By Name' as TypeOfHit From dbo.FilesNewLocations where NameOfFile = @NameOfZipFile
UNION
-- Here find the file itself (not just the zipfile) by finding two names: the filename and zipFilename.
Select AggregatePath, 'Found Filename' as TypeOfHit From dbo.FilesNewLocations where Len(NameOfZipFile) > 0 AND NameOfFile = @NameOfFile And NameOfZipFile = @NameOfZipFile
union
Select AggregatePath, 'Found Filename' as TypeOfHit From dbo.FilesNewLocations where Len(NameOfZipFile) > 0 AND NameOfFile = @NameOfFile And NameOfZipFile = @NameOfZipFile
union
-- Here find the file by size
Select AGGREGATEPATH, 'Found By Size' as TypeOfHit From dbo.Files where FileSize = @FileSize ANd NameOfFile = @NameOfFile
UNION
Select AGGREGATEPATH, 'Found By Size' as TypeOfHit From dbo.FilesNewLocations where FileSize = @FileSize ANd NameOfFile = @NameOfFile
Grant Execute ON dbo.Files_SP_FindThisMovedFile To [BuiltIn\Users]
CREATE NONCLUSTERED INDEX idx_FilesNewLocations_CreationDate ON Files (CreationDate)
CREATE NONCLUSTERED INDEX idx_FilesNewLocations_FileSize ON Files (FileSize)
CREATE NONCLUSTERED INDEX idx_FilesNewLocations_NameOfFile ON Files (NameOfFile)
CREATE NONCLUSTERED INDEX idx_FilesNewLocations_NameOfZipFile ON Files (NameOfZipFile)
CREATE NONCLUSTERED INDEX idx_FilesNewLocations_AggregatePath ON Files (AggregatePath)
GO
/****** Object: StoredProcedure [dbo].[FILES_SP_GETEPOCALIPSETEXT] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FILES_SP_GETEPOCALIPSETEXT]
@AGGREGATEPATH VARCHAR(700)
AS
SET NOCOUNT ON
SELECT F.EPOCALIPSETEXT FROM FILES AS F
WHERE F.AGGREGATEPATH = @AGGREGATEPATH
GO
/****** Object: StoredProcedure [dbo].[FILES_SP_INSERTFILE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FILES_SP_INSERTFILE]
@AGGREGATEPATH VARCHAR(4000),
@CREATIONDATE DATETIME,
@EPOCALIPSETEXT VARCHAR(MAX),
@FILEID INT OUTPUT,
@PC VARCHAR(2000),
@FILESIZE INT,
@NAMEOFFILE VARCHAR(2000),
@ZIPPED BIT,
@NAMEOFZIPFILE VARCHAR(2000)
AS
SET NOCOUNT ON
DECLARE @DATEADDED SMALLDATETIME
SELECT @DATEADDED = CONVERT(VARCHAR(12), GETDATE(), 101)
INSERT INTO DBO.FILES (DATEADDED, AGGREGATEPATH, CREATIONDATE,EPOCALIPSETEXT, PC, FILESIZE, NAMEOFFILE, ZIPPED, NAMEOFZIPFILE)
VALUES(@DATEADDED, @AGGREGATEPATH,@CREATIONDATE,@EPOCALIPSETEXT, @PC, @FILESIZE, @NAMEOFFILE, @ZIPPED, @NAMEOFZIPFILE)
SELECT @FILEID=SCOPE_IDENTITY()
GO
/****** Object: StoredProcedure [dbo].[FILES_SP_ISDUPFILE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FILES_SP_ISDUPFILE]
@AGGREGATEPATH VARCHAR(2000)
AS
SET NOCOUNT ON
SELECT FILEID FROM DBO.FILES WHERE AGGREGATEPATH= @AGGREGATEPATH
GO
/****** Object: StoredProcedure [dbo].[FILES_SP_RECORDCOUNTLASTSEVENDAYS] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[FILES_SP_RECORDCOUNTLASTSEVENDAYS]
AS
SELECT PC, COUNT(*) AS NUMFILESADDED, CONVERT(VARCHAR(12),CONVERT(SMALLDATETIME, DATEADDED, 101), 101) AS DATEADDED FROM FILES
WHERE DATEADDED > DATEADD(DD, -9, GETDATE())
GROUP BY PC, CONVERT(SMALLDATETIME, DATEADDED, 101)
ORDER BY PC, CONVERT(SMALLDATETIME, DATEADDED, 101) DESC
GO
/****** Object: StoredProcedure [dbo].[FILESNEWLOCATIONS_SP_INSERTFILE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FILESNEWLOCATIONS_SP_INSERTFILE]
@AGGREGATEPATH VARCHAR(4000),
@CREATIONDATE DATETIME,
@FILESIZE INT,
@NAMEOFFILE VARCHAR(2000),
@NAMEOFZIPFILE VARCHAR(2000)
AS
SET NOCOUNT ON
INSERT INTO DBO.FILESNEWLOCATIONS (AGGREGATEPATH, CREATIONDATE,FILESIZE, NAMEOFFILE, NAMEOFZIPFILE)
VALUES(@AGGREGATEPATH,@CREATIONDATE,@FILESIZE, @NAMEOFFILE, @NAMEOFZIPFILE)
GRANT EXECUTE ON DBO.FILESNEWLOCATIONS_SP_INSERTFILE TO [BUILTIN\USERS]
GO
/****** Object: StoredProcedure [dbo].[FILESNEWLOCATIONS_SP_ISDUPNEWLOCATION] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FILESNEWLOCATIONS_SP_ISDUPNEWLOCATION]
@AGGREGATEPATH VARCHAR(2000)
AS
SET NOCOUNT ON
SELECT COUNT(*) FROM DBO.FILESNEWLOCATIONS WHERE AGGREGATEPATH= @AGGREGATEPATH
GO
/****** Object: StoredProcedure [dbo].[FOLDERS_SP_DELETEALLFOLDERS] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[FOLDERS_SP_DELETEALLFOLDERS]
AS
SET NOCOUNT ON
DELETE FROM FOLDERS
GO
/****** Object: StoredProcedure [dbo].[FOLDERS_SP_INSERTFOLDER] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[FOLDERS_SP_INSERTFOLDER]
@THEPATH VARCHAR(4000),
@FRIENDLYNAME VARCHAR(4000)
AS
INSERT INTO FOLDERS ([PATH], FRIENDLYNAME) VALUES (@THEPATH, @FRIENDLYNAME)
GO
/****** Object: StoredProcedure [dbo].[MISC_SP_SETDBSTARTDATEANDENDDATE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[MISC_SP_SETDBSTARTDATEANDENDDATE]
@STARTDATE DATETIME,
@ENDDATE DATETIME
AS
BEGIN
DECLARE @HASDATE TINYINT
SELECT @HASDATE = COUNT(*) FROM MISC WHERE KIND LIKE 'STARTDATE'
IF @HASDATE > 0
BEGIN
UPDATE DBO.MISC
SET DATECOL =
CASE KIND
WHEN 'STARTDATE' THEN @STARTDATE
WHEN 'ENDDATE' THEN @ENDDATE
END
END
ELSE
BEGIN
INSERT INTO DBO.MISC(KIND, DATECOL) VALUES('STARTDATE', @STARTDATE)
INSERT INTO DBO.MISC(KIND, DATECOL) VALUES('ENDDATE', @ENDDATE)
END
END
GO
/****** Object: StoredProcedure [dbo].[PAGES_SP_FINDWORDFORSELECTEDFOLDERS] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[PAGES_SP_FINDWORDFORSELECTEDFOLDERS]
@KEYWORD VARCHAR(500),
@STARTDATE DATETIME,
@ENDDATE DATETIME
AS
SET NOCOUNT ON
SELECT TOP 5000 * FROM
SELECT P.PAGENO AS PGNO,FD.FRIENDLYNAME AS FOLDER, F.CREATIONDATE, 'PAGE' AS [TYPE], F.AGGREGATEPATH AS FULLPATH FROM
CONTAINSTABLE(PAGES, OCRTEXT, @KEYWORD) AS FULLTEXTTABLE
INNER JOIN PAGES AS P ON P.PAGEID = FULLTEXTTABLE.[KEY]
INNER JOIN FILES AS F ON F.FILEID = P.FILEID
INNER JOIN FOLDERS AS FD ON CHARINDEX(FD.PATH + '\', F.AGGREGATEPATH) = 1
WHERE F.CREATIONDATE BETWEEN @STARTDATE AND @ENDDATE
UNION ALL
SELECT NULL AS PGNO, FD.FRIENDLYNAME AS FOLDER, F.CREATIONDATE, 'FILE' AS [TYPE], F.AGGREGATEPATH AS FULLPATH FROM
CONTAINSTABLE(FILES, EPOCALIPSETEXT, @KEYWORD) AS FULLTEXTTABLE
INNER JOIN FILES AS F ON F.FILEID = FULLTEXTTABLE.[KEY]
INNER JOIN FOLDERS AS FD ON CHARINDEX(FD.PATH + '\', F.AGGREGATEPATH) = 1
WHERE F.CREATIONDATE BETWEEN @STARTDATE AND @ENDDATE
) THERESULTS
GO
/****** Object: StoredProcedure [dbo].[PAGES_SP_FINDWORDFORSELECTEDFOLDERS_V2] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[PAGES_SP_FINDWORDFORSELECTEDFOLDERS_V2]
@KEYWORD VARCHAR(500),
@STARTDATE DATETIME,
@ENDDATE DATETIME
AS
SET NOCOUNT ON
SELECT TOP 5000 * FROM
SELECT P.PAGENO AS PGNO,FD.FRIENDLYNAME AS FOLDER, F.CREATIONDATE, 'PAGE' AS [TYPE], F.AGGREGATEPATH AS FULLPATH, F.FILESIZE FROM
CONTAINSTABLE(PAGES, OCRTEXT, @KEYWORD) AS FULLTEXTTABLE
INNER JOIN PAGES AS P ON P.PAGEID = FULLTEXTTABLE.[KEY]
INNER JOIN FILES AS F ON F.FILEID = P.FILEID
INNER JOIN FOLDERS AS FD ON CHARINDEX(FD.PATH + '\', F.AGGREGATEPATH) = 1
WHERE F.CREATIONDATE BETWEEN @STARTDATE AND @ENDDATE
UNION ALL
SELECT NULL AS PGNO, FD.FRIENDLYNAME AS FOLDER, F.CREATIONDATE, 'FILE' AS [TYPE], F.AGGREGATEPATH AS FULLPATH, F.FILESIZE
FROM
CONTAINSTABLE(FILES, EPOCALIPSETEXT, @KEYWORD) AS FULLTEXTTABLE
INNER JOIN FILES AS F ON F.FILEID = FULLTEXTTABLE.[KEY]
INNER JOIN FOLDERS AS FD ON CHARINDEX(FD.PATH + '\', F.AGGREGATEPATH) = 1
WHERE F.CREATIONDATE BETWEEN @STARTDATE AND @ENDDATE
) THERESULTS
GO
/****** Object: StoredProcedure [dbo].[PAGES_SP_GETOCRTEXT] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[PAGES_SP_GETOCRTEXT]
@PAGENO INT,
@AGGREGATEPATH VARCHAR(700)
AS
SET NOCOUNT ON
SELECT P.OCRTEXT FROM PAGES AS P
INNER JOIN FILES AS F ON F.FILEID = P.FILEID
WHERE F.AGGREGATEPATH = @AGGREGATEPATH AND P.PAGENO = @PAGENO
GO
/****** Object: StoredProcedure [dbo].[PAGES_SP_GETOCRTEXTFORALLPAGESOFTHISFILE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[PAGES_SP_GETOCRTEXTFORALLPAGESOFTHISFILE]
@AGGREGATEPATH VARCHAR(5000)
AS
SELECT PAGES.OCRTEXT FROM PAGES
INNER JOIN FILES ON FILES.FILEID = PAGES.FILEID
WHERE FILES.AGGREGATEPATH = @AGGREGATEPATH
ORDER BY PAGENO
GO
/****** Object: StoredProcedure [dbo].[PAGES_SP_INSERTPAGE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[PAGES_SP_INSERTPAGE]
@OCRTEXT VARCHAR(MAX),
@FILEID INT,
@PAGENO INT
AS
SET NOCOUNT ON
INSERT INTO DBO.PAGES (OCRTEXT, FILEID, PAGENO) VALUES (@OCRTEXT, @FILEID, @PAGENO)
GO
/****** Object: StoredProcedure [dbo].[PAGES_SP_ISDUPPAGE] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[PAGES_SP_ISDUPPAGE]
@FILEID INT,
@PAGENO INT
AS
SET NOCOUNT ON
SELECT PAGENO FROM DBO.PAGES WHERE FILEID = @FILEID AND PAGENO = @PAGENO
GO
/****** Object: StoredProcedure [dbo].[usp_RaiseError] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[usp_RaiseError]
@CustomMessage nvarchar(4000) = ' '
AS
-- Exit out if there is no error information to retrieve.
IF ERROR_NUMBER() IS NULL RETURN;
DECLARE
@strErrorMessage NVARCHAR(4000),
@ErrorNumber INT,
@Severity INT,
@ErrorState INT,
@Line INT,
@ProcedureName NVARCHAR(200),
@Msg nvarchar(max);
-- Store all the error info in some temp variables (not sure why he does this)
SELECT -- the SELECT keyword apparently means SET in this case.
@ErrorNumber = ERROR_NUMBER(), -- SETs the value of the @-variable.
@Severity = ERROR_SEVERITY(), -- SETs the value of the @-variable.
@ErrorState = ERROR_STATE(), -- SETs the value of the @-variable.
@Line = ERROR_LINE(), -- SETs the value of the @-variable.
@ProcedureName = ISNULL(ERROR_PROCEDURE(), '-'),
@Msg = Error_Message();
-- Build the message string. The "N" means literal string, and each %d is
-- a standin for a number, and we'll populate these standins later.
SET @strErrorMessage = @CustomMessage + N'Error %d, Severity %d, State %d, Procedure %s, Line %d, '
+ 'Message: '+ @Msg;
RAISERROR (-- This is the built-in RAISEERROR command. Requires 2 vals, then the standin-values
@strErrorMessage, -- You must supply two values before you can populate the standins
@Severity, -- first value, required.
1, -- second value, required
@ErrorNumber, -- populates a standin
@Severity, -- populates a standin
@ErrorState, -- populates a standin
@ProcedureName, -- populates a standin
@Line -- populates a standin
GO
/****** Object: StoredProcedure [dbo].[usp_RebuildIndexes] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Procedure [dbo].[usp_RebuildIndexes]
AS
Declare @fetch_TableName NVARCHAR(256)
DECLARE Cursor_Tables CURSOR FOR
SELECT Name FROM sysobjects WHERE xtype ='U'
OPEN Cursor_Tables
While 1 = 1 -- Begin to Loop through all tables
BEGIN
FETCH NEXT FROM Cursor_Tables INTO @fetch_TableName -- fetches the next table
if @@FETCH_STATUS <> 0 break
print '---------' + @fetch_TableName
Declare @fetch_indexName NVARCHAR(256) -- loops through al indexes of the current table
DECLARE Cursor_Indexes CURSOR FOR -- Looking for indexes fragmented more than 15 percent.
SELECT name as indexName
FROM sys.dm_db_index_physical_stats (DB_ID(DB_Name()), OBJECT_ID(@fetch_TableName), NULL, NULL, NULL) AS a
JOIN sys.indexes AS b ON a.object_id = b.object_id AND a.index_id = b.index_id
Where Name is not null and avg_fragmentation_in_percent > 7
OPEN Cursor_Indexes
WHILE 1= 1 -- Begin to Loop through all Indexes
BEGIN
FETCH NEXT FROM [Cursor_Indexes] INTO @fetch_indexName
if @@FETCH_STATUS <> 0 break
Declare @SqL nvarchar(2000) = N'
BEGIN TRY
ALTER INDEX ' + @fetch_indexName + ' ON ' + DB_Name() + '.dbo.' + @fetch_TableName + ' Rebuild
END TRY
BEGIN CATCH
Declare @err nvarchar(2000) = ERROR_MESSAGE();
throw 51000, @err, 1
END CATCH'
Execute sp_executeSQL @sql
End -- Ends looping through all indexes
CLOSE [Cursor_Indexes]
DEALLOCATE [Cursor_Indexes]
End -- Ends looping through all tables
CLOSE Cursor_Tables
DEALLOCATE Cursor_Tables
GO
/****** Object: UserDefinedFunction [dbo].[funcSplit] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE function [dbo].[funcSplit](@splitChar varchar(1), @CSV nvarchar(max))
Returns @Results Table (Value nvarchar(max))
As
Begin
Declare @lastChar nvarchar(1) = substring(@CSV, len(@CSV), 1)
-- Make sure the string ends in a comma. If not, append one.
if @lastChar <> @splitChar set @CSV = @CSV + @splitChar
Declare @posOfComma int = 0
Declare @LastPosOfComma int = 0
While 1 = 1
Begin
Set @posOfComma = CHARINDEX(@splitChar ,@CSV, @LastPosOfComma)
if @posOfComma = 0 break
Declare @Length int = @posOfComma - @LastPosOfComma
if @Length > 0
Begin
Declare @Phrase nvarchar(max) = substring(@CSV, @LastPosOfComma, @Length)
Insert Into @Results (Value) VALUES (@Phrase)
end
set @LastPosOfComma = @posOfComma +1
if @LastPosOfComma > Len(@CSV) break
END
Return
End
GO
/****** Object: Table [dbo].[FILES] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FILES](
[AGGREGATEPATH] [varchar](900) NOT NULL,
[NAMEOFFILE] [varchar](300) NOT NULL,
[NAMEOFZIPFILE] [varchar](300) NOT NULL,
[FILEID] [int] IDENTITY(1,1) NOT NULL,
[CREATIONDATE] [datetime] NOT NULL,
[EPOCALIPSETEXT] [varchar](max) NOT NULL,
[DATEADDED] [datetime] NOT NULL,
[PC] [varchar](30) NOT NULL,
[FILESIZE] [int] NOT NULL,
[ZIPPED] [bit] NOT NULL,
CONSTRAINT [PK_FILES] PRIMARY KEY CLUSTERED
[FILEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UQ_Files_AggregatePath] UNIQUE NONCLUSTERED
[AGGREGATEPATH] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UQ_Files_FileID] UNIQUE NONCLUSTERED
[FILEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[FilesNewLocations] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FilesNewLocations](
[AggregatePath] [varchar](900) NOT NULL,
[NameOfFile] [varchar](300) NOT NULL,
[NameOfZipFile] [varchar](300) NOT NULL,
[LocationID] [int] IDENTITY(1,1) NOT NULL,
[CreationDate] [datetime] NOT NULL,
[Filesize] [int] NOT NULL,
CONSTRAINT [PK_FilesNewLocations] PRIMARY KEY CLUSTERED
[LocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UQ_FilesNew_AggregatePath] UNIQUE NONCLUSTERED
[AggregatePath] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[FOLDERS] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FOLDERS](
[FOLDERID] [int] IDENTITY(1,1) NOT NULL,
[PATH] [varchar](900) NOT NULL,
[FRIENDLYNAME] [nvarchar](500) NULL,
CONSTRAINT [PK_Folders_Path] PRIMARY KEY CLUSTERED
[PATH] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UQ_Folders_FolderID] UNIQUE NONCLUSTERED
[FOLDERID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[MISC] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MISC](
[BOOLEANCOL] [bit] NULL,
[KIND] [nvarchar](4000) NULL,
[STRINGCOL] [nvarchar](4000) NULL,
[DATECOL] [datetime] NULL,
[INTEGERCOL] [int] NULL,
[MISCELLANEOUSID] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [idx_Misc_MiscellaneousID] UNIQUE NONCLUSTERED
[MISCELLANEOUSID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[PAGES] Script Date: 07/29/2014 03:55:24 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PAGES](
[OCRTEXT] [varchar](max) NULL,
[FILEID] [int] NOT NULL,
[PAGENO] [int] NOT NULL,
[PAGEID] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK_PAGES] PRIMARY KEY CLUSTERED
[PAGEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [UQ_FILEID_PAGENO] UNIQUE NONCLUSTERED
[FILEID] ASC,
[PAGENO] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_Files_AggregatePath] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_AggregatePath] ON [dbo].[FILES]
[AGGREGATEPATH] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_Files_CreationDate] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_CreationDate] ON [dbo].[FILES]
[CREATIONDATE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_Files_DateAdded] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_DateAdded] ON [dbo].[FILES]
[DATEADDED] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_Files_FileSize] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_FileSize] ON [dbo].[FILES]
[FILESIZE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_Files_NameOfFile] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_NameOfFile] ON [dbo].[FILES]
[NAMEOFFILE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_Files_NameOfZipFile] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_NameOfZipFile] ON [dbo].[FILES]
[NAMEOFZIPFILE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_Files_PC] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_PC] ON [dbo].[FILES]
[PC] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_Files_Zipped] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Files_Zipped] ON [dbo].[FILES]
[ZIPPED] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_FilesNewLocations_AggregatePath] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_FilesNewLocations_AggregatePath] ON [dbo].[FilesNewLocations]
[AggregatePath] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_FilesNewLocations_CreationDate] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_FilesNewLocations_CreationDate] ON [dbo].[FilesNewLocations]
[CreationDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_FilesNewLocations_FileSize] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_FilesNewLocations_FileSize] ON [dbo].[FilesNewLocations]
[Filesize] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_FilesNewLocations_NameOfFile] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_FilesNewLocations_NameOfFile] ON [dbo].[FilesNewLocations]
[NameOfFile] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [idx_FilesNewLocations_NameOfZipFile] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_FilesNewLocations_NameOfZipFile] ON [dbo].[FilesNewLocations]
[NameOfZipFile] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [idx_Pages_FileID] Script Date: 07/29/2014 03:55:24 PM ******/
CREATE NONCLUSTERED INDEX [idx_Pages_FileID] ON [dbo].[PAGES]
[FILEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE [dbo].[FILES] ADD DEFAULT ('') FOR [NAMEOFZIPFILE]
GO
ALTER TABLE [dbo].[FILES] ADD DEFAULT ('') FOR [EPOCALIPSETEXT]
GO
ALTER TABLE [dbo].[FILES] ADD DEFAULT ((0)) FOR [ZIPPED]
GO
USE [master]
GO
ALTER DATABASE [Year2014_Aug_To_Dec] SET READ_WRITE
GO8A partition function is used when you partition a table. Partitioned tables is a feature that is available only in Enterprise and Developer Edition.
I went through the script, and there are a number of partition functions and partition schemes, but they are not used anywhere, so you should be able to ignore the error.
Erland Sommarskog, SQL Server MVP, [email protected]
Maybe you are looking for
-
How to recover lost folders and files - Pls help, help...
Some days ago I lost all of my 15 GB folders and files that stored in my Macbook Pro hard drive called DATA. I brought my Macbook pro to an experienced computer tecnicians who providing data recovery services. To his and my suprise, after checking,
-
Using a Linksys WRT300N as head end for 1130AG
We currently have a seperate DSL line connected to a Linksys wireless router/switch for public use. We were given an 1130AG access point and would like to find a way to use a switch port off of the Linksys to connect to the FA port on the 1130AG and
-
Sending IDOC information in the XML format on the application server
Hello All, We have a requirement like, while creating a billing document, an IDOC should be generated and the XML file should be created for that data in IDOC and that XML file would be sent to further via XI. For this purpose, we have created 1. Log
-
Japenese charc not prinitng while downloading ALV to excel
hI - I am dowaloading an ALV report to Excel file . But that ALV contains japenese charactres so after downloading to excel . it got converted to cryptic/garbage characters . Please advice
-
My Iphone 4S WON'T turn off! And the Usage is running up constantly!
And the Usage is running constantly even when all my apps are closed. Started out of no where yeseterday. Tried Hard shutdown, as well as a restore. Help?