SRS2000 - Same Database Structure, Different Table Owner,qualifier

Dec 14, 2006

Hi,

I am creating reports for an application, that when installed can have various different table owners/qualifiers depending on how client created the DB. How can I create standard reports across all the DB without hardcoding the tablenames qualifier/owner in the dataset query? Again the table structure remain the same just the qualifiers may be different. Any help would be great.

--DCB

View 1 Replies


ADVERTISEMENT

How Do I Change The Owner From A Table In A Database

Jul 20, 2005

Dear Group,I have a table in the a database that I need to change the owner to dbo.How can I do this.Thanks in advance.Jeff Magouirk

View 1 Replies View Related

Database Automatically Creates Xxx_Temp Table While Modifying / Updating Table Structure .

Dec 16, 2007

Hello friends,

I am new to the SQL Server 2005 development.

From last 1 week or so, i have been facing very strange problem with my sql server 2005s database
which is configured and set on the hosting web server. Right now for managing my sql server 2005 database,
i am using an web based Control Panel developed by my hosting company.

Problem i am facing is that, whenever i try to modify (i.e. add new columns) tables in the database,
it gives me error saying that,

"There is already an object named 'PK_xxx_Temp' in the database. Could not create constraint. See previous errors.
Source: .Net SqlClient Data Provider".

where xxx is the table name.

I have done quite a bit research on the problem and have also searched on the net for solution but still
the problem persist.

Thanks in advance. Any help will be appreciated.

View 5 Replies View Related

Database Table Structure

Jan 29, 2008

Hi i have a student table and also an societies table,  and a student can belong to as many societies as possible, for example student John Taylor belongs to the Football society, rugby societey and dance society, where as student Jim Jenkins belongs to the Football society, rugby society, arts society and graphics society.
My tables so far look like this;
STUDENTS; student_id, student_name
SOCIETIES;  society_id, society_name
 
My question is how can i make the scenario above reflect in my table structure, would i need to create another table, if so what fields or columns should i place in this new table, thank you.

View 7 Replies View Related

The Database Name Component Of The Object Qualifier Must Be The Name Of The Current Database

Apr 7, 2006

Guys,1st of all.. sorry about my english ok? Im from Brazil...Im trying to get a RS connecting through 2 databases with the querybelow:SELECTscar..osbalcao.numeroos,ccell.dbo.atrib_os.osFROMccell.dbo.atrib_osJOIN scar.dbo.osbalcao on ccell.dbo.atrib_os.os =scar.dbo.osbalcao.numeroosWHERE scar.dbo.osbalcao.localprod = '257'AND scar.dbo.osbalcao.status in ('EM')On a SQL IDE i got a good RS, but, when i try to use that same query onDelphi + ZEOS, the SQL Server tells me that "The database namecomponent of the object qualifier must be the name of the currentdatabase".I really dont understand why. I can only tell that the error isreturned from SQL Server.Have anyone got the same trouble?[]'sTiago Gigli

View 1 Replies View Related

Something Wrong With Table Structure Change On Mirrored Database

Mar 6, 2008

I have set up mirroring in high availability mode (principal, mirror, and witness).

After setting up mirroring, I needed to adjust the size of a column in one of my tables. I did so with the following command

ALTER TABLE OrderOptimizer.dbo.rCodes ALTER COLUMN CodeDescription VARCHAR(8000).

The column was initially VARCHAR(128)

When I look at the table structure it shows that the column is now VARCHAR(8000), however I can only enter 128 characters into the field.

I forced a failover to look at the table on the mirrored version. It too showed that the column was VARCHAR(8000).

If I open the table I can enter more than 128 characters into the field, however when I refresh, it is truncated to 128 characters,

Any help would be appreciated

View 4 Replies View Related

SQL Server 2008 :: Transmission Table Structure In Database Is Inconsistent

Jun 1, 2015

I have an issue in my production , SQL server 2008 R2 , in Error log it is said “ An error occurred in dialog transmission Error : 9655 , State : 3 and Error : 9736 Severity : 16 State 0

I checked in sysmessages , it is said :” The transmission queue table structure in database is inconsistent. Possible database corruption “

So do you think I need to run DBCC checkdb ? Should I run it after working hours or it is fine within working hours ?

View 9 Replies View Related

Passing Parameters Thru Url In SRS2000

Aug 23, 2007



Hi,
I am using SQL Reporting Services 2000 on a SQL 2000 Server. My problem is with passing parameters to a report url.
This is my existing report url
http://ServerName/Reports/Pages/Report.aspx?ItemPath=%2fFolderName%2fReportName
There are two parameters on the report namely A and B.
Given this info, how can i pass a url that disables the parameter on the report and pass it through the url of the report. What should be the correct syntax or what changes i have to do the url above?

Thanks and Rgds
Sk

View 3 Replies View Related

Default Table Owner Using CREATE TABLE, INSERT, SELECT && DROP TABLE

Nov 21, 2006

For reasons that are not relevant (though I explain them below *), Iwant, for all my users whatever privelige level, an SP which createsand inserts into a temporary table and then another SP which reads anddrops the same temporary table.My users are not able to create dbo tables (eg dbo.tblTest), but arepermitted to create tables under their own user (eg MyUser.tblTest). Ihave found that I can achieve my aim by using code like this . . .SET @SQL = 'CREATE TABLE ' + @MyUserName + '.' + 'tblTest(tstIDDATETIME)'EXEC (@SQL)SET @SQL = 'INSERT INTO ' + @MyUserName + '.' + 'tblTest(tstID) VALUES(GETDATE())'EXEC (@SQL)This becomes exceptionally cumbersome for the complex INSERT & SELECTcode. I'm looking for a simpler way.Simplified down, I am looking for something like this . . .CREATE PROCEDURE dbo.TestInsert ASCREATE TABLE tblTest(tstID DATETIME)INSERT INTO tblTest(tstID) VALUES(GETDATE())GOCREATE PROCEDURE dbo.TestSelect ASSELECT * FROM tblTestDROP TABLE tblTestIn the above example, if the SPs are owned by dbo (as above), CREATETABLE & DROP TABLE use MyUser.tblTest while INSERT & SELECT usedbo.tblTest.If the SPs are owned by the user (eg MyUser.TestInsert), it workscorrectly (MyUser.tblTest is used throughout) but I would have to havea pair of SPs for each user.* I have MS Access ADP front end linked to a SQL Server database. Forreports with complex datasets, it times out. Therefore it suit mypurposes to create a temporary table first and then to open the reportbased on that temporary table.

View 6 Replies View Related

Best Practices Database Owner, Database Connection Method (asp)

Sep 18, 2007

Hi-I have a sql server database, and am wring web apps to access it.I've created databases different ways, and ended up with different owners (eg dbo, nt authorityetwork services...)I also have connection strings using windows authentication, and some using a user name and password.I have read that using windows authentication is the best way to go, as far as security goes, but I have noticed some connectivity issues when I upload the site to the server, and test it remotely. What is the safest 'owner' of the database, and what's the safest way to connect?Thanks Dan 

View 8 Replies View Related

The Owner Of The Table

Jul 27, 2006

Hello,
I need to user full name for the table as seen below.
 
SELECT @RowCount = COUNT(*)
FROM  T1 c  INNER JOIN [MyInstance].MyDB.dbo.T2 b ON c.T1_ID=b.T2_ID
 
T2 may be re-created by different users, how can I get this working for all users if the creator is not dbo?

View 5 Replies View Related

How Do I Get Table Owner?

Mar 9, 2005

I need to the table owner.
Not from in Enterprise Manager, but from my app. (it's written in Delphi).

Any suggestions?

Thank you,
Keith

View 2 Replies View Related

Table Owner

Nov 24, 2005

Hi,

I've a database table named MYTABLE
It's owner is T01.

Now when I log on as MA I want to do a select like this:

select * from MYTABLE -- Gives me an error.
Select * from T01.MYTABLE -- goes fine..

I really don't want to specify the owner for every table. All tables have the owner T01.

Is it possible to use some statement before executing my sql statement.
Something like this :-=

Use owner T01
select * from MYTABLE.

Is it possible ?

//Martin

View 3 Replies View Related

Table Owner

Aug 4, 2006

hi,how do i change the table's owner as dbo using sql server 2000 query.kalai

View 2 Replies View Related

Owner Of The Table

Jul 20, 2005

I've got this question:Is it possible to assign the 'current owner' using a query like thefollowing one:set current schema OWNER1 (in DB2 sql, this allow me to reference the tableswithout an explicit indication of the owner (es: after this query I cansimply write 'Select * from dummy', instead of 'Select * fromOWNER1.dummy')).Thank youFederica

View 2 Replies View Related

The Owner Of The Table

Jul 27, 2006

Hello,
I need to user full name for the table as seen below.

SELECT @RowCount = COUNT(*)
FROM T1 c INNER JOIN [MyInstance].MyDB.dbo.T2 b ON c.T1_ID=b.T2_ID

T2 may be re-created by different users, how can I get this working for all users if the creator is not dbo?

View 4 Replies View Related

Transact SQL :: Dynamically Alter Schema Of Stage Table When Source Table Structure Changed?

Oct 25, 2015

we have a table in our ERP database and we copy data from this table into another "stage" table on a nightly basis. is there a way to dynamically alter the schema of the stage table when the source table's structure is changed? in other words, if a new column is added to the source table, i would like to add the column to the stage table during the nightly refresh.

View 4 Replies View Related

Transact SQL :: Table Structure - Inserting Data From Other Temp Table

Aug 14, 2015

Below is my table structure. And I am inserting data from other temp table.

CREATE TABLE #revf (
[Cusip] [VARCHAR](50) NULL, [sponfID] [VARCHAR](max) NULL, GroupSeries [VARCHAR](max) NULL, [tran] [VARCHAR](max) NULL, [AddDate] [VARCHAR](max) NULL, [SetDate] [VARCHAR](max) NULL, [PoolNumber] [VARCHAR](max) NULL, [Aggregate] [VARCHAR](max) NULL, [Price] [VARCHAR](max) NULL, [NetAmount] [VARCHAR](max) NULL,

[Code] ....

Now in a next step I am deleting the records from #revf table. Please see the delete code below

DELETE
FROM #revf
WHERE fi_gnmaid IN (
SELECT DISTINCT r2.fi_gnmaid
FROM #revf r1, #revf r2

[Code] ...

I don't want to create this #rev table so that i can avoid the delete statement. But data should not affect. Can i rewrite the above as below:

SELECT [Cusip], [sponfID], GroupSeries, [tran], [AddDate], [SetDate], [PoolNumber], [Aggregate], [Price], [NetAmount], [Interest],
[Coupon], [TradeDate], [ReversalDate], [Description], [ImportDate], MAX([fi_gnmaid]) AS Fi_GNMAID, accounttype, [IgnoreFlag], [IgnoreReason], IncludeReversals, DatasetID, [DeloitteTaxComments], [ReconciliationID],

[Code] ....

If my above statement is wrong . Where i can improve here? And actually i am getting 4 rows difference.

View 5 Replies View Related

Database Owner - Sa Or ?

Aug 6, 2002

I want 'sa' to own all the user databases. Currently the database properties screen shows the owner as myself, 'al', but the list from the Users tab in EM for the database doesn't list me, but lists the dbo as login name 'sa'. DB_changedbowner 'sa' says:

Server: Msg 15110, Level 16, State 1, Procedure sp_changedbowner, Line 46
The proposed new database owner is already a user in the database.

BUT, who really owns the database; if it's 'sa' then why am I showing up on the properties page as the owner???

Thanks,

AL

View 2 Replies View Related

The Proposed New Database Owner Is Already A User In The Database.

Dec 3, 2001

Any idea what is this error that I am getting when trying to change the db owner of the database as sa.Currently owner is different than sa.


Server: Msg 15110, Level 16, State 1, Procedure sp_changedbowner, Line 46
The proposed new database owner is already a user in the database.

View 3 Replies View Related

Sql Db - Change Name For Owner Of Table

Jul 19, 2005

Is it possible to change the name of the owner of a sql database table?Thanks,Zath

View 4 Replies View Related

Change Table Owner To Dbo?

Oct 31, 2000

We set up a few tables while being logged in as a different user. Now, those tables are not accessible via some ASP pages because they aren't DBO-owned tables. Relationships do exist on these tables, but no significant data. Is there a way to change the owner, or do I need to delete the table and start over?

View 2 Replies View Related

How To Change Owner Of A Table?

Oct 6, 1998

Already know how to change the owner of a database, but that doesn`t seem to change the owner of an individual table.
Any Help???
Please??

View 2 Replies View Related

Change Table Owner

Nov 18, 2005

Is there an easy way to change myself as a specific table owner to dbo?

View 2 Replies View Related

Owner Of Table Creation In SP

Dec 14, 2006

Hi everyone and Happy Holidays!

I've got a problem with table creation in stored procedures (SQL Server 2000). We've got an application where the user login only has rights to execute stored procedures. The problem is that a stored proc is dynamically creating a table and so the owner of that table is being assigned to whatever login the application is using instead of dbo. It's causing numerous issues. Is there any way that this can be avoided or changed without granting the user sa privileges?

Thanks in advance,
Cat

View 14 Replies View Related

How To Change Owner Of Table ?

Aug 22, 2006

I have created some of tables in mydatabase .
Now i want to change owner of that table .
How can i do ?
Thank you very much .

View 1 Replies View Related

Owner Of A Temp Table

Jul 23, 2005

is there a way to query the system table in SQL Server to determine theowner of a temp table? I doubt this is possible because it seems asthough everyone is aliased as db_owner.

View 1 Replies View Related

Changing Table Owner

Jul 20, 2005

Hi- apologies for asking a stupid newbie question, but I'm really stuck atthe moment. I need to change table ownership.I've got an asp script which is looking for a table owned by the dbo role,however the table was created under a different ownership. I understand theproblem, and almost understand the solution, but I can't seem to get all theway.THE PROBLEM (using [server].[database].[owner].[table])[mgbsvr1].[dnn].[dnnadmin].[aspsearch]needs to be[mgbsvr1].[dnn].[dbo].[aspsearch]I looked up the books online and found this syntax:sp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner'But I can't see how to use it, nor more importantly, where I should use it.It won't work in the query tool in Enterprise Manager. If I need to create ascript (which I've never done before), how do I execute the script?All help deeply appreciatedManning, Sydney

View 3 Replies View Related

How To Change The Table Owner To Dbo

Oct 19, 2007

I have verified that myaspx error was due to the owner of the table is not dbo.
However, I don't know how to use sp_changeobjectowner to change
the table owner to dbo. I even tried sp_changetableowner, but didn't work.
SQL Server gave me a hint of '@newowner' parameter; still, I could not get it.


TIA,
Jeffrey

View 3 Replies View Related

Transact SQL :: Name A Table Regardless Of Its Owner

Apr 22, 2015

I am writing a stored procedure which should rebuild all indexes of all tables in all databases of a SQL server 2000. I use DBCC DBREINDEX (<table name>, ' ', 90)

Since we can't use USE in stored procedures i have to loop thru database names and construct the <table name> in the following format: <database name>.<owner name>.<table name>

At the time of execution the script knows the database name and the table name, but not the owner. i innocently assumed dbo to be the owner of all of my tables. But not so.

My script stumbled upon the following table name Akord.User1.T$reg

There are two problems here:

a) the owner is not dbo
b) the table name T$reg has a dollar sign as part of the name

I have a question

- is it possible to enumerate thru all tables in a database (USE is not allowed) regardless of their owners?

View 3 Replies View Related

Find The Owner Of A Table

Apr 24, 2008

I know this is a stupid question, but how can I deturmine who the owner of a tabel is?

View 3 Replies View Related

How Do I Change The Table Owner?

Nov 16, 2006

I have to make a copy of an existing database and call it something different. That part was easy because I simply backed it up and then restored it with a different name.

OrigDbName

Table1 Owner OrigDdName

Table2 Owner OrigDdName

But now I find that all the tables still have the original database name as the owner and I cannot refer to them programmatically unless I use the original database name.

NewDbName

Table1 Owner OrigDdName

Table2 Owner OrigDdName

So how do I change the owner of the tables to the new database name. What I really need is;

NewDbName

Table1 Owner NewDdName

Table2 Owner NewDdName

Please be as specific as possible because I am not a DBA and I am out of my depth once it gets beyond the basics of using commands like Alter Table.

Thank you.

View 5 Replies View Related

Cache Database Structure (How To Detect If Database-design Has Changed..)

Feb 24, 2006

Hello everyone,I have a webcontrol that uses database-structures alot, it uses the system tables in SQL to read column information from tables. To ease the load of the SQL server I have a property that stores this information in a cache and everything works fine.I am doing some research to find if there are anyway to get information from the SQL server that the structure from a table has changed.I want to know if a column or table has changed any values, like datatype, name, properties, etc.Any suggestions out there ?!

View 3 Replies View Related







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