Following sp is not executing because an extra single quote is being inserted for the datetime parameter(@joined_date). This is suppose to be a single quote but there are two single quotes. I am calling this stored procedure from web application. sp is executed in sql server 2005. Can someone help me to solve this.
I have 2 instances of server A. A is the primary instance and A1 is the logical instance. Instance A1 has a linked server to server B. When I try to create a linked server from the primary instance A to server B, I get the error message
Error 15028: The server 'B' already exists.
When I run a select of master..sysservers on the primary instance, A, I see all linked servers for A and A1. When I select off of A1 I only see the instances for A1.
If I try to access server B from the primary instance A, I receive the following message:
Server: Msg 7411, Level 16, State 1, Line 1 Server 'B' is not configured for DATA ACCESS.
(1) Why does sysservers on the primary instance, A, show instances for A and A1 and not just the ones for A?
(2) Why can't I create the linked server 'B' on instance 'A'?
A heavily-selected database will be in an inconsistent state for several hours during a batch process. For that time, a database snapshot is created and accessed instead. To allow constant client read access to the database, a database that only contains synonyms exists. Those synonyms point to the main database except during the batch process, at which time they point to the database snapshot.
To switch the synonyms, each synonym is dropped and then created pointing to the database snapshot (after its creation, of course). The drop/create occurs inside a transaction. Roughly, the SQL looks like this:
SET XACT_ABORT ON; BEGIN TRANSACTION; DROP SYNONYM [dbo].[some_proc]; CREATE SYNONYM [dbo].[some_proc] FOR [snapshot_db].[dbo].[some_proc]; GRANT EXECUTE, SELECT ON [dbo].[some_proc] TO public; COMMIT TRANSACTION;
When the batch update is completed, the process is reversed with "snapshot_db" replaced with "regular_db". The SQL snippet above is dynamic SQL. What I've pasted is the dynamic SQL that is executed as a single batch.
While this switch is happening, clients are accessing the procedures through the synonyms, potentially at a high request rate. Testing reveals that clients can get the error:
Error=-2147217900, Id=0, Meaning=IDispatch error #3092, Source=Microsoft OLE DB Provider for ODBC Drivers, Description=[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.some_proc'.
This error only occurs once. If the same SPID retries its request and the transaction has not completed (for testing, a delay was added), then it blocks until the transaction completes.
Any way to prevent it besides a client-side retry?
i have created a fact table which has unique cluster index as below,
CREATE UNIQUE CLUSTERED INDEX [FactSales_SalesID] ON [dbo].[FactSales] (salesid ASC) WITH (DATA_COMPRESSION = PAGE) GO however later when i add CLUSTERED COLUMNSTORE INDEXES : CREATE CLUSTERED COLUMNSTORE INDEX CSI_FactSales ON dbo.FactSales WITH (DATA_COMPRESSION = COLUMNSTORE) GO
it prompts error.
Msg 35372, Level 16, State 3, Line 167 You cannot create more than one clustered index on table 'dbo.FactSales'. Consider creating a new clustered index using 'with (drop_existing = on)' option.
I just installed a SQL Server 2005 Express SP2 instance on a server with an existing SQL Server 2000 SP3 installation. (I need SQL Server 2005's INSERT from an EXEC capability). It's working great now except for one thing: I can't link any other SQL servers! I've already successfully added and queried a linked Oracle server, but attempting to add a linked SQL server gives me the following error, no matter which SQL provider I try to use:
Code Snippet "The linked server has been created but failed a connection test. Do you want to keep the linked server?" Additional information: --> An exception occured while executing a Transact-SQL statement or batch (Microsoft.SqlServer.Express.ConnectionInfo) --> Cannot create an instance of OLE DB provider "SQLNCLI" for linked server "SERVERNAME". (Microsoft SQL Server, Error: 7302)
The technical details reveal the error source as "sp_testlinkedserver".
I've scoured the net and premier support for advice on this problem, but the little I found wasn't helpful. I've tried reinstalling the SQL Native Client, but it didn't help. I've tried uninstalling SQL Server 2005 Express completely (including management studio and native client), rebooting, and reinstalling everything, with no luck. The server (obviously) does not have a firewall enabled. I've tried stopping the SQL 2000 Server installed on the system, no help. If I create a test .UDL file on the system, pointing to any of the SQL servers I'm trying to link, clicking the "Test Connection" button returns successful. I'm also able to connect to and query the servers directly from the SQL 2005 Express Management Studio. I just can't add them as linked servers.
The server is running Windows 2003 SP1, SQL Server 2000 SP3, and SQL Server 2005 Express SP2 (the default "SQLExpress" named instance). I've tried setting up SQL 2005 Express to run under the network service account and under a domain account used by the other SQL 2000 servers.
From other SQL 2000 servers, I can connect and link to the SQL Server 2005 Express instance successfully. I can also successfully add linked SQL servers in SQL Server 2000 instance installed on the same server. Only adding linked SQL servers in 2005 Express seems to be broken.
Anyone have any other suggestions? I'm totally baffled. Thank you so much for any helpful advice.
This is a problem I encountered when I had to detach a database file (type .mdf):
1) I went to the MS SQL Management Server Studi and detached my database file successfully from a connection called Workhorse.
2) I needed to place the .mdf database file into a zip file in order to put it on a remote server. I did this using Shared Portal. This was also successful
3) However when I tried reattaching the database file, I got this error:
CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "CProgram FilesMSSQL ServerMSSQLData<databasename>.mdf'
Q) The database file and log file (ldf) exist in the correct directory so I don't know what happened. Can any one help?
I have the following CREATE TRIGGER dbo.tgrCacheCustomers ON dbo.Customers FOR INSERT, UPDATE, DELETE AS EXEC sp_makewebtask 'C:DependencyFile.txt','SELECT top 1 CustomerId FROM customers' and I get the following error that I dont understand:
Error 21037: [SQL-DMO] The name specified in the Text property's 'CREATE ...' statement must match the Name property, and must be followed by valid TSQL statements.
I was trying to create a table with many columns. However, I got the following error. Have anyone seen this error before?
>>>>> Warning: The table 'PDMS_USER' has been created but its maximum row size (9118) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes. <<<<<
I've been looking at scripting some create tables, but want to know if the table created successfully. I've been doing the following:
DECLARE @ERRCODE INT
CREATE TABLE x SET @ERRCODE = @@ERROR
This works ok, if there is no erroor. However if I run this again, then obviously I get the error "This object already exists" and the script stops executing.
Is there a way that I can capture the error using @@ERROR and still let the script run ?
hi. i'm trying to create a stored procedure but it keeps messing up and i have absolutely no clue why. here is what i have:
CREATE PROCEDURE sp_OfficeReportStats AS
------------------------------------------------------------ --NEW CASE ------------------------------------------------------------
--NC2 CREATE TABLE TempWorkDB ( ProsAtty SMALLINT, Stat INT ) GO
INSERT INTO TempWorkDB (ProsAtty, Stat)
SELECT DefendantCase.ProsAtty, COUNT(DefendantCase.ProsAtty) AS CountOfProsAtty FROM DefendantCase LEFT JOIN DefendantEventPros ON DefendantCase.VBKey = DefendantEventPros.VBKey WHERE DefendantEventPros.EventID=2 AND DefendantEventPros.EventDate BETWEEN DATEADD(MONTH,-2,GETDATE()) AND GETDATE() GROUP BY DefendantCase.ProsAtty GO
UPDATE OfficeReport SET NC2=TempWorkDB.Stat FROM TempWorkDB WHERE TempWorkDB.Prosatty=OfficeReport.ProsAtty GO
UPDATE OfficeReport SET NC2=0 WHERE NC2 IS NULL GO
DROP TABLE TempWorkDB GO this code works in query analyzer just fine but it says i have an error at TempWorkDB. I do not have a TempWorkDB in my database currently. Waht am I doing wrong? thanks for you help!
I am trying to get the create script fot a function, but it's giving me the following , how can i get the script by overcoming this error.
error:===================================
Script failed for UserDefinedFunction 'dbo.test_decrypt_KEY'. (Microsoft.SqlServer.Smo)
------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Script+UserDefinedFunction&LinkId=20476
------------------------------ Program Location:
at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection depList, SqlSmoObject[] objects) at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(Urn[] urns, SqlSmoObject[] objects) at Microsoft.SqlServer.Management.Smo.Scripter.Script(Urn[] urns, SqlSmoObject[] objects) at Microsoft.SqlServer.Management.Smo.Scripter.Script(Urn[] urns) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptGenerator.ScriptCreate(Server server, Urn[] urns, SqlScriptOptions options) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptMenuHelper.OnScriptToNewWindow(Object sender, EventArgs args)
===================================
Property TextHeader is not available for UserDefinedFunction '[dbo].[test_decrypt_KEY]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. The text is encrypted. (Microsoft.SqlServer.Smo)
I am trying to create a table with the following code
create table department (dept_id smallint unsigned not null auto_increment, name varchar(20) not null, constraint pk_department primary key (dept_id) )
but keep coming up with an error. I suspect that I am trying to use mysql (which I don't want to use!) instead of sql, but can't find the changes I need to make.
CREATE PROCEDURE dbo.spCreateObBabyEpisodeArchive AS
DECLARE @TableName as varchar(400) DECLARE @SQL as varchar(8000)
SET @TableName = 'ObBabyEpisode' + CONVERT(varchar,REPLACE (CONVERT(VARCHAR, GETDATE(), 106) , ' ', '')) SET @SQL = 'CREATE TABLE ' + @TableName + ' ( AdmitSource INT NOT NULL DEFAULT 0, Anaesthesia3rdINT NOT NULL DEFAULT 0, Anaesthetist3rdINT NOT NULL DEFAULT 0, Apgar1INT NOT NULL DEFAULT 0, Apgar10INT NOT NULL DEFAULT 99, Apgar5INT NOT NULL DEFAULT 0, ApgarOtherVARCHAR(20) NOT NULL DEFAULT '' '', AttAccoucherVARCHAR(30) NOT NULL DEFAULT '' '', AttAccoucherRankVARCHAR(30) NOT NULL DEFAULT '' '', AttMidwifeVARCHAR(30) NOT NULL DEFAULT '' '', AttMidwifeRankVARCHAR(30) NOT NULL DEFAULT '' '', AttOthersVARCHAR(30) NOT NULL DEFAULT '' '', AttOthersRankVARCHAR(30) NOT NULL DEFAULT '' '', AugmentationVARCHAR(30) NOT NULL DEFAULT '' '', BabyAdmitDrINT NOT NULL DEFAULT 0, BabyDisDateVARCHAR(12) NOT NULL DEFAULT '' '', BabyDisDestINT NOT NULL DEFAULT 0, BabyDisFeedINT NOT NULL DEFAULT 0, BabyDisHospINT NOT NULL DEFAULT 0, BabyDisStaffINT NOT NULL DEFAULT 0, BabyDisTimeVARCHAR(7) NOT NULL DEFAULT '' '', BabyEddVARCHAR(12) NOT NULL DEFAULT '' '', BabyGenderVARCHAR(20) NOT NULL DEFAULT '' '', BabyLosINT NOT NULL DEFAULT 0, BabyNumINT NOT NULL DEFAULT 0, BabyPostMedsVARCHAR(30) NOT NULL DEFAULT '' '', BabyRecStatusVARCHAR(50) NOT NULL DEFAULT '' '', BabyRegStaffINT NOT NULL DEFAULT 0, BabyReqMandatoryFieldsVARCHAR(250) NOT NULL DEFAULT '' '', BabyScnNicuVARCHAR(6) NOT NULL DEFAULT '' '', BabyTreatmentVARCHAR(80) NOT NULL DEFAULT '' '', BabyUrnoVARCHAR(20) NOT NULL DEFAULT '' '', BabyWardINT NOT NULL DEFAULT 0, BirthAnaesVARCHAR(30) NOT NULL DEFAULT '' '', BirthDateVARCHAR(12) NOT NULL DEFAULT '' '', BirthDefectVARCHAR(80) NOT NULL DEFAULT '' '', BirthLengthDECIMAL NOT NULL DEFAULT 0, BirthModeINT NOT NULL DEFAULT 0, BirthPlaceINT NOT NULL DEFAULT 0, BirthStatusVARCHAR(55) NOT NULL DEFAULT '' '', BirthTimeVARCHAR(7) NOT NULL DEFAULT '' '', BirthTraumaVARCHAR(30) NOT NULL DEFAULT '' '', BirthTypeINT NOT NULL DEFAULT 0, BirthWeightVARCHAR(10) NOT NULL DEFAULT '' '', CaesarTypeVARCHAR(20) NOT NULL DEFAULT '' '', CmpAccPaidDECIMAL NOT NULL DEFAULT 0, CmpAccRcvdDECIMAL NOT NULL DEFAULT 0, CmpCategoryINT NOT NULL DEFAULT 0, CmpDisDateVARCHAR(12) NOT NULL DEFAULT '' '', CmpDisFeedINT NOT NULL DEFAULT 0, CmpFeedChangeVARCHAR(6) NOT NULL DEFAULT '' '', CmpFeedReasonINT NOT NULL DEFAULT 0, CmphomeConsultINT NOT NULL DEFAULT 0, CmpHospConsultINT NOT NULL DEFAULT 0, CmpNotHomeINT NOT NULL DEFAULT 0, CmpOutPhoneINT NOT NULL DEFAULT 0, CmpOutreachTotINT NOT NULL DEFAULT 0, CmpPhoneConsultINT NOT NULL DEFAULT 0, CmpProblemINT NOT NULL DEFAULT 0, CmpProviderINT NOT NULL DEFAULT 0, CmpReadmitBabyINT NOT NULL DEFAULT 0, CmpReadmitMotherINT NOT NULL DEFAULT 0, CmpReferBabyINT NOT NULL DEFAULT 0, CmpReferMotherINT NOT NULL DEFAULT 0, CmpVisitTotINT NOT NULL DEFAULT 0, CordAnalysisTimevarchar(25) NOT NULL DEFAULT '' '', CordBaseExcessvarchar(6) NOT NULL DEFAULT '' '', CordBloodVARCHAR(6) NOT NULL DEFAULT '' '', CordCompsVARCHAR(55) NOT NULL DEFAULT '' '', CordInsertionVARCHAR(55) NOT NULL DEFAULT '' '', CordLactateVARCHAR(6) NOT NULL DEFAULT '' '', CordPhVARCHAR(6) NOT NULL DEFAULT '' '', CordStemBloodVARCHAR(6) NOT NULL DEFAULT '' '', CordVesselsINT NOT NULL DEFAULT 0, DischWeightvarchar(10) NOT NULL DEFAULT '' '', DisFeedReasonINT NOT NULL DEFAULT 0, EndDate3VARCHAR(12) NOT NULL DEFAULT '' '', EndTime3VARCHAR(6) NOT NULL DEFAULT '' '', EpisodeIDINT NOT NULL , EstGestDECIMAL NOT NULL DEFAULT 0, EstRespsINT NOT NULL DEFAULT 0, ExclusiveBFVARCHAR(6) NOT NULL DEFAULT '' '', FirstFeedDateVARCHAR(12) NOT NULL DEFAULT '' '', FirstFeedModeINT, FirstFeedTimeVARCHAR(6) NOT NULL DEFAULT '' '', FoetMonVARCHAR(30) NOT NULL DEFAULT '' '', ForcepTypeVARCHAR(100) NOT NULL DEFAULT '' '', HeadCircmDECIMAL, HearTestDateVARCHAR(12) NOT NULL DEFAULT '' '', HearTestResultVARCHAR(20) NOT NULL DEFAULT '' '', HepBvDateVARCHAR(12) NOT NULL DEFAULT '' '', HepBvTimeVARCHAR(6) NOT NULL DEFAULT '' '', HindleakDateVARCHAR(55) NOT NULL DEFAULT '' '', HindleakTimeVARCHAR(6) NOT NULL DEFAULT '' '', ID INT NOT NULL , ImmGnDateVARCHAR(12) NOT NULL DEFAULT '' '', ImmGnTimeVARCHAR(6) NOT NULL DEFAULT '' '', InductionDateVARCHAR(12) NOT NULL DEFAULT '' '', InductionTimeVARCHAR(6) NOT NULL DEFAULT '' '', InductMainINT, InductModeVARCHAR(30) NOT NULL DEFAULT '' '', InductOtherVARCHAR(250) NOT NULL DEFAULT '' '', IntendedChangedVARCHAR(55) NOT NULL DEFAULT '' '', IntendedPlaceVARCHAR(30) NOT NULL DEFAULT '' '', IntendedSpecifyVARCHAR(55) NOT NULL DEFAULT '' '', IntendedYnVARCHAR(6) NOT NULL DEFAULT '' '', KonakDateVARCHAR(12) NOT NULL DEFAULT '' '', KonakRouteVARCHAR(10) NOT NULL DEFAULT '' '', LabAnalgesiaVARCHAR(30) NOT NULL DEFAULT '' '', LabCompsVARCHAR(60) NOT NULL DEFAULT '' '', LabDrugsVARCHAR(30) NOT NULL DEFAULT '' '', LabourTime1VARCHAR(6) NOT NULL DEFAULT '' '', LabourTime2VARCHAR(6) NOT NULL DEFAULT '' '', LabourTime3VARCHAR(6) NOT NULL DEFAULT '' '', LastUpdateVARCHAR(55) NOT NULL DEFAULT getdate(), LiquorINT NOT NULL DEFAULT 0, MembDateVARCHAR(30) NOT NULL DEFAULT '' '', MembRuptureVARCHAR(55) NOT NULL DEFAULT '' '', MembTimeVARCHAR(6) NOT NULL DEFAULT '' '', NeoMorbVARCHAR(80) NOT NULL DEFAULT '' '', NewBornScrVARCHAR(12) NOT NULL DEFAULT '' '', ObsAccClassVARCHAR(10) NOT NULL DEFAULT '' '', ObsAdmitDateVARCHAR(12) NOT NULL DEFAULT '' '', ObsAdmitTimeVARCHAR(6) NOT NULL DEFAULT '' '', OnsetDate1VARCHAR(12) NOT NULL DEFAULT '' '', OnsetDate2VARCHAR(12) NOT NULL DEFAULT '' '', OnsetLabVARCHAR(30) NOT NULL DEFAULT '' '', OnsetTime1VARCHAR(6) NOT NULL DEFAULT '' '', OnsetTime2VARCHAR(6) NOT NULL DEFAULT '' '', OpdelAnaesthetist INT NOT NULL DEFAULT 0, OpdelDilationDECIMAL NOT NULL DEFAULT 0, OpdelMainINT NOT NULL DEFAULT 0, OpdelNatureVARCHAR(40) NOT NULL DEFAULT '' '', OpdelOtherVARCHAR(30) NOT NULL DEFAULT '' '', Oxytocic3VARCHAR(30) NOT NULL DEFAULT '' '', PassedMecVARCHAR(6) NOT NULL DEFAULT '' '', PassedUrineVARCHAR(6) NOT NULL DEFAULT '' '', PdcuBatchErrorVARCHAR(250) NOT NULL DEFAULT '' '', PdcuBatchIDINT NOT NULL DEFAULT '' '', PeriAnaesINT NOT NULL DEFAULT '' '', PeriStatusINT NOT NULL DEFAULT '' '', PeriSuturedByINT NOT NULL DEFAULT '' '', PlacentaAbnormVARCHAR(100) NOT NULL DEFAULT '' '', PlacentaDelModeVARCHAR(55) NOT NULL DEFAULT '' '', PlacentaMemVARCHAR(55) NOT NULL DEFAULT '' '', PositionVARCHAR(40) NOT NULL DEFAULT '' '', PresentationINT NOT NULL DEFAULT '' '', RefHospitalINT NOT NULL DEFAULT '' '', RegistrarFlagINT NOT NULL DEFAULT '' '', ResusVARCHAR(60) NOT NULL DEFAULT '' '', ScalpLactateDateVARCHAR(50) NOT NULL DEFAULT '' '', ScalpLactateTime VARCHAR(30) NOT NULL DEFAULT '' '', ScalpLactateValue VARCHAR(30) NOT NULL DEFAULT '' '', SkinContactVARCHAR(6) NOT NULL DEFAULT '' '', SkinContactDateVARCHAR(12) NOT NULL DEFAULT '' '', SkinContactReasonGT30INT NOT NULL DEFAULT '' '', SkinContactTimeVARCHAR(6) NOT NULL DEFAULT '' '', TotLabourTimeVARCHAR(6) NOT NULL DEFAULT '' '', UrNoVARCHAR(20) NOT NULL, VCordBaseExcessVARCHAR(6) NOT NULL DEFAULT '' '', VCordLactate VARCHAR(6) NOT NULL DEFAULT '' '', VCordPhVARCHAR(6) NOT NULL DEFAULT '' '' )' EXEC @SQL GO
When I run the query, I get this error Server: Msg 203, Level 16, State 2, Line 172 The name 'CREATE TABLE ObBabyEpisode18Jun2007 ( AdmitSource INT NOT NULL DEFAULT 0, Anaesthesia3rdINT NOT NULL DEFAULT 0, Anaesthetist3rdINT NOT NULL DEFAULT 0, Apgar1INT NOT NULL DEFAULT 0, Apgar10INT NOT NULL DEFAULT 99, Apgar5INT NOT NULL DEFAULT 0, ApgarOtherVARCHAR(20) NOT NULL DEFAULT ' ', AttAccoucherVARCHAR(30) NOT NULL DEFAULT ' ', AttAccoucherRankVARCHAR...
Hi, Trying to create a SP. But getting an error msg. Any ideas how to fix it? My SP gets the size of the tables in every DB.
Server: Msg 2714, Level 16, State 5, Procedure isp_allTableSize, Line 8 There is already an object named 'isp_allTableSize' in the database. Server: Msg 208, Level 16, State 1, Line 18 Invalid object name 'master..TablesTemp'. Server: Msg 208, Level 16, State 1, Line 63 Invalid object name 'master..TablesTemp'. ----------------------------------------------------------------------
-- TRUNCATE table TablesTemp
-- drop proc dbo.isp_allTableSize CREATE PROC dbo.isp_allTableSize as SET NOCOUNT ON
My website host allows me to create DB and DB users from its control panel and then I am able to use SQL server Management studio to Manage My DB. Therefore I create My DB (TBC20) and create a user for it(Tony) from Host Panel. When I want to Export My Local copy DB data to the remote DB using Import/Export wizard and set the It won’t Generate any DB objects. Even When I use aspnet_regsql Command I encounter Following error: SQL error number is 262 and the SqlException message is: CREATE DATABASE permiss ion denied in database 'master'. Creating the TBC20 database... ------------------------------------------------------ When I View permissions in Database properties window No Permission is Grant for user: Tony. Only some permission Grant for Grantor: dbo. When I check Boxes to Grant Permission for user Tony None of permissions will be grant to this user. How could I allow this user ti take ownership of DB and create DB objects
Hi.I have a procedure with this in it (there are no other references toasset_number_bak_tmp_pk in the procedure and it calls nothing else written byme, just system calls or normal dml).create table #asset_bak(asset_number varchar(60) not null,asset_desc varchar(100) null,location varchar(40) null,constraint asset_number_bak_tmp_pk primary key clustered (asset_number))When I run the procedure, I get this message:(1 row(s) affected)Msg 2714, Level 16, State 4, Procedure updatenavharrierdb, Line 19There is already an object named 'asset_number_bak_tmp_pk' in the database.Msg 1750, Level 16, State 0, Procedure updatenavharrierdb, Line 19Could not create constraint. See previous errors.How can I find where else the system thinks this constraint exists?I tried this but it only finds it in one place (one row in the result set),i.e. my procedure:select sysobjects.name, syscomments.textfrom sysobjects, syscommentswhere sysobjects.id = syscomments.id and((lower(sysobjects.name) like '%asset_number_bak_tmp_pk%') or(lower(syscomments.text) like '%asset_number_bak_tmp_pk%'))Is this somehow a case where I need to do something dynamically, or purge someinformation? I thought temp tables and their crony constraints disappearedafter the procedure exited.thanksJeff Kish
I have just managed to have JDBC working, but I am getting an error that the user does not exist. I have read in the MSDN help that I need to set the sqlExpress to accept SQL server authentication and not windows authentication. So when I am trying to create a new User using Microsoft SQL server management studio express I get the following error.
TITLE: Microsoft SQL Server Management Studio Express ------------------------------
Create failed for Login 'adam'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476
I need to get some .dll's into MS SQL-Server 2005, that i need to get a own made .dll installed.
When i try to:
Code Block CREATE ASSEMBLY SystemWeb FROM 'C:WINDOWSMicrosoft.NETFrameworkv2.0.50727System.Web.dll' WITH PERMISSION_SET = UNSAFE;
i get the following message:
Code Block Warning: The Microsoft .Net frameworks assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86.' you are registering is not fully tested in SQL Server hosted environment. Warning: The Microsoft .Net frameworks assembly 'system.enterpriseservices, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86.' you are registering is not fully tested in SQL Server hosted environment. Warning: The Microsoft .Net frameworks assembly 'system.runtime.remoting, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment. Warning: The Microsoft .Net frameworks assembly 'system.design, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment. Msg 701, Level 17, State 13, Line 1 There is insufficient system memory to run this query.
When i try to create one of the another assemblies ( system.enterpriseservices, system.runtime.remoting, system.design ) i get the same message.
I looked for this Error and found only this BUG-report: BUG#: 58267 (SQLBUG_70) Article ID: 274030 http://support.microsoft.com/kb/274030/en-us
But this does not solve my problem.
As far as i know we use MS SQL-Server 2005 without any Service-Packs.
Question:
is there any Table/View to find out the Versionnumber/Service-Pack
In the moment i am waiting for our admin to install SP2 for SQL-Server, hoping that this will fix the problem.
I'll ask for patience cause am new to this....but I am trying to create a new connection while trying to add a new Data Source in Visual Studios, and I keep getting the error "Login failed for user 'Mohaminho-PCMohaminho'." I have tried several things that my little knowledge knows, but no success. Any ideas anyone?
using System; using Microsoft.SqlServer.Dts.Runtime; public class Execute { public static void Package(string dtsxPath) { try { Package pkg; Application app; DTSExecResult pkgResults; app = new Application(); pkg = app.LoadPackage(dtsxPath, null); pkgResults = pkg.Execute(); } catch (System.Exception ex) { throw ex; } } }
Then this c:Program FilesMicrosoft Visual Studio 8VC>csc /target:library C:SSISSSISE xecute.cs /reference:C:SSISSSISMicrosoft.SqlServer.ManagedDTS.dll
It creates Execute.dll
but when I run this is sql server
CREATE ASSEMBLY ssid from 'c:Program FilesMicrosoft Visual Studio 8VCExecute.dll'
WITH PERMISSION_SET = UNSAFE
I am getting Error
Warning: The SQL Server client assembly 'microsoft.sqlserver.manageddts, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Warning: The SQL Server client assembly 'microsoft.sqlserver.dtsruntimewrap, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Msg 10301, Level 16, State 1, Line 1
Assembly 'Execute' references assembly 'system.windows.forms, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
I don't see any place I am using System.window.forms
Any idea why? Thanks - Ashok
--------------------------------------------------------- I changed my location to to CSC C:WINNTMicrosoft.NETFrameworkv2.0.50727>
Now I get this error
Warning: The SQL Server client assembly 'microsoft.sqlserver.manageddts, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Warning: The SQL Server client assembly 'microsoft.sqlserver.dtsruntimewrap, version=9.0.242.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Warning: The Microsoft .Net frameworks assembly 'system.windows.forms, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Warning: The Microsoft .Net frameworks assembly 'system.drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Warning: The Microsoft .Net frameworks assembly 'accessibility, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Warning: The Microsoft .Net frameworks assembly 'system.runtime.serialization.formatters.soap, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in SQL Server hosted environment.
Msg 10301, Level 16, State 1, Line 1
Assembly 'Execute1' references assembly 'microsoft.sqlserver.msxml6_interop, version=6.0.0.0, culture=neutral, publickeytoken=89845dcd8080cc91.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
--------------------------------------------- I managed to found this DLL Microsoft.SQLServer.msxml6_interop.dll so I copied to same location Now It's looking for
microsoft.sqlserver.sqltdiagm - Which I am not able to find any place .......................
Hi everybody, I'm working with a SQL Server 2000 Database and I need to write a procedure that creates a file .log in which it has to write some potential errors occurred in other procedures. I'm quite totally newbie to T-SQL language and its procedures, so I don't know which procedure or function creates and closes the file and which one writes something in it.
I am trying to create a database in my application's installation folder and it will not create because the folder does not have the permissions for the service account added as full control. I can't figure out how to get the service account name in my program so that I can add it to the folder permissions. The service name is a long name and has the computer name and the SQL server name included in it. For example: SQLServer2005MSSQLUser$<Ccmputer Name>$SQLEXPRESS. I'm assuming this pattern is always followed. I guess my question is can I query the database for this information and then use it to add the appropriate permissions to my application's install folder?