Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts

Friday, March 30, 2012

how can i connect to two databases?

hello,

i want to make a relation betwen one of my tables and the user tables (to take it's unique ID), if there isn't any methode to do that without using the two databases(ASPNETDB - automaticly created when a user registers, and MyData), how can i connect to both databases? here is my connection string, but what should i do?

<connectionStrings> <add name="SiteConnection" connectionString="Server=(local)\SqlExpress; Integrated Security = True; Database = MyData" providerName="System.Data.SqlClient" /> <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MyData.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /></connectionStrings>
thank you

Hello zuperboy90,

Maybe you should take a look at this post:-

Asp.net database created at for memebership logan

Cheers,

Eric

|||

is there any problem if i use the same databse(created by default) for users and my other things?...but still, it will be a very big mess there

|||

Hello zuperboy90,

I don't think there is any problem I supposed. If someone out there aware of any potential problem, please share your concerns with us.

Thank you.

Regards,

Eric

Wednesday, March 28, 2012

How can I compare two databases?

I have two databases - I will call them database A and database B.

I want to run some code on database A, and then check if database A became identical to database B.

How can I compare two databases? I want to compare them in terms of structure, not content.

Any suggestions? Thank you!there r couple of tools avialable in the market.
Check Red Gate Tools|||Does anybody know such a product that is free...I find a couple of products but they have only 14 days free trial period. I need such a tool for longer time...|||Does anybody know such a product that is free...I find a couple of products but they have only 14 days free trial period. I need such a tool for longer time...

Longer time? much better to make a program for that in that case. VB or something.|||If the databases are on the same server, then compare the sysobjects, syscolumns, and other system tables between the two using a full outer join on the natural keys, and listing any exceptions or discrepancies.|||Here's the poor mans way...

Generate a db script in EM for both databases. Then compare both text files.

Monday, March 26, 2012

How can I cancel a backup?

I'm running SBS 2003 Premium. I've got several databases set up to be backed
up nightly, but I have deleted one of them since I set up the backup jobs.
Unfortunately, even though the database is deleted, it still tries to back it
iup each night and I get an error in the "Monitoring and Reporting" page in
Server Management.
I set up the backups through SQL server. I can't seem to find where the
backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
in Enterprise Manager under Maintenance Plans and under Management -> Backup.
The backups were not set with Maintenance Plans, they were set by right
clicking on the individual databases and selecting "Backup Database."
How do I cancel the backup?
Thank you in advance.
JonEM, Management, SQL Server Agent, Jobs.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in message
news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
> I'm running SBS 2003 Premium. I've got several databases set up to be backed
> up nightly, but I have deleted one of them since I set up the backup jobs.
> Unfortunately, even though the database is deleted, it still tries to back it
> iup each night and I get an error in the "Monitoring and Reporting" page in
> Server Management.
> I set up the backups through SQL server. I can't seem to find where the
> backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
> in Enterprise Manager under Maintenance Plans and under Management -> Backup.
> The backups were not set with Maintenance Plans, they were set by right
> clicking on the individual databases and selecting "Backup Database."
> How do I cancel the backup?
> Thank you in advance.
> Jon
>|||That worked! Thank you very much!
Jon
"Tibor Karaszi" wrote:
> EM, Management, SQL Server Agent, Jobs.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in message
> news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
> > I'm running SBS 2003 Premium. I've got several databases set up to be backed
> > up nightly, but I have deleted one of them since I set up the backup jobs.
> > Unfortunately, even though the database is deleted, it still tries to back it
> > iup each night and I get an error in the "Monitoring and Reporting" page in
> > Server Management.
> >
> > I set up the backups through SQL server. I can't seem to find where the
> > backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
> > in Enterprise Manager under Maintenance Plans and under Management -> Backup.
> >
> > The backups were not set with Maintenance Plans, they were set by right
> > clicking on the individual databases and selecting "Backup Database."
> >
> > How do I cancel the backup?
> >
> > Thank you in advance.
> >
> > Jon
> >
>
>

How can I cancel a backup?

I'm running SBS 2003 Premium. I've got several databases set up to be backed
up nightly, but I have deleted one of them since I set up the backup jobs.
Unfortunately, even though the database is deleted, it still tries to back it
iup each night and I get an error in the "Monitoring and Reporting" page in
Server Management.
I set up the backups through SQL server. I can't seem to find where the
backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
in Enterprise Manager under Maintenance Plans and under Management -> Backup.
The backups were not set with Maintenance Plans, they were set by right
clicking on the individual databases and selecting "Backup Database."
How do I cancel the backup?
Thank you in advance.
Jon
EM, Management, SQL Server Agent, Jobs.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in message
news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
> I'm running SBS 2003 Premium. I've got several databases set up to be backed
> up nightly, but I have deleted one of them since I set up the backup jobs.
> Unfortunately, even though the database is deleted, it still tries to back it
> iup each night and I get an error in the "Monitoring and Reporting" page in
> Server Management.
> I set up the backups through SQL server. I can't seem to find where the
> backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
> in Enterprise Manager under Maintenance Plans and under Management -> Backup.
> The backups were not set with Maintenance Plans, they were set by right
> clicking on the individual databases and selecting "Backup Database."
> How do I cancel the backup?
> Thank you in advance.
> Jon
>
|||That worked! Thank you very much!
Jon
"Tibor Karaszi" wrote:

> EM, Management, SQL Server Agent, Jobs.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in message
> news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
>
>

How can I cancel a backup?

I'm running SBS 2003 Premium. I've got several databases set up to be backe
d
up nightly, but I have deleted one of them since I set up the backup jobs.
Unfortunately, even though the database is deleted, it still tries to back i
t
iup each night and I get an error in the "Monitoring and Reporting" page in
Server Management.
I set up the backups through SQL server. I can't seem to find where the
backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
in Enterprise Manager under Maintenance Plans and under Management -> Backup
.
The backups were not set with Maintenance Plans, they were set by right
clicking on the individual databases and selecting "Backup Database."
How do I cancel the backup?
Thank you in advance.
JonEM, Management, SQL Server Agent, Jobs.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in messag
e
news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
> I'm running SBS 2003 Premium. I've got several databases set up to be bac
ked
> up nightly, but I have deleted one of them since I set up the backup jobs.
> Unfortunately, even though the database is deleted, it still tries to back
it
> iup each night and I get an error in the "Monitoring and Reporting" page i
n
> Server Management.
> I set up the backups through SQL server. I can't seem to find where the
> backups jobs are "stored." I looked at Scheduled Tasks, the registry, and
> in Enterprise Manager under Maintenance Plans and under Management -> Back
up.
> The backups were not set with Maintenance Plans, they were set by right
> clicking on the individual databases and selecting "Backup Database."
> How do I cancel the backup?
> Thank you in advance.
> Jon
>|||That worked! Thank you very much!
Jon
"Tibor Karaszi" wrote:

> EM, Management, SQL Server Agent, Jobs.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Jonathan R. Karp" <JonathanRKarp@.discussions.microsoft.com> wrote in mess
age
> news:8FBB877F-E6FF-47F4-8900-FEFBD92E0653@.microsoft.com...
>
>sql

Friday, March 23, 2012

How can i backup sql 2000 using win 2003 backup util

Hi
I have a windows 2003 server running sql. I would like to backup SQL 2000
databases using the built in backup software to a network location.
Could anyone tell me how i do this.
Thanks
NickTo do this properly, you would have to take the databases offline, or stop
the SQL Server service.
Are you not able to use the built-in-and-highly-effective SQL Server backup
and then take those .bak files to a network location?
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
"Nick" <andync55@.hotmail.com> wrote in message
news:OvQct%23a1FHA.2428@.tk2msftngp13.phx.gbl...
> Hi
> I have a windows 2003 server running sql. I would like to backup SQL 2000
> databases using the built in backup software to a network location.
> Could anyone tell me how i do this.
>
> Thanks
> Nick
>|||Hi
Thanks for the fast reply. Can i do that by right clicking on each databse
and selecting backup. Is that all i need to do. Is there any other sql
setting i should backup other than just the databases.
Thanks
--
Nick Comper
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:ehe21Jb1FHA.3660@.TK2MSFTNGP15.phx.gbl...
> To do this properly, you would have to take the databases offline, or stop
> the SQL Server service.
> Are you not able to use the built-in-and-highly-effective SQL Server
> backup and then take those .bak files to a network location?
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
>
> "Nick" <andync55@.hotmail.com> wrote in message
> news:OvQct%23a1FHA.2428@.tk2msftngp13.phx.gbl...
>> Hi
>> I have a windows 2003 server running sql. I would like to backup SQL 2000
>> databases using the built in backup software to a network location.
>> Could anyone tell me how i do this.
>>
>> Thanks
>> Nick
>|||HowTo: Backup to UNC name using Database Maintenance Wizard
http://support.microsoft.com/?kbid=555128
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Nick" <andync55@.hotmail.com> wrote in message
news:eLJqeOb1FHA.3720@.TK2MSFTNGP14.phx.gbl...
> Hi
> Thanks for the fast reply. Can i do that by right clicking on each databse
> and selecting backup. Is that all i need to do. Is there any other sql
> setting i should backup other than just the databases.
> Thanks
> --
> Nick Comper
> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
> news:ehe21Jb1FHA.3660@.TK2MSFTNGP15.phx.gbl...
>> To do this properly, you would have to take the databases offline, or
>> stop the SQL Server service.
>> Are you not able to use the built-in-and-highly-effective SQL Server
>> backup and then take those .bak files to a network location?
>> --
>> Kevin Hill
>> President
>> 3NF Consulting
>> www.3nf-inc.com/NewsGroups.htm
>>
>> "Nick" <andync55@.hotmail.com> wrote in message
>> news:OvQct%23a1FHA.2428@.tk2msftngp13.phx.gbl...
>> Hi
>> I have a windows 2003 server running sql. I would like to backup SQL
>> 2000 databases using the built in backup software to a network location.
>> Could anyone tell me how i do this.
>>
>> Thanks
>> Nick
>>
>|||Hi
Thanks for the fast reply. Can i do that by right clicking on each databse
and selecting backup. Is that all i need to do. Is there any other sql
setting i should backup other than just the databases.
Thanks
--
Nick Comper
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:ehe21Jb1FHA.3660@.TK2MSFTNGP15.phx.gbl...
> To do this properly, you would have to take the databases offline, or stop
> the SQL Server service.
> Are you not able to use the built-in-and-highly-effective SQL Server
> backup and then take those .bak files to a network location?
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
>
> "Nick" <andync55@.hotmail.com> wrote in message
> news:OvQct%23a1FHA.2428@.tk2msftngp13.phx.gbl...
>> Hi
>> I have a windows 2003 server running sql. I would like to backup SQL 2000
>> databases using the built in backup software to a network location.
>> Could anyone tell me how i do this.
>>
>> Thanks
>> Nick
>

Sunday, February 19, 2012

Hosting Environment - Advice please

(Please forgive me for cross posting on this one)
I am attemptign to offer some kind of hosting of SQL databases as an add-on
to a Web Platform i have built. Unfortunately my SQL knowlwedge is a little
short of l33t.
My question is this:
Is it better to write a web front end to allow the customer to adminsiter
their databases, or to allwo them access to Enterprise manager, from where
they can administer their databases.
thanks
Martin[dot]Christopher[at]uk[dot]easynet[dot]netI think it's a bit risky to give folks access to Enterprise manager, and
it's not usually the done thing. By using a tool you develop you can control
exactly what the customer can do.
"Martin c" <martin@.nospam.com> wrote in message
news:eINWglQfDHA.1888@.TK2MSFTNGP12.phx.gbl...
> (Please forgive me for cross posting on this one)
> I am attemptign to offer some kind of hosting of SQL databases as an
add-on
> to a Web Platform i have built. Unfortunately my SQL knowlwedge is a
little
> short of l33t.
> My question is this:
> Is it better to write a web front end to allow the customer to adminsiter
> their databases, or to allwo them access to Enterprise manager, from where
> they can administer their databases.
> thanks
> Martin[dot]Christopher[at]uk[dot]easynet[dot]net
>|||Yes, I think there is still a risk, but you could reduce this by using some
of the following:
You could use a stored procedure to execute their statements, and give the
user execute rights to this proc only.
By checking the type (sysobjects.type) of any tables they were trying to
access, you could limit their access to system objects.
"Martin c" <martin@.nospam.com> wrote in message
news:OFAWktQfDHA.556@.TK2MSFTNGP11.phx.gbl...
> I was considering a simple bit of ASP that allows them to riun SQL scripts
> (entered into a text box) on the server, and include some command
checking.
> The scripts would all be run under the contezt of the user in question.
> Would i be right in assuming though, that withough specific subroutines to
> avoid contact with any system databases, it would be possible for a
> malicious user to gleam enough information out of the server to launch an
> attackt hat has a fairly high probility of compramising the server ?
> M
>
> "Nick Hindle" <nick.hindle@.NOSPAMtesco.co.uk> wrote in message
> news:%23sS7GoQfDHA.460@.TK2MSFTNGP12.phx.gbl...
> > I think it's a bit risky to give folks access to Enterprise manager, and
> > it's not usually the done thing. By using a tool you develop you can
> control
> > exactly what the customer can do.
> >
> > "Martin c" <martin@.nospam.com> wrote in message
> > news:eINWglQfDHA.1888@.TK2MSFTNGP12.phx.gbl...
> > > (Please forgive me for cross posting on this one)
> > >
> > > I am attemptign to offer some kind of hosting of SQL databases as an
> > add-on
> > > to a Web Platform i have built. Unfortunately my SQL knowlwedge is a
> > little
> > > short of l33t.
> > >
> > > My question is this:
> > > Is it better to write a web front end to allow the customer to
> adminsiter
> > > their databases, or to allwo them access to Enterprise manager, from
> where
> > > they can administer their databases.
> > >
> > > thanks
> > > Martin[dot]Christopher[at]uk[dot]easynet[dot]net
> > >
> > >
> >
> >
>|||Thanks for your help here Nick. I'll go write soem code and see what i can
come up with.
M
"Nick Hindle" <nick.hindle@.NOSPAMtesco.co.uk> wrote in message
news:%23Fn9h3QfDHA.2400@.TK2MSFTNGP11.phx.gbl...
> Yes, I think there is still a risk, but you could reduce this by using
some
> of the following:
> You could use a stored procedure to execute their statements, and give the
> user execute rights to this proc only.
> By checking the type (sysobjects.type) of any tables they were trying to
> access, you could limit their access to system objects.
[SNIP]|||Hi Martin,
What kind of functions would you provide to the customer? If you want to
code yourself, it would require a lof of extra efforts if you want to
provide flexible management and functions.
If you fear that Enterprise Manager provides too many functions for
customer to easily destroy SQL Server databases, you can restrict their
permissions. And let them know that customers who do not need management
ability cannot install Enterprise Manager.
Bill Cheng
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--
| From: "Martin c" <martin@.nospam.com>
| Subject: Hosting Environment - Advice please
| Date: Wed, 17 Sep 2003 11:49:29 +0100
| Lines: 15
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <eINWglQfDHA.1888@.TK2MSFTNGP12.phx.gbl>
| Newsgroups:
microsoft.public.sqlserver.security,microsoft.public.sqlserver.server,micros
oft.public.sqlserver.setup
| NNTP-Posting-Host: ninja.noc.uk.easynet.net 195.40.7.160
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:306886
microsoft.public.sqlserver.setup:57712
microsoft.public.sqlserver.security:15843
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| (Please forgive me for cross posting on this one)
|
| I am attemptign to offer some kind of hosting of SQL databases as an
add-on
| to a Web Platform i have built. Unfortunately my SQL knowlwedge is a
little
| short of l33t.
|
| My question is this:
| Is it better to write a web front end to allow the customer to adminsiter
| their databases, or to allwo them access to Enterprise manager, from where
| they can administer their databases.
|
| thanks
| Martin[dot]Christopher[at]uk[dot]easynet[dot]net
|
|
|

Hosting an SQL database on remote share

Hi,
I would really appreciate help with this query.

I have an SQL 2000 server setup with 2 databases. My boss would like to setup another database but wants the actual database to reside on a different server share.

Is is possible for one database on an SQL server to be hosted on a remote share ?

appreicate any info
thanksIt can be done, but it is difficult, complex, and unsupported. I wouldn't go there, the risk is way too high.

-PatP|||Main point to think about is Performance and is there any reason why your boss is thinking in such a high-fly idea.

hosted sql 2005 databases

We are hosting multiple sql server 2005 databases on a windows 2003 server.
I've setup restricted growth on the databases to 50 mb. What would be a good
setting for the log files? I have all of the databases setup in Simple
recovery mode. Is Auto Shrink = True a good idea?
Please advise.
Thanks!
Hi
The best way to get these values is to monitor it during you normal working
period (e.g. a week and take the values from that). If the files are often
growing then you may want to increase the size they grow by, or put in a
system when the files are increased at a time when it will not impact users.
For log file sizes hopefully you can set a maximum ceiling that will rarely
be expanded.
Growing the files frequently may lead to disc fragmentation and decreases in
performance, therefore auto shrink is not a good idea.
You should monitor the space available on your disc so that you can prevent
the sort of situation where there is not enough room to expand the database.
MOM is a very useful to monitor your SQL Server in this respect.
John
"mp3nomad" wrote:

> We are hosting multiple sql server 2005 databases on a windows 2003 server.
> I've setup restricted growth on the databases to 50 mb. What would be a good
> setting for the log files? I have all of the databases setup in Simple
> recovery mode. Is Auto Shrink = True a good idea?
> Please advise.
> Thanks!

hosted sql 2005 databases

We are hosting multiple sql server 2005 databases on a windows 2003 server.
I've setup restricted growth on the databases to 50 mb. What would be a good
setting for the log files? I have all of the databases setup in Simple
recovery mode. Is Auto Shrink = True a good idea?
Please advise.
Thanks!Hi
The best way to get these values is to monitor it during you normal working
period (e.g. a week and take the values from that). If the files are often
growing then you may want to increase the size they grow by, or put in a
system when the files are increased at a time when it will not impact users.
For log file sizes hopefully you can set a maximum ceiling that will rarely
be expanded.
Growing the files frequently may lead to disc fragmentation and decreases in
performance, therefore auto shrink is not a good idea.
You should monitor the space available on your disc so that you can prevent
the sort of situation where there is not enough room to expand the database.
MOM is a very useful to monitor your SQL Server in this respect.
John
"mp3nomad" wrote:
> We are hosting multiple sql server 2005 databases on a windows 2003 server.
> I've setup restricted growth on the databases to 50 mb. What would be a good
> setting for the log files? I have all of the databases setup in Simple
> recovery mode. Is Auto Shrink = True a good idea?
> Please advise.
> Thanks!