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

Friday, March 30, 2012

How to attach mdf files which are residing on other machine

SQL Server 2005 and the related databases are on one server. Due to

space constraints I have to move one of the database(mdf & ldf) to

second server and access the same from the 1st server.

The following are the steps I ned to follow on the 1st server:

    Detached the database

    Moved the mdf & ldf files to 2nd machine/server

    Attach the database pointing to the 2nd server.

The 1st and 2nd steps went fine, the problem is with the 3rd step.

In the Attach Databases window, I clicked on ADD, it opened LOCATE

DATABASE FILE, the folder structure of the 1st server. Is there any way

I can change the SELECTED PATH and poin to the 2nd server?

I did even mapped network drive to the 2nd server but the mapped drive

is not getting displayed in the LOCATE DATABASE FILE folder structure.

Can we attach mdf/ldf files which reside on other machine?

Thanks in advance.

No - you can't use mdf, ldf or ndf files on devices which are not directly attached to SQL Server. It can't resolve shares, drive mappings, or redirects at this low a level.

Buck Woody

|||Network databases are normally not recommended. Unless your network storage meets strict I/O requirements, it's _not_ supported.

That's said, you can mount a network database if you enable trace flag 1807.

http://support.microsoft.com/kb/304261
http://msdn2.microsoft.com/en-us/library/ms176061.aspx
http://www.microsoft.com/sql/alwayson/default.mspx
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlIObasics.mspx

How to attach mdf files which are residing on other machine

SQL Server 2005 and the related databases are on one server. Due to space
constraints I have to move one of the database(mdf & ldf) to second server
and access the same from the 1st server.
The following are the steps I ned to follow on the 1st server:
1. Detached the database
2. Moved the mdf & ldf files to 2nd machine/server
3. Attach the database pointing to the 2nd server.
The 1st and 2nd steps went fine, the problem is with the 3rd step.
In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABASE
FILE, the folder structure of the 1st server. Is there any way I can change
the SELECTED PATH and poin to the 2nd server?
I did even mapped network drive to the 2nd server but the mapped drive is
not getting displayed in the LOCATE DATABASE FILE folder structure.
Can we attach mdf/ldf files which reside on other machine?
Thanks in advance.> Can we attach mdf/ldf files which reside on other machine?
Short answer: No.
Long answer: Yes, with the proper trace flag, but you don't want to do that (trust me). See
http://support.microsoft.com/?id=304261
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mallykarjun" <mallykarjuna@.mallykarjuna.com> wrote in message
news:5e451cd9d0a042e2b8571d9eee45d779@.ureader.com...
> SQL Server 2005 and the related databases are on one server. Due to space
> constraints I have to move one of the database(mdf & ldf) to second server
> and access the same from the 1st server.
> The following are the steps I ned to follow on the 1st server:
> 1. Detached the database
> 2. Moved the mdf & ldf files to 2nd machine/server
> 3. Attach the database pointing to the 2nd server.
> The 1st and 2nd steps went fine, the problem is with the 3rd step.
> In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABASE
> FILE, the folder structure of the 1st server. Is there any way I can change
> the SELECTED PATH and poin to the 2nd server?
> I did even mapped network drive to the 2nd server but the mapped drive is
> not getting displayed in the LOCATE DATABASE FILE folder structure.
> Can we attach mdf/ldf files which reside on other machine?
> Thanks in advance.

How to attach mdf files which are residing on other machine

SQL Server 2005 and the related databases are on one server. Due to space
constraints I have to move one of the database(mdf & ldf) to second server
and access the same from the 1st server.
The following are the steps I ned to follow on the 1st server:
1. Detached the database
2. Moved the mdf & ldf files to 2nd machine/server
3. Attach the database pointing to the 2nd server.
The 1st and 2nd steps went fine, the problem is with the 3rd step.
In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABASE
FILE, the folder structure of the 1st server. Is there any way I can change
the SELECTED PATH and poin to the 2nd server?
I did even mapped network drive to the 2nd server but the mapped drive is
not getting displayed in the LOCATE DATABASE FILE folder structure.
Can we attach mdf/ldf files which reside on other machine?
Thanks in advance.> Can we attach mdf/ldf files which reside on other machine?
Short answer: No.
Long answer: Yes, with the proper trace flag, but you don't want to do that
(trust me). See
http://support.microsoft.com/?id=304261
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mallykarjun" <mallykarjuna@.mallykarjuna.com> wrote in message
news:5e451cd9d0a042e2b8571d9eee45d779@.ur
eader.com...
> SQL Server 2005 and the related databases are on one server. Due to space
> constraints I have to move one of the database(mdf & ldf) to second server
> and access the same from the 1st server.
> The following are the steps I ned to follow on the 1st server:
> 1. Detached the database
> 2. Moved the mdf & ldf files to 2nd machine/server
> 3. Attach the database pointing to the 2nd server.
> The 1st and 2nd steps went fine, the problem is with the 3rd step.
> In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABAS
E
> FILE, the folder structure of the 1st server. Is there any way I can chang
e
> the SELECTED PATH and poin to the 2nd server?
> I did even mapped network drive to the 2nd server but the mapped drive is
> not getting displayed in the LOCATE DATABASE FILE folder structure.
> Can we attach mdf/ldf files which reside on other machine?
> Thanks in advance.

Wednesday, March 28, 2012

How to assign Data Source in URL path

I have to use one report with several databases. So I've created several
Shared Data Source objects with different database's names in connection
strings. And now how can I switch between these Data Sources ?Dynamic (expression-based) datasource connection strings are not supported
in the current release. See this previous post for a workaround:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=e86a6f2d-3d5e-4dd7-9356-71236347236f
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"IBug" <IBug@.discussions.microsoft.com> wrote in message
news:4F0E598C-4CCF-44D8-800F-7045029DB499@.microsoft.com...
> I have to use one report with several databases. So I've created several
> Shared Data Source objects with different database's names in connection
> strings. And now how can I switch between these Data Sources ?|||"Ravi Mumulla (Microsoft)" wrote:
> Dynamic (expression-based) datasource connection strings are not supported
> in the current release. See this previous post for a workaround:
I have not to change CONNECTION STRING - I would like to assing/bind
different shared data source OBJECTs to the report. Really the problem is:
clients have some divisions base on different databases. The databases are
the same and the user has to run the report on one of these databases. If I
can not change connection string in data source object (as you said) and can
not assing/bind another data source object to the report - what have I do ?
Copy hundreds reports for each databases ? It's not great idea.|||The queries themselves can be expressions as long as they return the same
resulting field lists.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"IBug" <IBug@.discussions.microsoft.com> wrote in message
news:CD967DBC-6AD5-4596-9569-2E0E1AA3DE16@.microsoft.com...
> "Ravi Mumulla (Microsoft)" wrote:
>> Dynamic (expression-based) datasource connection strings are not
>> supported
>> in the current release. See this previous post for a workaround:
> I have not to change CONNECTION STRING - I would like to assing/bind
> different shared data source OBJECTs to the report. Really the problem is:
> clients have some divisions base on different databases. The databases are
> the same and the user has to run the report on one of these databases. If
> I
> can not change connection string in data source object (as you said) and
> can
> not assing/bind another data source object to the report - what have I do
> ?
> Copy hundreds reports for each databases ? It's not great idea.sql

Monday, March 19, 2012

How to add tabls to published article without recreating snapshot?

Hi experts:

We have 4 SQL SERVER 2000 servers linked via replication, and due to business changes we have to add one table to the published databases. And the existed database has more than 20g, recreating the snapshot and re-init replication is not allowed as the business cannot be stopped more than 1 hour. So my question is how to add tables to the published article without recreating the snapshot?

By that is not possilbe, can we publish one new article on the same database?

Thanks in advance!

Ron

Hi Ron,

If you are using merge replication, you have to regenerate the snapshot for the entire publication after you added the new article. For snapshot\transactional replication, the snapshot agent will only generate the snapshot for the new article if the immediate_sync property of your publication is set to 0. In any case, you can always put the new article in a separate publication instead.

Hope that helps,

-Raymond

How to add SQL Server to SourceSafe?

HI,
Can anyone tell me the best place to find documentation on how to add SQL
Server databases to SourceSafe?
Thanks
Hi
SQL Server databases can not be in VSS, but the DDL can be stored there.
If you use Visual Studio, you can store your SPs and Triggers in VSS.
Currently, it is mostly a manual procedure until SQL Server 2005 arrives.
Regards
Mike
"kppk" wrote:

> HI,
> Can anyone tell me the best place to find documentation on how to add SQL
> Server databases to SourceSafe?
> Thanks
|||Hello kppk.
We do a FREE scripting tool that can add all your schema statements to
Visual Source Safe as well as those tables where you want to script out the
data (for look up tables, static data, system data etc). It comes as part of
the DB Ghost package and is completely FREE. It also comes with a COM object
and documentation so you can use it in your programming if you desire.
http://www.innovartis.co.uk/Evaluation.aspx
regards,
Mark Baekdal
www.dbghost.com
+44 (0)208 241 1762
Living and breathing database change management for SQL Server
"kppk" wrote:

> HI,
> Can anyone tell me the best place to find documentation on how to add SQL
> Server databases to SourceSafe?
> Thanks

How to add sproc to multiple databases

Hi all. Lets say I had a script to run (create sproc) and I needed to
run it on several different databases on one sql server. Can someone
give me an idea how I could do that short of changing the "use databse"
line each time?
ThanksSee if this helps:
http://www.mssqlcity.com/FAQ/Devel/sp_msforeachdb.htm
But be warned that this is an undocumented and unsupported system procedure.
ML
http://milambda.blogspot.com/|||You can also consider instead of having multiple copies of the proc,
just put one copy in the master database... make sure it is prefixed
with "sp_" so it can be executed from any database on that server.
I haven't tried this out myself. Be careful of any name collisions
from future service packs or upgrades.|||Personally, while I have done this in the past, I am starting to shy away
from this practice. It does work, but the problem here is the same problem
as DLL hell. So I have a utility procedure named sp_stringParse, or
whatever. I use this in three databases, and I really think it needs to be
improved for a task in database 3. So do I have a sp_stringParse_version1,
sp_stringParse_version2? Maybe, but instead I just put utility procedures
in the database and upgrade them as required in each system. It also saves
me in that if I don't use the new version immediately, I don't have to test
the code in the other databases until I upgrade it.
It is essential however that you use some sort of versioning process with
SourceSafe, CVS, or even just naming the files differently so you can apply
the latest versions as you discover a need to upgrade the proc in another
database.
Just my $.03 worth :)
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
<InfoSponge3000@.gmail.com> wrote in message
news:1137783245.156785.87200@.g43g2000cwa.googlegroups.com...
> You can also consider instead of having multiple copies of the proc,
> just put one copy in the master database... make sure it is prefixed
> with "sp_" so it can be executed from any database on that server.
> I haven't tried this out myself. Be careful of any name collisions
> from future service packs or upgrades.
>

Wednesday, March 7, 2012

How to add a named instance of sql server to EM?

I got an app that installed a named instance of MSDE instead of including
its databases in my existing SQl server instance. I would like to be able to
manage the databases and view the table structures of this app in Enterprise
manager. How can I include that named instance and its tables etc.. in my
SQL server Enterprise manager?
Thanks for any help,
BobBob,
Try registering the SQL Server instance using computername\instancename.
HTH
Jerry
"Bob" <bdufour@.sgiims.com> wrote in message
news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>I got an app that installed a named instance of MSDE instead of including
>its databases in my existing SQl server instance. I would like to be able
>to manage the databases and view the table structures of this app in
>Enterprise manager. How can I include that named instance and its tables
>etc.. in my SQL server Enterprise manager?
> Thanks for any help,
> Bob
>|||Thanks but does not work, I get a does not exist or acces denied when I try
to register it. I'm set up to use mixed mode authentication and use the
system account to login and I am sa. but I can't seem to access that
instance of Sql server.
Any othetr way anyone can think of?
Thanks for your help.
Bob
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:u9W30aDyFHA.596@.TK2MSFTNGP12.phx.gbl...
> Bob,
> Try registering the SQL Server instance using computername\instancename.
> HTH
> Jerry
> "Bob" <bdufour@.sgiims.com> wrote in message
> news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>|||Are you connecting across a network? Did you try to log onto
the box and connect?
Check the error logs from the MSDE instance from when it
started up to see what protocol it is listening on - if it's
just shared memory, you can't connect to it over a network.
In that case, you need to enable TCP/IP.
-Sue
On Mon, 3 Oct 2005 13:39:08 -0400, "Bob"
<bdufour@.sgiims.com> wrote:

>Thanks but does not work, I get a does not exist or acces denied when I try
>to register it. I'm set up to use mixed mode authentication and use the
>system account to login and I am sa. but I can't seem to access that
>instance of Sql server.
>Any othetr way anyone can think of?
>Thanks for your help.
>Bob
>"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
>news:u9W30aDyFHA.596@.TK2MSFTNGP12.phx.gbl...
>

How to add a named instance of sql server to EM?

I got an app that installed a named instance of MSDE instead of including
its databases in my existing SQl server instance. I would like to be able to
manage the databases and view the table structures of this app in Enterprise
manager. How can I include that named instance and its tables etc.. in my
SQL server Enterprise manager?
Thanks for any help,
BobBob,
Try registering the SQL Server instance using computername\instancename.
HTH
Jerry
"Bob" <bdufour@.sgiims.com> wrote in message
news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>I got an app that installed a named instance of MSDE instead of including
>its databases in my existing SQl server instance. I would like to be able
>to manage the databases and view the table structures of this app in
>Enterprise manager. How can I include that named instance and its tables
>etc.. in my SQL server Enterprise manager?
> Thanks for any help,
> Bob
>|||Thanks but does not work, I get a does not exist or acces denied when I try
to register it. I'm set up to use mixed mode authentication and use the
system account to login and I am sa. but I can't seem to access that
instance of Sql server.
Any othetr way anyone can think of?
Thanks for your help.
Bob
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:u9W30aDyFHA.596@.TK2MSFTNGP12.phx.gbl...
> Bob,
> Try registering the SQL Server instance using computername\instancename.
> HTH
> Jerry
> "Bob" <bdufour@.sgiims.com> wrote in message
> news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>>I got an app that installed a named instance of MSDE instead of including
>>its databases in my existing SQl server instance. I would like to be able
>>to manage the databases and view the table structures of this app in
>>Enterprise manager. How can I include that named instance and its tables
>>etc.. in my SQL server Enterprise manager?
>> Thanks for any help,
>> Bob
>>
>|||Are you connecting across a network? Did you try to log onto
the box and connect?
Check the error logs from the MSDE instance from when it
started up to see what protocol it is listening on - if it's
just shared memory, you can't connect to it over a network.
In that case, you need to enable TCP/IP.
-Sue
On Mon, 3 Oct 2005 13:39:08 -0400, "Bob"
<bdufour@.sgiims.com> wrote:
>Thanks but does not work, I get a does not exist or acces denied when I try
>to register it. I'm set up to use mixed mode authentication and use the
>system account to login and I am sa. but I can't seem to access that
>instance of Sql server.
>Any othetr way anyone can think of?
>Thanks for your help.
>Bob
>"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
>news:u9W30aDyFHA.596@.TK2MSFTNGP12.phx.gbl...
>> Bob,
>> Try registering the SQL Server instance using computername\instancename.
>> HTH
>> Jerry
>> "Bob" <bdufour@.sgiims.com> wrote in message
>> news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>>I got an app that installed a named instance of MSDE instead of including
>>its databases in my existing SQl server instance. I would like to be able
>>to manage the databases and view the table structures of this app in
>>Enterprise manager. How can I include that named instance and its tables
>>etc.. in my SQL server Enterprise manager?
>> Thanks for any help,
>> Bob
>>
>>
>

How to add a named instance of sql server to EM?

I got an app that installed a named instance of MSDE instead of including
its databases in my existing SQl server instance. I would like to be able to
manage the databases and view the table structures of this app in Enterprise
manager. How can I include that named instance and its tables etc.. in my
SQL server Enterprise manager?
Thanks for any help,
Bob
Bob,
Try registering the SQL Server instance using computername\instancename.
HTH
Jerry
"Bob" <bdufour@.sgiims.com> wrote in message
news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>I got an app that installed a named instance of MSDE instead of including
>its databases in my existing SQl server instance. I would like to be able
>to manage the databases and view the table structures of this app in
>Enterprise manager. How can I include that named instance and its tables
>etc.. in my SQL server Enterprise manager?
> Thanks for any help,
> Bob
>
|||Thanks but does not work, I get a does not exist or acces denied when I try
to register it. I'm set up to use mixed mode authentication and use the
system account to login and I am sa. but I can't seem to access that
instance of Sql server.
Any othetr way anyone can think of?
Thanks for your help.
Bob
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:u9W30aDyFHA.596@.TK2MSFTNGP12.phx.gbl...
> Bob,
> Try registering the SQL Server instance using computername\instancename.
> HTH
> Jerry
> "Bob" <bdufour@.sgiims.com> wrote in message
> news:%23TdlkDDyFHA.2500@.TK2MSFTNGP10.phx.gbl...
>
|||Are you connecting across a network? Did you try to log onto
the box and connect?
Check the error logs from the MSDE instance from when it
started up to see what protocol it is listening on - if it's
just shared memory, you can't connect to it over a network.
In that case, you need to enable TCP/IP.
-Sue
On Mon, 3 Oct 2005 13:39:08 -0400, "Bob"
<bdufour@.sgiims.com> wrote:

>Thanks but does not work, I get a does not exist or acces denied when I try
>to register it. I'm set up to use mixed mode authentication and use the
>system account to login and I am sa. but I can't seem to access that
>instance of Sql server.
>Any othetr way anyone can think of?
>Thanks for your help.
>Bob
>"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
>news:u9W30aDyFHA.596@.TK2MSFTNGP12.phx.gbl...
>