Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Thursday, March 29, 2012

Attach MySql database via internet

Hie !

Please, how to manage (attach,connect to) MySql database located on host server http://www.avanti.si from my home PC with Microsoft SQL Server Management Studio Express? This "http://www.avanti.si:8080\MySqlDatabaseName,3306" fail !

Thenks!

hi,

you should ask you provider about connection info..

assuming the "server" is named and available as "www.avanti.si" and 3306 is the port you have to use to connect to, you should provide that info in the SQL Server MAnagement Studio Express connection dialog as

www.avanti.si,3306
in the server property, and provide your SQL Server standard login and pwd.. in the "options" tab you can, but is not mandatory as the <default> value will be resolved as tcp/ip, set the network protocol as tcp/ip and specify the "connect to database" property to "MySqlDatabase", but this one should be resolved as well without your intervention becouse you should be usually only grated db access to your db, MySqlDatabase...

you have to verify the www.avanti.si is the actual SQL Server instance name as well, and I doubt about it..

regards

|||

Actually, you can't connect directly to MySQL database, Management Studio is designed for use with SQL Server. You can create a linked server to any database that offers an OLEDB provider, which I believe MySQL has. The linked server will allow you to query your data from MySQL, but not manage the database.

Regards,

Mike

|||

ooppss...

did not notice/intended MySqlDatabase as a "MySql.. database"

thank you Mike

Tuesday, March 27, 2012

attach db

How can I attach a remote db via Enterprise Manager or Query Analyzer?
Am I wrong if I launch a "sp_attach" sql file (from my local machine) to the remote server?
Do I really have to detach local db before?
Please can someone just tell me how he did?

SaoriHi saori,
1. Did you try to post your question in the DBA section of these forums:

http://www.sqlteam.com/Forums/


http://www.sql-server-performance.com/forum/default.asp

2. Hope some DBA will help you.|||Thanks for the answer.
I'll (quickly) give it a try.

(I posted a msg there 'cause it is above all a question of method about sql server tools)

Saori|||Honestly, I attach remote db's by creating a new registration. Unless you mean something else like fiberchanneling or something, but as for having your SQL Enterprise Manager utilize a Remote SQL Server, just create a new registration.

For T-SQL based methods, you're not necessarily attaching. I'd say it's more Linked Server, or Using Remote Servers. check books online for those two in the Index tab.

SP_LinkedServers and the other method would be actually using the enterprise manager to create the registration.|||Saori,

You didn't clearly define your question about what you want to 'attach', but I think I have understood what you were saying. I would redefine your question with several possible solutions.

Assume, you have a local SQL server in your machine, and there is another SQL server in a remote machine. There is a database called pubs1 existing in the remote SQL server. You want it APPEARS ('attach') in your SQL server.

1. Logical APPEAR:
As KraGiE suggested you could make a new Server Registration in your local SQL Enterprise Manager to LINK to that remote SQL server. In this way, you would bring the whole SQL server including the pubs1 into your local SQL Enterprise Manager.

However, to do so, you need to have the access to the database, say: machine name, login name and password. It is possible that you could only access one database in that server, say, pubs1. But that is enough for you. By the way, if the remote server is not within your LAN, and need to be linked through HTTP, you should have the server IP address and also the access to possible firewall.

I called this kind of 'attach' as logical APPEARS, because the database is not physically in your machine, but still at the remote server. You can only access the database through your Enterprise Manager. The database pubs1 appearing in your Enterprise Manager is just a pointer linked to the remote server.

2. Physical APPEAR:
In short, get a physical copy from the remote server and 'attach' it to your local server.

Step 1:
Copy the database file and the log file into your local machine. In this case, pubs1 files are located by default at:
C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs1.MDF
C:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs1_log.LDF
You need shut down the remote database for copy/past, otherwise, it wouldn't work.

Step 2:
from Enterprise Manager, right click the Databases object in your local SQL instance, choose all tasks --> attach database ... . From the Attach Database window, choose your database file, pubs1, and then OK.

3. If you didn't have SQL 2000, instead of SQL 7.0, then the Step 2 would not avaiable in Enterprise Manager. You would have to use the command 'sp_attach_db' to do the job. Something like:


EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs1.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log1.ldf'

4. Finally, if you even didn't have SQL server 7.0, you couldn't do the trick of 'attach'. But, you could do the job with SQL server 6.5 Enterprise Manager 'Database/Object transfer' tool given you have access to the remote database, where there is equivalent tools in both SQL 7.0/2000, called Import Data/Export Data, but not as easy used as the ATTACH method.

Hope this helps.|||Thanks Phuoc, KraGiE and ghan.
This really helped me understand essential issues.

Great analysis , ghan (copied in my notepad)!
Just one little thing:
When I attach db via Enterprise Manager, do I automatically transfer log file as well?|||saori,

I am really happy to hear that. You know what, when I made some analyses to other people, I just summarize what I have done and clear my understanding about this issue myself.

When I attach db via Enterprise Manager, do I automatically transfer log file as well?

You see the example:


EXEC sp_attach_db @.dbname = N'pubs',
@.filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs1.mdf',
@.filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log1.ldf'

There are two files, one is *.mdf, the data file, another is *.ldf, the log file.

When you use enterprise manager to do the job, you will see, (at STEP 2) you only need browse the *.mdf file in, while the *.ldf file will be brought in automatically, assuming you have copied the two files into the same directory (Step 1).

Good luck.|||I have a project lets say project1. I have a copy of it running on my development server and a copy of it on my production server. I have detached db from development server and attached it to my production server. I can work in db using Enterprise manager but when I try to run my applications it doesnt work. I know why it doesnt work its because its looking for user developmentserver and now its on productionserver. Is there a way to set permissions for user productionserver without having to do every table and stored procedure one at a time? I would like to do it quickly and efficiently and doing all by hand one at a time is neither.
Please help.|||There is a security issue. You must use Windows Authentification, instead of SQL Server Authentification. You might change your connection string to use SQL Server authentification. If you want to keep to use windows authentification, you need to setup your security in your production server to make your application assistent with your SQL server.

attach database option disabled

Hi,
I am trying to attach a database via enterprise manager
but the option to this is disabled. Is there anyway I can
enable this option?
Thanks in advance
JenC
Is the server you're connected to using SQL Server 7? If so, then no, you
cannot enable it. However, you can do the attach via Query Analyzer using
sp_attach_db (look up syntax in BOL).
"JenC" <anonymous@.discussions.microsoft.com> wrote in message
news:1b4401c4999a$277726f0$3a01280a@.phx.gbl...
> Hi,
> I am trying to attach a database via enterprise manager
> but the option to this is disabled. Is there anyway I can
> enable this option?
> Thanks in advance
> JenC
|||Hi,
I am using SQL 2000 and I have tried using sp_attach_db
but with no joy.
Thanks.

>--Original Message--
>Is the server you're connected to using SQL Server 7? If
so, then no, you
>cannot enable it. However, you can do the attach via
Query Analyzer using
>sp_attach_db (look up syntax in BOL).
>
>"JenC" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:1b4401c4999a$277726f0$3a01280a@.phx.gbl...
can
>
>.
>
|||Check the version of SQLServer you are trying to attach the DB to.
If you use SQL 2000 Enterprise Manager to administer a SQL 7 server, the
Attach Database menu item will be disabled.
"JenC" wrote:

> Hi,
> I am trying to attach a database via enterprise manager
> but the option to this is disabled. Is there anyway I can
> enable this option?
> Thanks in advance
> JenC
>
|||"JenC" <anonymous@.discussions.microsoft.com> wrote in message
news:124b01c4999d$6ca7ada0$a301280a@.phx.gbl...
> I am using SQL 2000 and I have tried using sp_attach_db
> but with no joy.
Do you want to post your error and some more information about the
problem? How was the database detached?
|||Hi,
I have sorted it out now (touch wood). Basically we have a
setup program that as part of the install installs MSDE
2000, unfortunately on some PC's (mainly Win XP PCs) it
installs the earlier version of MSDE and this is what
caused the confusion. I have now successfully installed
MSDE 2000 and I can now attach databases to my hearts
content.
Thanks for your help.
Jen

>--Original Message--
>"JenC" <anonymous@.discussions.microsoft.com> wrote in
message
>news:124b01c4999d$6ca7ada0$a301280a@.phx.gbl...
> Do you want to post your error and some more
information about the
>problem? How was the database detached?
>
>.
>

attach database option disabled

Hi,
I am trying to attach a database via enterprise manager
but the option to this is disabled. Is there anyway I can
enable this option?
Thanks in advance
JenCIs the server you're connected to using SQL Server 7? If so, then no, you
cannot enable it. However, you can do the attach via Query Analyzer using
sp_attach_db (look up syntax in BOL).
"JenC" <anonymous@.discussions.microsoft.com> wrote in message
news:1b4401c4999a$277726f0$3a01280a@.phx.gbl...
> Hi,
> I am trying to attach a database via enterprise manager
> but the option to this is disabled. Is there anyway I can
> enable this option?
> Thanks in advance
> JenC|||Hi,
I am using SQL 2000 and I have tried using sp_attach_db
but with no joy.
Thanks.
>--Original Message--
>Is the server you're connected to using SQL Server 7? If
so, then no, you
>cannot enable it. However, you can do the attach via
Query Analyzer using
>sp_attach_db (look up syntax in BOL).
>
>"JenC" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1b4401c4999a$277726f0$3a01280a@.phx.gbl...
>> Hi,
>> I am trying to attach a database via enterprise manager
>> but the option to this is disabled. Is there anyway I
can
>> enable this option?
>> Thanks in advance
>> JenC
>
>.
>|||"JenC" <anonymous@.discussions.microsoft.com> wrote in message
news:124b01c4999d$6ca7ada0$a301280a@.phx.gbl...
> I am using SQL 2000 and I have tried using sp_attach_db
> but with no joy.
Do you want to post your error and some more information about the
problem? How was the database detached?|||Hi,
I have sorted it out now (touch wood). Basically we have a
setup program that as part of the install installs MSDE
2000, unfortunately on some PC's (mainly Win XP PCs) it
installs the earlier version of MSDE and this is what
caused the confusion. I have now successfully installed
MSDE 2000 and I can now attach databases to my hearts
content.
Thanks for your help.
Jen
>--Original Message--
>"JenC" <anonymous@.discussions.microsoft.com> wrote in
message
>news:124b01c4999d$6ca7ada0$a301280a@.phx.gbl...
>> I am using SQL 2000 and I have tried using sp_attach_db
>> but with no joy.
> Do you want to post your error and some more
information about the
>problem? How was the database detached?
>
>.
>

Thursday, March 22, 2012

Asynchronous events to database clients via DAL?

Greetings, I have a requirement for a SQL Server 2005 database to

notify 3rd Party applications of a table change. As is stands now, 3rd

Party applications access the database via a Data Access Layer (DAL)

dll (C#). I'd like to somehow implement an asychronous event

notification scheme via the same DAL to these clients.

Can someone offer a clever way to implement such events?

Broker Services? I am under the impression the SSBS is typically deployed when databases are to communicate with one another.

Triggers to call some CLR code?

Other?

Thanks in advance,
Loopsludge

In SQL 2005 there is a buil-in solution for 'table change' notifications, namely Query Notifications and the technologies based on it (SqlNotifications, SqlDependency, SqlCacheDependency). See this post for a discussion on them: http://blogs.msdn.com/remusrusanu/archive/2006/06/17/635608.aspx

If your goal is a generic notification platform, then some questions arrise:
What kind of events would you notify (data changes, dirty cache notifications, arbitrary events)?
Where are the subscribers located (same appdomain, same machine, different machines)?
What scale do you need (tens, hundreds or millions of subscribers)?
What kind of reliability is desired for the notifications (what is the cost of loosing one notification, what happens if the subscriber or publisher are recycled)?
Are the subscriptions and/or notifications persistent or transient?

Service Broker offers persisted, reliable communication channel between services hosted on SQL 2005 databases.

HTH,
~ Remus

|||Greetings Remus,

Sorry it has taken me so long to respond. I have been exploring Query Notifications. I'm still not certain this is the correct way to go.

In answer to your questions:

What kind of events would you notify (data changes, dirty cache notifications, arbitrary events)?
I am interested in notifying clients of data changes, specifically new records.

Where are the subscribers located (same appdomain, same machine, different machines)?
The DAL will be consumed by 3rd Party applications located on a different machine.

What scale do you need (tens, hundreds or millions of subscribers)?
The number of subscribers will be very small. In most cases only 1 but potentially there could be more but not many, five max.

What

kind of reliability is desired for the notifications (what is the cost

of loosing one notification, what happens if the subscriber or

publisher are recycled)?
Now this is a very interesting question. I was reading up on the SqlDependency and noticed that one has to re-submit for each notification from the database. What happens if an event occurs inbetween the time the last notification is being processed and the event subscription? Is it lost? If so then that's a bummer. How might I get around this? Service Broker seems like serious overkill.

Are the subscriptions and/or notifications persistent or transient?
I'm not quite sure I understand completely. Could you please explain? (Sorry)

Best Regards,
Loopsludgesql

Monday, March 19, 2012

Assigning values to multiple variables (via subqueries) for use in an update

Hi, figured out where I was going wrong in my post just prior, but is
there ANY way I can assign several variables to then use them in an
Update statement, for example (this does not work):

ALTER PROCEDURE dbo.UpdateXmlWF
(
@.varWO varchar(50)
)
AS
DECLARE @.varCust VARCHAR(50)
SELECT @.varCust = (SELECT Customer FROM tblWorkOrders
WHERE WorkOrder=@.varWO)

DECLARE @.varAssy VARCHAR(50)
SELECT @.varAssy=(SELECT Assy FROM tblWorkOrders
WHERE WorkOrder=@.varWO)

UPDATE statement here using declared variables...

I can set one @.variable but not multiple. Any clues? kinda new to
this.

Thanks,
KathyKathy,

See my response to your previous post.

I think you want to try this instead:

DECLARE @.varCust varchar(50), varAssy varchar(50)
SELECT @.varCust = Customer,
@.varAssy = Assy
FROM tblWorkOrders
WHERE WorkOrder = @.varWO

UPDATE table
SET field = @.varCust,
field2 = @.varAssy
where somefield = somevalue

In fact, you could condense this to the following:

UPDATE table
SET field = tblWorkOrders.Customer,
field2 = tblWorkOrders.Assy
FROM tblWorkOrders
JOIN table ON tblWorkOrders.PK = table.FK
WHERE tblWorkOrders.WorkOrder = @.varWO
AND otherconditions...

Hope this helps.

--
-Chuck Urwiler, MCSD, MCDBA
http://www.eps-software.com|||Kathy,

You don't need two separate SELECT statements to assign values to your
variables. You can do it like this:

DECLARE @.varCust VARCHAR(50),
@.varAssy VARCHAR(50)

SELECT @.varCust = Customer,
@.varAssy = Assy
FROM tblWorkOrders
WHERE WorkOrder = @.varWO

But I don't understand your problem with inserting. You can modify as many
columns as you want in UPDATE statement. What's your problem here?
By the way, if these variables have been declared just to use in your UPDATE
statement, then you don't really need them. You can join tblWorkOrders table
with whatever table you want update and fetch values from tblWorkOrders
directly into your destination table.

Shervin

"KathyB" <KathyBurke40@.attbi.com> wrote in message
news:75e8d381.0310030718.82cad7f@.posting.google.co m...
> Hi, figured out where I was going wrong in my post just prior, but is
> there ANY way I can assign several variables to then use them in an
> Update statement, for example (this does not work):
> ALTER PROCEDURE dbo.UpdateXmlWF
> (
> @.varWO varchar(50)
> )
> AS
> DECLARE @.varCust VARCHAR(50)
> SELECT @.varCust = (SELECT Customer FROM tblWorkOrders
> WHERE WorkOrder=@.varWO)
> DECLARE @.varAssy VARCHAR(50)
> SELECT @.varAssy=(SELECT Assy FROM tblWorkOrders
> WHERE WorkOrder=@.varWO)
> UPDATE statement here using declared variables...
> I can set one @.variable but not multiple. Any clues? kinda new to
> this.
> Thanks,
> Kathy

Saturday, February 25, 2012

Assert Permission - ISSUE.

Hi All,
I am using a .net dll in my RDL, I have done all the steps to implement the
custom assembly in the report.
--
Message posted via http://www.sqlmonster.comLook at this thread, you have to get Reporting Services trust your DLL.
http://groups.google.de/groups?hl=de&lr=&threadm=OAxg3EQRFHA.4028%40tk2msftngp13.phx.gbl&rnum=1&prev=/groups%3Fq%3Dreporting%2Bservices%2Bassembly%2Bgac%26hl%3Dde%26lr%3D%26scoring%3Dd%26selm%3DOAxg3EQRFHA.4028%2540tk2msftngp13.phx.gbl%26rnum%3D1
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"BALAJI KRISHNAN via SQLMonster.com" <forum@.nospam.SQLMonster.com> schrieb
im Newsbeitrag news:25b6837f5aaf4a7589ef4ac1bd3cd615@.SQLMonster.com...
> Hi All,
> I am using a .net dll in my RDL, I have done all the steps to implement
> the
> custom assembly in the report.
> --
> Message posted via http://www.sqlmonster.com|||Sorry hit the Post Message button... Remaining Message...
I have done all the steps...
Step 1) Copying the dll to the C:\Program Files\Microsoft SQL Server\MSSQL\
Reporting Services\ReportServer\bin\
and
C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer\ - Folders
Step 2) Create Permission Set and Code Group and changing the
rssrvpolicy.config file...
See my Permission Set and Code Group added to the file
<PermissionSet class="NamedPermissionSet"
version="1"
Name="CCPermissionSet">
<IPermission class="SecurityPermission"
version="1"
Flags="Assertion, Execution"/>
</PermissionSet>
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="CCPermissionSet"
Name="CCCodeGroup"
Description="">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="file://C:/Program
Files/Microsoft SQL Server/MSSQL/Reporting
Services/ReportServer/bin/CreditCardDecrypt.dll"/>
</CodeGroup>
Step 3) Refering the dll in the RDL (Properties - Reference - map dll)
Step 4) This is the Important step...Where I am missing...I need to give
the Assert permission to my code..I dont know what Assert Permission I need
to give for my dll...(As we give for SqlClientPermission...)
See my dll code...
public static string DecryptCardInfo(string cc,string subjectName,string
storeName)
{
string sCreditCard = "";
try
{
SecurityPermission secPerm = new SecurityPermission
(PermissionState.Unrestricted);
secPerm.Assert();
WSEX509.X509CertificateStore.StoreLocation location =WSEX509.X509CertificateStore.StoreLocation.CurrentUser;
WSEX509.X509CertificateStore.StoreProvider provider =WSEX509.X509CertificateStore.StoreProvider.System;
WSEX509.X509CertificateStore store = new WSEX509.X509CertificateStore
(provider, location, storeName);
bool fopen = store.OpenRead();
if(fopen)
{
WSEX509.X509CertificateCollection certs =store.FindCertificateBySubjectString(subjectName);
if (certs.Count > 0)
{
WSEX509.X509Certificate cer = certs[0];
WSECRY.RSACryptoServiceProvider rsaCsp =(WSECRY.RSACryptoServiceProvider)cer.Key;
byte[] cipherData = Convert.FromBase64String(cc);
byte[] plainData = rsaCsp.Decrypt(cipherData, false);
sCreditCard = Encoding.UTF8.GetString(plainData);
}
}
if (store != null)
store.Close();
return sCreditCard;
//return cc;
}
catch(Exception ex)
{
return ex.ToString();
}
}
}
I am in Need your help Immediately..because I am stuck with this for the
past days..and have no clue for this...
If you need any more information please send a note I can give u
immediately...
Thanks in advance...
balaji.
--
Message posted via http://www.sqlmonster.com|||Try to place you DLL in the GAC to identify wheter it is a security problem.
"BALAJI KRISHNAN via SQLMonster.com" <forum@.SQLMonster.com> schrieb im
Newsbeitrag news:7f6dadd296e74d5a9a51a62bac995613@.SQLMonster.com...
> Sorry hit the Post Message button... Remaining Message...
> I have done all the steps...
> Step 1) Copying the dll to the C:\Program Files\Microsoft SQL
> Server\MSSQL\
> Reporting Services\ReportServer\bin\
> and
> C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer\ - Folders
> Step 2) Create Permission Set and Code Group and changing the
> rssrvpolicy.config file...
> See my Permission Set and Code Group added to the file
> <PermissionSet class="NamedPermissionSet"
> version="1"
> Name="CCPermissionSet">
> <IPermission class="SecurityPermission"
> version="1"
> Flags="Assertion, Execution"/>
> </PermissionSet>
> <CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="CCPermissionSet"
> Name="CCCodeGroup"
> Description="">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="file://C:/Program
> Files/Microsoft SQL Server/MSSQL/Reporting
> Services/ReportServer/bin/CreditCardDecrypt.dll"/>
> </CodeGroup>
>
> Step 3) Refering the dll in the RDL (Properties - Reference - map dll)
> Step 4) This is the Important step...Where I am missing...I need to give
> the Assert permission to my code..I dont know what Assert Permission I
> need
> to give for my dll...(As we give for SqlClientPermission...)
>
> See my dll code...
> public static string DecryptCardInfo(string cc,string subjectName,string
> storeName)
> {
> string sCreditCard = "";
> try
> {
> SecurityPermission secPerm = new SecurityPermission
> (PermissionState.Unrestricted);
> secPerm.Assert();
> WSEX509.X509CertificateStore.StoreLocation location => WSEX509.X509CertificateStore.StoreLocation.CurrentUser;
> WSEX509.X509CertificateStore.StoreProvider provider => WSEX509.X509CertificateStore.StoreProvider.System;
> WSEX509.X509CertificateStore store = new WSEX509.X509CertificateStore
> (provider, location, storeName);
> bool fopen = store.OpenRead();
> if(fopen)
> {
> WSEX509.X509CertificateCollection certs => store.FindCertificateBySubjectString(subjectName);
> if (certs.Count > 0)
> {
> WSEX509.X509Certificate cer = certs[0];
> WSECRY.RSACryptoServiceProvider rsaCsp => (WSECRY.RSACryptoServiceProvider)cer.Key;
> byte[] cipherData = Convert.FromBase64String(cc);
> byte[] plainData = rsaCsp.Decrypt(cipherData, false);
> sCreditCard = Encoding.UTF8.GetString(plainData);
> }
> }
> if (store != null)
> store.Close();
> return sCreditCard;
> //return cc;
> }
> catch(Exception ex)
> {
> return ex.ToString();
> }
> }
> }
>
> I am in Need your help Immediately..because I am stuck with this for the
> past days..and have no clue for this...
> If you need any more information please send a note I can give u
> immediately...
> Thanks in advance...
> balaji.
> --
> Message posted via http://www.sqlmonster.com|||Hi Jens,
I have placed the dll in the GAC sucessfully.
But still I got #Error...
Balaji
--
Message posted via http://www.sqlmonster.com|||CAN MICROSOFT FOLKS HELP ON THIS....
STILL FACING THE ISSSUE..
THANKS IN ADVANCE
BALAJI
--
Message posted via http://www.sqlmonster.com|||Hi Balaji,
Is your problem is solve of acessing .net dll in reporting service.
I am also having the same problem where my .Net dll reads the config file to
get another file URL which has stored another file URL and using this new URL
(XML file) i am accessing the result through XMldocument and returing the
result back. But the security issue is the main issue which i am not able to
solve. If you can help me out i'll be helpful to you.
Thanks
Jasvinder
"BALAJI KRISHNAN via SQLMonster.com" wrote:
> Hi All,
> I am using a .net dll in my RDL, I have done all the steps to implement the
> custom assembly in the report.
> --
> Message posted via http://www.sqlmonster.com
>

ASPNETDB.MDF: The process cannot access the file because it is being used by another proce

Hi,

I'm trying to upload the ASPNETDB.MDF file to a hosting server via FTP, and everytime when it was uploaded half way(40% or 50%)

I would get an error message saying:

"550 ASPNETDB.MDF: The process cannot access the file because it is being used by another process"

and then the upload failed.

I'm using SQL Express. Does anybody know what's the cause?

Thanks a lot

It is because there are some users who are accessing the database through your web application. When the database is in process you cannot replace it. If you want to upload you need to make sure that no one is accessing your application. ASP.NET provides an easy way to disconnect all the clients to your web application with app_offline.htm file

Just create a simple html file with name app_offline. First upload this file to the web root of your application. Once this file was placed into the root directory, all clients will be disconnected and you can make some quick changes like replacing files etc, and after you finish replacing the files, delete the app_offline.htm file from the root.

You can also display a friend message in the app_offline like "Site under maintenance"

app_offline.htm file:

<html>
<body>
Site under maintenance!
</body>
</html>

Thanks

Sunday, February 19, 2012

Asp+sql sercer

I have sql server express at my PC-windows xp professional, I try to connect to a table via asp (queryString :"Driver={SQL Server};" &"Server=localhost;" & _
"Database=local;" & "Uid=dimis;" & "Pwd=network;" but there is an error
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]"The SQL server does not exist or there is no permission.
I can login with EMS lite both with sql server Auth. and windows auth.
What is fault?
DimisI try this: Provider=SQLOLEDB;Persist Security Info=False;User ID=nikos;pwd=nikos;Initial Catalog=LOCAL;Data Source=localhost\SQLEXPRESS;Connect Timeout=120"|||Refer KBA http://support.microsoft.com/kb/328306/en-us to resolve the issue.

ASP/ODBC/Win2k - TCP Connections

Is it normal to see a new TCP connection for every SQL statement
executed [via ADODB.Recordset.Open] when connection pooling is
switched on?
When my ASP application is running there seems to be 1 constant
connection open, and 3 or 4 separate and continually opening/closing
connections. On examining the packets, it seems that each SQL gets
its own connection to the server.
Thanks
()z
If you are using ODBC this is not uncommon. ODBC determines when it needs
to spawn a new connection and does so. This can occur if a connection has
not finished processing all records and another request is sent. A new
connection has to be spawned to service this request.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||Thanks Rand
I'll not worry about them in that case.
rboyd@.onlinemicrosoft.com (Rand Boyd [MSFT]) wrote in message news:<L71m5yREEHA.3244@.cpmsftngxa06.phx.gbl>...
> If you are using ODBC this is not uncommon. ODBC determines when it needs
> to spawn a new connection and does so. This can occur if a connection has
> not finished processing all records and another request is sent. A new
> connection has to be spawned to service this request.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.