Error Using SqlServer SMO.

Oct 24, 2007



Hi,
I want to transfer database objects from One Database to other including all keys that exists between tables using SqlServer SMO .I had tried with MSDN Code but i am facing with some error i.e.,


ERROR : errorCode=-1073548784 description=Executing the query "DROP USER [UserName]
" failed with the following error: "Cannot drop the user 'UserName', because it does not exist or you do not have permission.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}

I tried with MSDN Code:

'Reference the AdventureWorks database
Dim db As Database
db = srv.Databases("AdventureWorks")
'Create a new database that is to be destination database.
Dim dbCopy As Database
dbCopy = New Database(srv, "AdventureWorksCopy")
dbCopy.Create()
'Define a Transfer object and set the required options and properties.
Dim xfr As Transfer
xfr = New Transfer(db)
xfr.CopyAllTables = True
xfr.Options.WithDependencies = True
xfr.Options.ContinueScriptingOnError = True
xfr.DestinationDatabase = "AdventureWorksCopy"
xfr.DestinationServer = srv.Name
xfr.DestinationLoginSecure = True
xfr.CopySchema = True
'Script the transfer. Alternatively perform immediate data transfer with TransferData method.
xfr.ScriptTransfer() or xfr.TransferData()

Thanks In Advance,
Balaji.

View 4 Replies


ADVERTISEMENT

[298] SQLServer Error: 258, TCP Provider: Timeout Error [258]. [SQLSTATE 08001]

Mar 11, 2008

I've received this error twice over 2 days in the SQL Agent error log during off-hours from a server which has not had any changes to it in the last few months (once at 3:32AM and the next day at 3:46AM. I've been able to tie it to log-shipping backup jobs (all of which run under the SQL Service domain account) which run every minute. It seems to be only momentary, as the next attempt a minute later is successful.

I get the same set of messages for each database for the same time which look like this:


Date 07.03.2008 3:31:51 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[298] SQLServer Error: 258, TCP Provider: Timeout error [258]. [SQLSTATE 08001]

Date 07.03.2008 3:31:52 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)
Message
[165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]


Date 07.03.2008 3:31:52 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[298] SQLServer Error: 258, Unable to complete login process due to delay in login response [SQLSTATE 08001]


Date 07.03.2008 3:31:52 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[382] Logon to server '(local)' failed (SubSystemStepHistoryLogger)


I can't find any documentation on these errors on the web or MSDN site. Can I chalk this up to possibly "winking" connection to our domain controller? We've never had these messages before, and our LAN department swears that there have been no upgrades to the network or domain controller servers recently.

View 25 Replies View Related

SQLServer Error: 22046, Encryption Error Using CryptProtectData

May 3, 2007

I created a ransactional publication.

Starting the LogReader Agent produce the error
'Unable to start execution of step 2 (reason: Error authenticating proxy NETRTLSRVSvcSQLLogReader, system error: Logon failure: unknown user name or bad password.). The step failed.'


This is the result of the SQL Agent Error
[298] SQLServer Error: 22046, Encryption error using CryptProtectData. [SQLSTATE 42000]


We are running SQL Server 2005 - 9.00.3042.00 (Intel X86) in a cluster environment.


If I change the Step 2 of the Agent Job (Type=Replication Transactional-Log Reader) to "Run AS" SQL Agent Service Account , everthing works fine.

There seems to be a problem with the access to the generated proxy/credential

Why it doesn't work with the special SvcSQLLogReader domain Login ?

View 6 Replies View Related

Bcp Error (csv To Sqlserver)

Nov 20, 2004

Hi everybody
I am using bcp to insert data from csv file to sql server . The problem that i am facing is that, The heading in the csv file is populating in the tables
also the datas are not inserting.
I dosent want the first row in the csv which holds the heading to insert in the table
Does anybody know to solve this problem
I am using this code

CREATE procedure usp_ImportMultipleFilesBCP @servername varchar(128),
@DatabaseName varchar(128), @filepath varchar(500), @pattern varchar(100),
@TableName varchar(128)
as
declare @query varchar(1000)
declare @max1 int
declare @count1 int
Declare @filename varchar(100)
set @count1 =0
create table #x (name varchar(200))
set @query ='master.dbo.xp_cmdshell "dir '+@filepath+@pattern +' /b"'
insert #x exec (@query)
delete from #x where name is NULL
select identity(int,1,1) as ID, name into #y from #x
drop table #x
set @max1 = (select max(ID) from #y)
--print @max1
--print @count1
--select * from #y
While @count1 <= @max1
begin
set @count1=@count1+1
set @filename = (select name from #y where [id] = @count1)
set @Query ='bcp "'+ @databasename+'.dbo.'+@Tablename + '"
in "'+ @Filepath+@Filename+'" -S' + @servername + ' -T -c -r -t,'
set @Query = 'MASTER.DBO.xp_cmdshell '+ "'"+ @query +"'"
--print @query
EXEC ( @query)
--insert into logtable (query) select @query
end

drop table #y
GO

Exec usp_ImportMultipleFilesBCP 'servername','databasename','c:Myimport','aa.csv ','Tablename'


when I execute this I get an error like

usage: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide character type]
[-N keep non-text native] [-V file format version] [-q quoted identifier]
[-C code page specifier] [-t field terminator] [-r row terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional enable]
[-k keep null values] [-E keep identity values]
[-h "load hints"]
NULL

If anybody knows pls reply
Thank you verymuch

View 2 Replies View Related

SqlServer Connection Error

Jul 19, 2006

Hi
 Iam Fed up with sqlconnection open error. Can Any one help me in isolating the problem.
I am creating a asp.net application .
I want to pull the data from sql server and display in a grid.
The sql server is running in a different machine.(connected thru lan)
The IIS and application is running in one machine
For the sqlconnectionstring i have given it as like this
server=POO01;uid=sa;pwd=newsql;database=CPI_CIVIL_TRANS;
I Get an error as "sql server does not exists or access denined"
I search google for this problem , but could not find a solution.
Iam struck up with the work because of the problem.
Thanks In Advance For help.
Jai Ganesh.J
 

View 5 Replies View Related

SQLServer Error: 10060 - Please Help!

Jun 28, 2001

Hello All,

Here's a really wierd one for you all. I have two "virtual" SQL Servers running on a Clustered NT Server. I can connect to one server using its IP
address by configuring my client to talk using TCP/IP. However, when I try
to connect to the second server using its IP address after configuring my
client library accordingly. I get an error message like this:-

Unable to connect to server IP address
Server: Msg 11, Level 16, State 1
[Microst][ODBC SQL Server Driver][TCP/IP Sockets] General network error. check your network documentation.

Next, I tried to create an ODBC source and here's the message from the ODBC
Administrator.....

Connection failed:
SQLState:'01000'
SQL Server Error: 10060
[Microst][ODBC SQL Server Driver][TCP/IP Sockets] ConnectionOpen [connect()]
Connection failed:
SQLState: '08001'
SQL Server Error: 11
[Microst][ODBC SQL Server Driver][TCP/IP Sockets] General network error. check your network documentation.

Please someone help!
regards
Uday

View 3 Replies View Related

Sqlserver 2005 Trigger Error

Oct 17, 2007

hi.......
i create a trigger after delete which work perfactly fine on one sqlserver2005 machine but not at another.......machine having sqlserver2005
this trigger effect 15 tables from which i am deleting data...when trigger fires.....
now it cause following error when i fire ir on another machine
error source: .net sql client data provider
error message:maximun stored procedure,triggers,functions,or view nesting level exceeded (limit 32)
plzzzz give da solution.....its really frustrating me....
thanks in advance

View 5 Replies View Related

Sqlserver 6.5 Error 10004 [DB-Library]

Oct 8, 2004

Help!

I am running sqlserver 6.5 and I trying to copy over one db into another, it goes thru the scripting and then it gives me the error message Error 10004 [DB-Library] unable to connect. How can I resolve this?

Thanks in advance for your help! :)

View 11 Replies View Related

Sexstatevariable =3 Error (was SQLServer-2000)

Aug 9, 2006

Quite often a scheduled program run causes the following error and program fails. If I run it a couple of times then it goes away for some days but re-appears again sporadically. Any thoughts what to look for and how to fix this? Help is appreciated.

sexstatevariable =3

View 11 Replies View Related

Help Needed On SQLServer , Error 18456

Mar 1, 2004

Hi All,

I have tried accessing a remote database in one of by stored procs using linked servers and also using OpenDataSource method.
In both the cases , I am getting login failed error.

Following is the stored proc :

CREATE PROCEDURE TEST AS

SELECT *
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=blrkec3432s;User ID=xyz;Password=xyz').LMC.dbo.STATE
GO


It works fine if the userid is 'sa'

Could anyone please tell me the reason for this.

Thanks,
Shanthi

View 1 Replies View Related

Error Using Microsoft.SqlServer.ManagedDTS.dll

May 24, 2007

Hi,



I picked the Microsoft.SQLServer.ManagedDTS.dll from following folder:



C:WINDOWSassemblyGAC_MSILMicrosoft.SqlServer.ManagedDTS9.0.242.0__89845dcd8080cc91>



Similarly picked Microsoft.SqlServer.DTSRuntimeWrap.dll also.



I added it as reference in my .NET application.



When I execute the program I get below error:



Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.



Any Clue?



Application executes from a machine where SQL Server 2005 is not installed.

How to get the RunningPackages information back to a client PC?



HV

View 8 Replies View Related

Error When Connect To Sqlserver From Another Machine

Nov 17, 2006

hi ..

i install sqlserver and make app with vb6 using ADO to connect to the database and successfully

i put that application on another pc on the network
when i open it it says "can't login computernameguest" ??!!

any help

thanks in advance.

View 10 Replies View Related

Installin Sqlserver 2005 Error

Aug 14, 2006

I get the following error message when I install sqlserver 2005.



TITLE: Microsoft SQL Server 2005 Setup
------------------------------

The installer has encountered an unexpected error. The error code is 2380. Error opening file for write: 5. GetLastError: SOFTWAREMicrosoftMicrosoft SQL ServerMSSQL.1Setup.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=2380&EvtType=sqlca%5csqlsecurityca.cpp%40Do_sqlGroup%40Do_sqlGroup%40x5

------------------------------
BUTTONS:

&Retry
Cancel
------------------------------
Anybody got an idea?

Thanks

View 8 Replies View Related

AspX Page Connection Error Using Sqlserver

Dec 16, 2003

Dear i am using visual studio.net.......... when i connect database (in sqlserver) using sqldataAdapter with datagrid in visual basic.net every thing work properly........... but when i use the same in asp.net then i get an error message on the resultant explorer page give below.


Server Error in '/studentData' Application.
--------------------------------------------------------------------------------

Login failed for user 'RAMIZSARDARASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'RAMIZSARDARASPNET'.

Source Error:


Line 85: 'Put user code to initialize the page here
Line 86: Dim ds As New DataSet()
Line 87: SqlDataAdapter1.Fill(ds)
Line 88: DataGrid1.DataSource = ds.Tables(0)
Line 89: DataGrid1.DataBind()


Source File: c:inetpubwwwrootstudentDataWebForm1.aspx.vb Line: 87

Stack Trace:


[SqlException: Login failed for user 'RAMIZSARDARASPNET'.]
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
studentData.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootstudentDataWebForm1.aspx.vb:87
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0


Plz solve my problem and Reply me on ramiz_ch@hotmail.com
Plz solve my problem and Reply me on ramiz_ch@hotmail.com
Plz solve my problem and Reply me on ramiz_ch@hotmail.com

Ramiz

View 1 Replies View Related

Testing SQLServer Service State Error

Nov 16, 1998

Does anybody know what can cause this:

"? AutoStart - Testing SQLServer service state"

to write to the sqlexec.out file every five minutes? Thank you.
Alan

View 1 Replies View Related

SQLServer 2005 Install Error (was: Help Me SQl Setup)

Aug 26, 2006

I've problem in setup Microsoft SQL server 2005 when i click on setup this error message appear

View 9 Replies View Related

Error: 'Dts' Does Not Exist In The Namespace 'Microsoft.Sqlserver'

Jul 1, 2005

I tried to create a package from a C# program, and I copied this from SQL server online book:

View 13 Replies View Related

Error During Install Of SqlServer 2005 64 Bit Edition - Please Help!

Feb 19, 2007

Hi Folks,

   I'm receiving an error when i'm trying to setup a maintenance plan. I'm getting weird errors (and cannot continue) and i'm thinking it's related to a 32 bit error i received during installation on a 64 bit edition.

   Background
   We have a sql server behind hosted on a dedicated 64 bit box out of SanFran. The hosting company installed the 32 bit version of SqlServer 2005 standard on the box and I requested them to remove it and put the 64 bit edition on. They removed the 32 bit edition and installed the 64 bit edition. So far so good. I installed sp1 and that was fine. I then tried to start a MAINTENCE PLAN and was denied -> the component was not installed. I've asked them to install the component and they did, but they recorded an error during the install. The error screen shot is here: http://img525.imageshack.us/img525/5089/errormessagehs4.png

Now i cannot drop any tasks onto the maintenence plan ... so i'm assuming it's related to the above error. Is there any way i can determine what the 32 bit component is, remove it and re-install the correct component? Is there an error log somewhere where i can check things?

This is stopping me from setting up any backup plans :(

Regards,
Justin.

View 8 Replies View Related

SQLServer Error: 15404 With Active Directory

Apr 9, 2007

Hello,

I'm having trouble running jobs with my active directory (ADS) account. I've setup my SQL services to run under an ADS account, but jobs cannot seem to query ADS for user information. We're running Windows Server 2003 and SQL Server 2005 SP2.

Here is the error message:

==

The job failed. Unable to determine if the owner (ADSme) of job eFASRtest has server access (reason: Could not obtain information about Windows NT group/user 'ADSme', error code 0x5. [SQLSTATE 42000] (Error 15404)).

==



also this message in log:

==

[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'ADSme, error code 0x5. [SQLSTATE 42000] (ConnIsLoginSysAdmin)

==



I have done a *lot* of searching and cannot find the solution. I believe the 0x5 code is access denied.

The same job runs if I change the owner to a SQL login that's not an ADS account.

I'm not certain how to confirm that the SQL Agent account is the account actually querying ADS, also.

Any help would be greatly appreciated!



Thanks,



-Tony

View 19 Replies View Related

Soap Error Sqlserver Does Not Exist Or Access Denied

Sep 16, 2006

Hello All,I have a webservice uses a vb.net component that accesses thrid party dll to connect to a sqlserver dbase, username,dbase name ,server and password are passed to the third party dll for login purpose.This works fine in development evironment when pda client calls webservice, A soap error is thrown to the client "sqlserver does not exist or access denied" when the client calls the deployed webservice. I have tried the following 1. Added ASPNet user to the database 2.Added domian user to the database both has public and dbowner rightsCan any one help??[:'(]Thanks Regards    

View 1 Replies View Related

Microsoft.SQLServer.ManagedDTS.dll Reference Error In VB.Net 2002

Dec 19, 2006

I am using VB.NET 2002 and we have set up a test environment running SQL Server 2005.

I am trying to add a reference to Microsoft.SQLServer.ManagedDTS.dll which is required to run a DTS/SSIS package from VB.NET.

However the dll does not show in my add reference listing so when I select BROWSE and select the actual DLL I get a rather long error message telling me that only 'dll' and COM components can be referenced.

The exact message is:

A reference to 'C:Programs FilesMicrosoft SQL Server90SDKAssembliesMicrosoft.SQLServer.ManagedDTS.dll' could not be added. This is not a valid assembly or COM component. Only assemblies with extension 'dll' and COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly or COM component.



Any suggestions?

thanks

View 3 Replies View Related

Error Messages Upsizing From MSAccess Database To SQLServer

Apr 26, 2006

I am trying to use SQLServer for the first time and I am trying to use the upsizing wizard on Access to get moved over to SQLServer. I am getting the following error messages:

Connection failed:

SQLState: '01000'

SQL Server Error: 2

[Microsoft][ODBC SQL Server][Shared Memory]ConnectionOpen (Connect()).

Connection failed:

SQLState: '08001'

SQLServer Error: 17

[Microsoft][ODBC SQL Server][Shared Memory]SQL Server does not exist or access denied.



Does anyone know how I should proceed? Any help would be appreciated.

Thanks

View 6 Replies View Related

Error 80040154 Using Microsoft.SqlServer.Dts.Runtime.Package

May 8, 2008

I am executing an SSIS package from VB.NET code. Works great in design mode. When I publish it (using Click-Once), it works great on development computer but fails on a customer computer:

Microsoft.SqlServer.Dts.Runtime.DtsPipelineException: Retrieving the COM class factory for component with CLSID {E80FE1DB-D1AA-4D6B-BA7E-040D424A925C} failed due to the following error: 80040154. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E80FE1DB-D1AA-4D6B-BA7E-040D424A925C} failed due to the following error: 80040154.
at Microsoft.SqlServer.Dts.Runtime.Package..ctor()
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.Package..ctor()

My project references Microsoft.SQLServer.ManagedDTS.

The error occurs on the following line:

Dim objPackage As New Microsoft.SqlServer.Dts.Runtime.Package

Looking at various forum threads, it would appear that it's because either (1) DLL(s) are not registered on the customer machine, or (2) DLL(s) are missing from the customer machine. The first explanation doesn't seem right -- even though Microsoft.SQLServer.ManagedDTS is a COM dll, doesn't .NET provide a wrapper when it references it? I downloaded Process Explorer from Sysinternals.com to compare loaded DLLs on my dev box to those on the customer's box and while several dlls are loaded when the line is successfully loaded, all of them exist on the customer box.

Any help would be greatly appreciated.

View 17 Replies View Related

Regarding Ssis Package Error While Exporting To Excel From Sqlserver

Oct 23, 2007


I am exporting data to excel with ssis package.In my system it is working fine., but in server it is giving this error.All the connection string for database and excel file path are coming correct in run time with the help of package configeration.
one more thing is if we execute directly the package by double clicking in server it is working, but through my application it is giving this error.


An OLE DB error has occurred. Error code: 0x80040E09.
The ProcessInput method on component "Excel Destination" (22) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
Thread "WorkThread0" has exited with error code 0xC0202009.

someone help me.. thanks in advance.

View 4 Replies View Related

SQLSERVER-The System Cannot Find The File Specified(error While Running The JOB)

May 27, 2008

Hi,

I have a SQL Server Agent job set up to run a job that calls a dts package on the server.

When I run the DTS Package manually, everything works fine and does what it is supposed to do.

When I run the job, The job fails. If somebody had this error can you please help me out

I am getting following error in my job...

DTSRun: Loading...Error: -2147287038 (80030002);
Provider Error: 0 (0)
Error string: The system cannot find the file specified. Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts.hlp
Help context: 713.
Process Exit Code 1. The step failed.

could you please let me know what is the possible cause for the above error.

Many Thanks,
Madhu

View 1 Replies View Related

Execute Ssis And Loggin With Sqlserver Provider Cause Error

Aug 1, 2007

Hi,
I execute my ssis from BI without problem (debug mode), but when I import into SQL server and try to run with logging on sqlserver provider always my package failure.

If option of logging is empty all works fine (No one logging method is active).
There is some permission to set for this option?

I use into SiSS ole db native client connection.

Hope some one can help me.
Alen Italy

This belove is the error...

---------
An OLE DB error has occurred. Error code: 0x80040E37.
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80040E37 Description: "La transazione distribuita รจ stata
completata. Integrare questa sessione in una nuova transazione o nella
transazione Null.".

View 2 Replies View Related

SQLServer 2000 JDBC /SQL Exception Error Messages - Meaning?

Jul 20, 2005

Hi;I went to the microsoft site to try to find a guide to the errormessages that the jdbc drivers give ( for sqlserver 2000 ).I had no luck.Does anyone know if there is such a guide?I got this mysterious error message below in my logs ( nothing visiblein user land ).Anyone know what it means?Thanks in advanceStevejava.sql.SQLException: [Microsoft][SQLServer 2000 Driver forJDBC][SQLServer]Transaction (Process ID 151) was deadlocked on lockresources with another process and has been chosen as the deadlockvictim. Rerun the transaction.

View 5 Replies View Related

VB.Net 2005 Setup Creation Gets Error Using Microsoft.SqlServer.Dts.Runtime

Feb 3, 2007

I have a very small project written in VB.Net 2005 using the SQL Server 2005 SSiS DTSx package.

I migrated a SLQ 2000 DTS package using the SQL 2005 Legacy tools and saved the package as a local .DTSx package on our file server.

I need to run the package from a clients PC.

I added the reference Microsoft.SqlServer.ManagedDTS so I could then use the Microsoft.SqlServer.Dts.Runtime so I can execute the commands:

Dim oApp As New Application
Dim oPkg As New Package
oPkg = oApp.LoadPackage(g_DTSx_Directory & "AOC copy Generic1 CSV to AOC_verify_file_1.dtsx", Nothing)
Dim oResults As DTSExecResult
oResults = oPkg.Execute

Ok. That works fine and is basically the entire app. It executes without a hitch in debug and as a compiled exe on my PC, but I have all the tools. So now I try and create a setup project for this and I use the setup wizard.

During the creation of the setup project I get a message that states:
The following files may have dependencies that cannot be determined automatically. Please confirm that all dependencies have been added to the project.
C:windowssystem32msxml6.dll

OK. The dll is part of the reference I mentioned above and I have no idea what other dependencies it may have.

How do I find this out?

Has anyone else created a project like this and experenced the same?

I am on a clean build running WinXP Pro with SP2 - VS2005 with SP1 and the SQL Server 2005 tools.

View 4 Replies View Related

Error 3205 Restore SQLServer 2005 Express To MSDE

Aug 27, 2007

I am trying to restore a database backed up using SQL Server 2005 Express Edition to a server using MSDE. I get an error 3205 "Too many backup devices specified...64 max..."

I'm only specifying one file for the restore.

Ideas?

View 3 Replies View Related

Class Method Is Smoking Fast When Executed Outside Of SQLServer, Dog Slow As A CLR Function Is SQLServer - Anyone?

May 10, 2007

We have a static class that makes an HTTPWebRequest to get XML data from one of our vendors. We use this as input to a stored proc in SQLServer2005. When I compile this class and call it from a console application in visual studio it executes in milliseconds, everytime. When I compile it, create the assembly and clr function and execute it in SQLServer, it takes around 14 seconds to execute the first time, then on subsequent requests it is again really fast, until I wait for 10 seconds and re-execute, once again it is slow the first time and then fast on subsequent requests. We do not see this behavior when executing outside SQLServer. Makes me think that some sort of authentication is perhaps taking place the first time the function is run in SQLServer? I have no idea how to debug this further. Anyone seen this before or have any ideas?



Here is the class:






Code Snippet

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;

namespace Predict.Services
{
public static class Foo
{
public static string GetIntradayQuote(string symbol)
{
string returnQuote = "";

HttpWebRequest request = (HttpWebRequest)(WebRequest.Create("http://data.predict.com/predictws/detailed_quote.html?syms=" + symbol + "&fields=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,30"));

request.Timeout = 1000;

HttpWebResponse response = (HttpWebResponse)(request.GetResponse());

StreamReader streamReader = new StreamReader(response.GetResponseStream());

returnQuote = streamReader.ReadToEnd();

streamReader.Close();
response.Close();

return returnQuote;
}
}
}



When I run call it from a console app it is fine.



I compile it into a dll and then create the assembly and function as follows:






Code Snippet

drop function fnTestGetIntradayQuoteXML_SJS

go

drop assembly TestGetIntradayQuoteXML_SJS

go

create ASSEMBLY TestGetIntradayQuoteXML_SJS from 'c:DataBackupsCLRLibrariesTestGetIntradayQuote_SJS.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS

go

CREATE FUNCTION fnTestGetIntradayQuoteXML_SJS(@SymbolList nvarchar(max)) RETURNS nvarchar(max) AS EXTERNAL NAME TestGetIntradayQuoteXML_SJS.[Predict.Services.Foo].GetIntraDayQuote

go



declare @testing nvarchar(max)

set @testing = dbo.fnTestGetIntradayQuoteXML_SJS('goog')

print @testing





When I execute the function as above, again, really slow the first time, then fast on subsequent calls. Could there be something wrong with the code, or some headers that need to be set differently to operate from the CLR in SQLServer?



Regards,



Skipper.

View 1 Replies View Related

Problem Unicode Data 0x2300 In SQLServer 2000 SQLServer 2005 Express

Sep 20, 2006

Hi experts;
I have a problem with unicode character 0x2300
I created this table
create table testunicode (Bez nchar(128))

Insert Data
insert into testunicode (Bez)values('Œ€„ข')
with 2 Unicode characters
Œ€ = 0x2300
„ข = 0x2122

Selecting the data
select Bez from testunicode
I see
"?„ข"

„ข = 0x2122 is ok but instead of 0x2300 there is 0x3f

When I modify the insert statement like that ( 8960 = 0x2300 )
insert into testunicode (Bez)values(NCHAR(8960)+'„ข')

and select again voila i see
"Œ€„ข"
Does anyone have an idea?

Thanks

View 1 Replies View Related

Trying To 'load' A Copy Of A SQLServer 2000 Database To SQLServer 2005 Express

Apr 18, 2008



I am trying to 'load' a copy of a SQLServer 2000 database to SQLServer 2005 Express (on another host). The copy was provided by someone else - it came to me as a MDF file only, no LDF file.

I have tried to Attach the database and it fails with a failure to load the LDF. Is there any way to bypass this issue without the LDF or do I have to have that?

The provider of the database says I can create a new database and just point to the MDF as the data source but I can't seem to find a way to do that? I am using SQL Server Management Studio Express.

Thanks!!

View 1 Replies View Related

Error Connecting To The Sqlserver Express Edition From Visual Web Developer 2005

Dec 19, 2007

hello eveyone..i have just downloaded and installed the visaul web developer 2005 express edition and sqlserver 2005 express edition.On top of that i even downloaded and installed the northwind database.But my problem is when i am connecting to the northwind database by clicking toos menu>connect to the database>choose datasource>new connection>..i have provided it with the required information..but as soon as i press "Test Connection" button the following error box displays.. "an error has occured while establishing a connection to the server.when connecting to the sql server2005,this failure may be caused by the fact that under default settings sql server doestnot allow remote connections.(provider:Named piped providers,error:40-couldnot open a connection to sqlserver.)" i have no idea whats is all about..can anyone get me pass this error..    

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved