Showing posts with label root. Show all posts
Showing posts with label root. Show all posts

Monday, March 26, 2012

Multi company Application

I'm developing an application that needs to handle several companies data one at a time.

I have a database called ROOT with the common tables like companies, users, etc. and all the stored procedures that I need.

Then I have a unique database per company containing all their info.

How can I apply the stored procedures that I have on database ROOT to the tables on each company's databases ?

The TSQL USE command do not accept variables.

Thanks for your help,
MOsheOoh. I'd use one database and then put a company ID on everything. Other than that, I think you would have to use dynamic SQL for everything and use full object names database.owner.object. That would get to be a real pain. It'll also wreak havoc with permissisons since the execute permissions for the stored procedure won't allow you to access those objects unless the user has permissisons on the underlying objects themselves. Unless you're bound to multiple databases, I'd change that.|||Select * From [DataBaseName].[dbo].[TableName]sql

Wednesday, March 7, 2012

MSSQL.1 directory

Hi,
I just did a fresh install of SQL 2005, default instance, to a new server. I
specified the root of D:\ as the target for the install, however I ended up
with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
MSSQL.1 the norm in 2k5?
Thanks in advance.
That's the norm with 2005. I think they like seeing their name in print. I
don't know the intention of MSSQL.1.
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> Hi,
> I just did a fresh install of SQL 2005, default instance, to a new server.
I
> specified the root of D:\ as the target for the install, however I ended
up
> with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> MSSQL.1 the norm in 2k5?
> Thanks in advance.
|||New naming convention. Install another SQL component (Analysis services,
Reporting Services) and you will see a MSSQL.2 folder. Upgrades and service
packs will also create new folders for newer versions, at least for the
binaries. It certainly makes rollbacks easier.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> Hi,
> I just did a fresh install of SQL 2005, default instance, to a new server.
> I
> specified the root of D:\ as the target for the install, however I ended
> up
> with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> MSSQL.1 the norm in 2k5?
> Thanks in advance.
|||Cool, thank you both.
"Geoff N. Hiten" wrote:

> New naming convention. Install another SQL component (Analysis services,
> Reporting Services) and you will see a MSSQL.2 folder. Upgrades and service
> packs will also create new folders for newer versions, at least for the
> binaries. It certainly makes rollbacks easier.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
>
>
|||if you want to know what MSSQL.1 corresponds to you can go into :
HKLM\SOFTWARE\MICROSOFT\MICROSOFT SQL SERVER\INSTANCE NAMES\SQL

MSSQL.1 directory

Hi,
I just did a fresh install of SQL 2005, default instance, to a new server. I
specified the root of D:\ as the target for the install, however I ended up
with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
MSSQL.1 the norm in 2k5?
Thanks in advance.That's the norm with 2005. I think they like seeing their name in print. I
don't know the intention of MSSQL.1.
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> Hi,
> I just did a fresh install of SQL 2005, default instance, to a new server.
I
> specified the root of D:\ as the target for the install, however I ended
up
> with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> MSSQL.1 the norm in 2k5?
> Thanks in advance.|||New naming convention. Install another SQL component (Analysis services,
Reporting Services) and you will see a MSSQL.2 folder. Upgrades and service
packs will also create new folders for newer versions, at least for the
binaries. It certainly makes rollbacks easier.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> Hi,
> I just did a fresh install of SQL 2005, default instance, to a new server.
> I
> specified the root of D:\ as the target for the install, however I ended
> up
> with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> MSSQL.1 the norm in 2k5?
> Thanks in advance.|||Cool, thank you both.
"Geoff N. Hiten" wrote:

> New naming convention. Install another SQL component (Analysis services,
> Reporting Services) and you will see a MSSQL.2 folder. Upgrades and servi
ce
> packs will also create new folders for newer versions, at least for the
> binaries. It certainly makes rollbacks easier.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
>
>|||if you want to know what MSSQL.1 corresponds to you can go into :
HKLM\SOFTWARE\MICROSOFT\MICROSOFT SQL SERVER\INSTANCE NAMES\SQL

MSSQL.1 directory

Hi,
I just did a fresh install of SQL 2005, default instance, to a new server. I
specified the root of D:\ as the target for the install, however I ended up
with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
MSSQL.1 the norm in 2k5?
Thanks in advance.That's the norm with 2005. I think they like seeing their name in print. I
don't know the intention of MSSQL.1.
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> Hi,
> I just did a fresh install of SQL 2005, default instance, to a new server.
I
> specified the root of D:\ as the target for the install, however I ended
up
> with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> MSSQL.1 the norm in 2k5?
> Thanks in advance.|||New naming convention. Install another SQL component (Analysis services,
Reporting Services) and you will see a MSSQL.2 folder. Upgrades and service
packs will also create new folders for newer versions, at least for the
binaries. It certainly makes rollbacks easier.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> Hi,
> I just did a fresh install of SQL 2005, default instance, to a new server.
> I
> specified the root of D:\ as the target for the install, however I ended
> up
> with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> MSSQL.1 the norm in 2k5?
> Thanks in advance.|||Cool, thank you both.
"Geoff N. Hiten" wrote:
> New naming convention. Install another SQL component (Analysis services,
> Reporting Services) and you will see a MSSQL.2 folder. Upgrades and service
> packs will also create new folders for newer versions, at least for the
> binaries. It certainly makes rollbacks easier.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
>
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:A30BA7DB-EB9B-45F2-B37D-E1949D0FE0B4@.microsoft.com...
> > Hi,
> > I just did a fresh install of SQL 2005, default instance, to a new server.
> > I
> > specified the root of D:\ as the target for the install, however I ended
> > up
> > with D:\MSSQL.1\MSSQL as my physical directory. Did I miss something or is
> > MSSQL.1 the norm in 2k5?
> >
> > Thanks in advance.
>
>|||if you want to know what MSSQL.1 corresponds to you can go into :
HKLM\SOFTWARE\MICROSOFT\MICROSOFT SQL SERVER\INSTANCE NAMES\SQL