Added Users To A Logged Shipped Database
Dec 20, 2007
I have 2 sql server 2000 database that participate in log shipping.
Server A is the source database, which log ships to a database on
Server B. The database on Server B is in a warm stand by/read only
mode. Is there a way that I can add users to the database on Server
B, without having to add the users to the database in server A? I am
trying to use the database on Server B as a reporting only database
and add more users to have permissions to run reports.
Please let me know if anyone has any suggestions. Thank you.
View 2 Replies
ADVERTISEMENT
Apr 20, 2006
How does one Determine the number of Active users logged into a SQL Server Database?
I want to use the info to control concurrent licensing for my Application
View 6 Replies
View Related
Sep 28, 2007
Is there a way in 2005 to tell what user is logged into what databaseon the SQL Server?thanks,Scott
View 3 Replies
View Related
Feb 15, 2006
Hi
I need to get a report that tells me the no. of users logged on to the SQL Server (this has to be an hourly report)
Will this do
WHILE 1=1
BEGIN
Select Hostname,getdate() from sysprocesses
WAITFOR DELAY '00:59:00'
END
GO
Will it have any bad affects on the SQL Server
Or can someone plz let me knw how to get that
Thanks
View 3 Replies
View Related
Dec 15, 2007
Hi,
I have a question regarding sqlserver 2005
I am working on a production server.
how to check how many users are logged in currently in sqlserver and
also how to check the session info and memory usage by a paticular user......
View 1 Replies
View Related
Jan 6, 2005
I have a program which will show you users logged into a session. It's designed in MS Access and will also record citrix/terminal users. If you would like a copy of the program, download the attachment or email me at paulk@weccusa.org.
Paul Kohn
Database Administrator
View 12 Replies
View Related
Jul 20, 2005
SQL Server 2000 - MSDE 2000Is there a way to get the number of current users logged into a SQL 2000 Server (also MSDE)? Cant be distinct users as most users are logged into the database using the same login.-- Tim Morrison--------------------------------------------------------------------------------Vehicle Web Studio - The easiest way to create and maintain your vehicle related website.http://www.vehiclewebstudio.com
View 4 Replies
View Related
Feb 17, 2007
we're planning to use sql express as our database server in our office. the database will consist of accounting, purchasing, marketing, sales, inventory, production and hrd tables. 80-100 users will use the system simultaneously in adding, editing, deleting, reports.
i need some advice on the following:
1. maximum users that can log on to the database simultaneously?
2. maximum size of the database?
tnx
View 7 Replies
View Related
Jun 12, 2015
We wanted to know list of users who had logged into the SQL Server from last 10 to 30 days.
View 2 Replies
View Related
Feb 20, 2006
Hi All
I have built this query :
Select position, SubsidiaryName
from position
Where SubsidiaryName in ('country1','country2')
and position not like('testuser_%')
and position not like ('Inactive_%')
and position not like('olduser_%');
However when I run it, the result more accounts in country 1 than expected. I think it could be inactive users who have not logged into this system for 6 months or more. How can I build a query that incorporates my original query + shows only users who logged into the past 6 months ?
View 2 Replies
View Related
Jul 21, 2007
Is there any need to re-apply SP4 to sql server 2000 if a user database has been restored to it from a non-service packed sql 2000 server.
We inadvertantly did this after a flood and later realised that the log shipped server at the other site was not not service packed.
Does service pack 4 update user databases in any way?
We have not had any major issues with this but I need to rule this out when considering performance issues and so on that have been raised since the recovery.
Any help would be appreciated.
View 3 Replies
View Related
Mar 20, 2015
We have log shipping for databases from production to back office (BO) environments for users to run reports. In preparation for moving a back office environment to a different server, we want to setup an addition log shipping environment, let’s call it BO2, same as the BO. One of the challenges we had was the amount of time it would take to get the full backup from production to BO2 due to the size of the database. It would take days just to transfer the full backup.
Solution:Let’s just say the database being logged shipped is DB123. Instead of using the full backup of DB123 from production, we use the mdf and ldf of DB123 from current log shipped database on the BO to setup the additional log shipping on BO2.
Steps:1.Setup the directory structure for the undo file (tuf) on the BO2 server same as the BO server.
Note: The undo can be moved to different drive after the log shipping is setup.
2.Stop SQL services on the BO server.
3.Copy the undo file (tuf), mdf, and ldf files of the log shipped database, DB123, from server BO to server BO2.
Note: Keep these files as main copies because they will be used multiple times. Do NOT copy files to where you’ll put the new database files.
4.After the files are copied, start SQL services on BO.
5.On the BO2 server, create an empty database DB123 with database name, file_id, logical names, physical names exactly the same as the ones on the BO server.
Note: Make the size of mdf and ldf small so it doesn’t take long to create the database.
6.Stop SQL Services on the BO2 server.
7.Overwrite the new mdf and ldf files of the empty database DB123 with the mdf and ldf files that were copied over from BO.
8.Start SQL services on BO2.
Note: If the file_id, logical names and physical names are not matching up, the database will be in suspect mode.
9.Do a backup of DB123 with COPY_ONLY.
10.Drop DB123 on BO2 after backup is complete.
11.Use the full backup from previous step to setup log shipping of DB123 on BO2.
Note: Below was the LiteSpeed syntax that was used
exec master.dbo.xp_restore_database @database = N'DB123' ,
@filename = N'F:SQL BackupsDB123_FULL.slsfull',
@filenumber = 1,@with = N'STATS = 10',
@with = N'STANDBY = N''C: MSSQLDataROLLBACK_UNDO_DB123.trn''',
@affinity = 0,@logging = 0
12.Stop SQL services on BO2.
13.Again, overwrite the mdf, ldf and undo file (tuf) of DB123 on server BO2 with mdf, ldf, and undo file (tuf) from BO.
14.Start SQL services on BO2.
15.Replay transaction log from PRD
Note: You can change the location of the undo file by copy the current undo file to the new location and point to new location in “STANDBY” parameter. DO NOT do cut and paste of undo file but do copy and paste.
It works on Microsoft SQL Server 2008 R2 (SP2) - 10.50.4033.0 (X64) . I have not tried it on SQL Server 2012 yet.
In steps that stop/start SQL services, you can bring the database offline/online.
In a way, this is doing detach/attach a log shipped database.
View 0 Replies
View Related
Jun 11, 2015
We have a production server "prod" which has a user say 'test' that lets the users connect to the application and a logon trigger which stops them from connecting to the server through SSMS. I log ship 'prod' to the 'rep' database and the user 'test' is obviously created in the logshipped database 'rep' during the logshipping.
Now the login 'test' does not have any login from server 'rep', But people can still login to the 'rep' server and query the 'rep' db . I checked with SUSER_SNAME and found the SID of the user in rep server which I never created and which is not even present in the login names, Even If I create a new username in the 'prod' db, after logshipping the new user is replicated in the 'rep' server.
View 9 Replies
View Related
Mar 6, 2008
I have had this issue just pop up. I have local users who can connect fine, but my users that require connection by VPN cannot connect. I get the server not available or access denied error. I did confirm that the VPN'ers are connected to the network correctly and can see that their shares and mappings are correct. Any ideas? Thanking you all in advance!!
View 6 Replies
View Related
May 14, 2008
NOTE: I am talking about roles in my sql server - NOT in asp.net. I need to create a stored procedure that retrieves the roles that the currently logged in sql user has for a different database. I have the code that gets the roles for the user, but it only works if the user is in the database. I want to be in one database, and get the roles for a different database. I have tried using USE DATABASE, but this is not allowed in a store procedure.
View 10 Replies
View Related
Jul 11, 2004
I can get a list of all databases in SQL Server using
sqlText = "select name from sysdatabases order by name".
How can I get such a list for the currently logged in user only?
Thanks in advance
Harold Hoffman
View 1 Replies
View Related
Apr 22, 2000
How do I refer to the user logged on to the database?
I can refer to a table as dbo.tblApptDaily,
but how do I refer to
[current user].tblApptDaily?
Create Procedure "prcCreateApptDaily"
as
Create dbo.tblApptDaily
(ID int primary key, ApptTime datetime,
book1 numeric, book_Status1numeric default (0), PN1 varchar (50), ApptID1
int,...LastID int)
View 2 Replies
View Related
Nov 28, 2006
Hi Team,
In SQL Enterprise Manager, when we expand "Database -->Users", we see the
users there. When we expand "Security --> logins" we see the same users there.
Can you differentiate these two.
Thanks
Santhosh
View 1 Replies
View Related
Feb 19, 2007
SQL Server 2005 SP2 has now been Released To Web and is available for download:
http://www.microsoft.com/sql/sp2.mspx
February Books Online update is not included in SP2, get it separately:
http://www.microsoft.com/downloads/details.aspx?familyid=BE6A2C5D-00DF-4220-B133-29C1E0B6585F
View 1 Replies
View Related
Dec 31, 2007
I have a SQL database that gets populated by another program. Is there a way to determine when a new record is added to that database?
Thanks
View 4 Replies
View Related
Jun 24, 2008
Dear All,
i dont know the exact reson why, but i'm guessing the reason for each table had a new guid column is because of transactional replication with update subscribers. actually i dont need this.
can i change this to transactional replication? or i need to drop the column in each table? please guide me
Arnav
Even you learn 1%, Learn it with 100% confidence.
View 6 Replies
View Related
Aug 28, 2006
I have a web form that is an interface for a database. The code was working fine until a field needed to be added. So I added the new field, updated the data adapter and data set, and when i enter the data into the field, all of the old fields are getting updated, but the new ones aren't. I am at wits end as to why. Can someone please help!!! I am using VS Studio 2000 ASP.NET and C#. The code is below. The bold items are the new fields.using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;namespace TrafficDept{/// <summary>/// Summary description for AddOwner./// </summary>public class AddOwner : System.Web.UI.Page{protected System.Web.UI.WebControls.Button Button1;protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;protected System.Data.SqlClient.SqlConnection sqlConnection1;protected System.Web.UI.WebControls.TextBox TextBox1;protected System.Web.UI.WebControls.TextBox TextBox2;protected System.Data.SqlClient.SqlDataAdapter daAddOwner;protected System.Web.UI.WebControls.TextBox tbOtherOwnerLName;protected System.Web.UI.WebControls.Panel namePanel;protected System.Web.UI.WebControls.TextBox tbOtherOwnerMI;protected System.Web.UI.WebControls.TextBox tbOtherOwnerFName;protected System.Web.UI.WebControls.TextBox tbSecondOwnerLName;protected System.Web.UI.WebControls.TextBox tbSecondOwnerMI;protected System.Web.UI.WebControls.TextBox tbSecondOwnerFName;protected System.Web.UI.WebControls.Button Button4;protected SiteCubed.EditWorksProfessional tbNote;protected System.Web.UI.WebControls.Panel notePanel;protected System.Web.UI.WebControls.DropDownList ddlStatus;protected PeterBlum.PetersDatePackage.DateTextBox tbRegDate;protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;protected System.Web.UI.WebControls.TextBox tbOwner;protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;protected System.Web.UI.WebControls.TextBox tbOwnerMI;protected System.Web.UI.WebControls.TextBox tbOwnerLName;protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator4;protected System.Web.UI.WebControls.TextBox tbBusinessName;protected System.Web.UI.WebControls.TextBox tbAddress;protected System.Web.UI.WebControls.TextBox tbRegNo;protected System.Web.UI.WebControls.TextBox tbPreviousOwner;protected System.Web.UI.WebControls.TextBox tbPOwnerAddress;protected System.Web.UI.WebControls.TextBox tbPORegNo;protected PeterBlum.PetersDatePackage.DateTextBox tbTransferDate;protected System.Web.UI.WebControls.DropDownList ddlMeans;protected System.Web.UI.WebControls.Button Button3;protected System.Web.UI.WebControls.Button Button2;protected System.Data.SqlClient.SqlCommand sqlSelectCommand1;protected System.Data.SqlClient.SqlCommand sqlInsertCommand1;protected System.Data.SqlClient.SqlCommand sqlUpdateCommand1;protected System.Data.SqlClient.SqlCommand sqlDeleteCommand1;protected TrafficDept.dsAddOwner dsAddOwner1; private void Page_Load(object sender, System.EventArgs e){// Put user code to initialize the page here}#region Web Form Designer generated codeprivate void Button2_Click(object sender, System.EventArgs e){Response.Redirect("AddOthers.aspx");}private void Button1_Click(object sender, System.EventArgs e){daAddOwner.Fill(dsAddOwner1);dsAddOwner.OwnershipRow drOwner = dsAddOwner1.Ownership.NewOwnershipRow();drOwner.Plates_ID = int.Parse(Session["PlatesID"].ToString());drOwner.Status = ddlStatus.SelectedItem.Text;drOwner.Current_Legal_Owner = tbOwner.Text;drOwner.Owner_CurrentLegalOwnerMI = tbOwnerMI.Text.ToString();drOwner.Owner_CurrentLegalOwnerLName = tbOwnerLName.Text;drOwner.Owner_CurrentBusinessName = tbBusinessName.Text;if (!tbRegDate.xIsEmpty)drOwner.Date_of_Registration = DateTime.Parse(tbRegDate.Text.ToString());drOwner.Address_of_Current_Owner = tbAddress.Text;drOwner.Reg_No_for_Current_Owner = tbRegNo.Text;drOwner.Previous_Owner = tbPreviousOwner.Text;drOwner.Previous_Owner_Address = tbPOwnerAddress.Text;drOwner.Reg_No_for_Previous_Owner = tbPORegNo.Text;if (!tbTransferDate.xIsEmpty)drOwner.Date_of_Transfer = DateTime.Parse(tbTransferDate.Text.ToString());drOwner.By_Means_of = ddlMeans.SelectedItem.Text;drOwner.Owner_SecondaryLegalOwnerFName = tbSecondOwnerFName.Text;drOwner.Owner_SecondaryLegalOwnerMI = tbSecondOwnerMI.Text;drOwner.Owner_SecondaryLegalOwnerLName = tbSecondOwnerLName.Text;drOwner.Owner_OtherLegalOwnerFName = tbOtherOwnerFName.Text;drOwner.Owner_OtherLegalOwnerMI = tbOtherOwnerMI.Text;drOwner.Owner_OtherLegalOwnerLName = tbOtherOwnerLName.Text;drOwner.Owner_Notes = tbNote.Text;dsAddOwner1.Ownership.Rows.Add(drOwner);daAddOwner.Update(dsAddOwner1);Response.Redirect("AddOthersTP.aspx");}private void Button3_Click(object sender, System.EventArgs e){//daAddOwner.Fill(dsAddOwner1);//dsAddOwner.OwnershipRow drAddOwner = dsAddOwner1.Ownership.NewOwnershipRow();namePanel.Visible = true; }private void Button4_Click(object sender, System.EventArgs e){notePanel.Visible = true;}}}
View 1 Replies
View Related
Apr 30, 2015
In addition to the column values, we are getting the below tag added throughout the table. It happens specifically to the columns with data type nvarchar and varchar and length >=100. We have 5 numbers of database but it happens only in one specific database. We doubt it to be sql injection but not sure how it happens. The impact is very severe on our clients. how to find the root cause. In that html tag have the url:...
Wilhite</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div
Blunt</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Duran</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Neiwert</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Gerard</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div>
Hrnandez</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div class
Hernandez</title><style>.alwi{clip:rect(483px,auto,auto,427px);}</style><div class
[code]....
View 4 Replies
View Related
Aug 18, 2007
When I execute this, it works ok but only one the first character of the request.form["d"] is stored to the db.I checked the sproc with another routine and it adds full data, and I've verified that value of request.form["d"] is longer than one chaacter by printing it to the page. Anyone got any ideas why only the first char is getting added to the db?? SqlConnection SqlConnection1 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1"].ConnectionString);
SqlCommand SqlCommand1 = new SqlCommand("addRoute", SqlConnection1);
SqlCommand1.CommandType = CommandType.StoredProcedure;
SqlParameter SqlParameter1 = SqlCommand1.Parameters.Add("@ReturnValue", SqlDbType.Int);
SqlParameter1.Direction = ParameterDirection.ReturnValue;
SqlCommand1.Parameters.Add("@xmlData", Request.Form["d"]);
SqlConnection1.Open();
SqlCommand1.ExecuteNonQuery();
Response.Write(SqlCommand1.Parameters["@ReturnValue"].Value);
//Response.Write(Request.Form["d"]);
View 2 Replies
View Related
Nov 11, 2006
1. The title of this post says it all. My app will have a very small footprint to down load. I don't want to user to have to download 50 + MB just to try my little $15 app:-) So
QUESTION 1 - Will SQL Express be in the Vista bits? If so which versions?
2. Once SQLExpress is installed by whatever means, are there rules about how the instance is used? I have no problems playing well with others so I would be more than happy to create my DB in .SQLExpress.
QUESTION 2 - Are there any rules governing who can play in the Express instance? How should dtabases should be named to avoid collisions with the other kids?
3. I'd love to be able to work in in ClickOnce / user never has to have admin password environment.
QUESTION 3 - Besides UAC are there any constraints on writing to a properly installed Express instance that would get in the way of a pure user application from using the basic instance.
4. Right now - because I can't read directions and still don't understand the smoke and mirrors in VS 2005 when it comes to dealing with databases - I have DDL in my program that allows me to create my database from scratch. Not sure that this is the right way to go.
QUESTION 4. What is the best way for an user software to create its database in an instance of SQL Express.
5. SQL Express is yet another thingie that will run in the background that the typical user won't understand and wont' give a hoot about.
QUESTION 5. Can I / should I programmatically worry about whether the service is up and running? If so how do I launch it.
I know this is a lot for a single post, but it all sort of hangs together.
Regard,
Al Christoph
View 2 Replies
View Related
May 7, 1999
Anybody figure a way around this:
In a development server you take a backup and you want to move the entire database to a production server. The production server does not contain the database, users, or logins in master.
When you restore the backup to production in 7.0, the users get moved to DBO because the logins do not exist and then you cannot delete them.
We are having to drop the users from the database on development, back up the database and restore it to production, then recreate the users on production.
This is bogus and did not happen in 6.5 because of the aliases.
Anybody come up with a better way?
View 1 Replies
View Related
Mar 12, 2008
Hello, I am tring to add a string my database. Info is added, but it is the name of the string, not the data contained within. What am I doing wrong? The text "Company" and "currentUserID" is showing up in my database, but I need the info contained within the string. All help is appreciated!
Imports System.Data
Imports System.Data.Common
Imports System.Data.SqlClientPartial Class _DefaultInherits System.Web.UI.Page
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
'Database ConnectionDim con As New SqlConnection("Data Source = .SQLExpress;integrated security=true;attachdbfilename=|DataDirectory|ASPNETDB.mdf;user instance=true")
'First Command DataDim Company As String = ((CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("Company"), TextBox)).Text)
Dim insertSQL1 As StringDim currentUserID As String = ((CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("UserName"), TextBox)).Text)
insertSQL1 = "INSERT INTO Company (CompanyName, UserID) VALUES ('Company', 'currentUserID')"Dim cmd1 As New SqlCommand(insertSQL1, con)
'2nd Command Data
Dim selectSQL As String
selectSQL = "SELECT companyKey FROM Company WHERE UserID = 'currentUserID'"Dim cmd2 As New SqlCommand(selectSQL, con)
Dim reader As SqlDataReader
'3rd Command Data
Dim insertSQL2 As String
insertSQL2 = "INSERT INTO Company_Membership (CompanyKey, UserID) VALUES ('CompanyKey', 'currentUserID')"Dim cmd3 As New SqlCommand(insertSQL2, con)
'First CommandDim added As Integer = 0
Try
con.Open()
added = cmd1.ExecuteNonQuery()
lblResults.Text = added.ToString() & " records inserted."Catch err As Exception
lblResults.Text = "Error inserting record."
lblResults.Text &= err.Message
Finally
con.Close()
End Try
'2nd Command
Try
con.Open()
reader = cmd2.ExecuteReader()Do While reader.Read()
Dim CompanyKey = reader("CompanyKey").ToString()
Loop
reader.Close()Catch err As Exception
lbl1Results.Text = "Error selecting record."
lbl1Results.Text &= err.Message
Finally
con.Close()
End Try
'3rd Command
Try
con.Open()
added = cmd3.ExecuteNonQuery()
lbl2Results.Text = added.ToString() & " records inserted."Catch err As Exception
lbl2Results.Text = "Error inserting record."
lbl2Results.Text &= err.Message
Finally
con.Close()End Try
End Sub
End Class
View 3 Replies
View Related
May 21, 2008
hi there,
After replicating a database, the stored procedures in that same database are not able to edit by other users than service account (sys admin users), When the normal users try to edit any of the stored procedures, sql server 2005 is throwing the following error...
Msg 21050, Level 16, State 1, Procedure sp_MSmerge_ddldispatcher, Line 12Only members of the sysadmin fixed server role or db_owner fixed database role can perform this operation. Contact an administrator with sufficient permissions to perform this operation.
any suggessions are most welcome.
by
CHINNASAMY
View 1 Replies
View Related
May 8, 2015
I need sql query to select max date shipment where sum of quantity required > sum of quantity shipped from sales line table but i dont know how to make my sales line table as following
shipment date quantity required quantity shipped
07/05/2015 200 100
07/05/2015 300 300
07/05/2015 100 50
06/05/2015 200 100
06/05/2015 200 200
Here the result of query i need is max shipment date is 07/05/2015 and quantity required is 600 and quantity shipped is 450 so tat i must select this date because quantity Required is big from quantity shippedmy question How i write the query get result above in sql server 2005.
View 9 Replies
View Related
Jan 31, 2008
how can i create a users database to store users infos (names pictures...) ??
thx for taking time to read this
View 2 Replies
View Related
Feb 8, 2007
Hi,
I would like to know if there is any way of Accessing database users from frontend and changing their persmissions.
Thanks
Niranjana.
View 10 Replies
View Related
Jan 25, 2001
Hello Experts,
I copied a database from my production server to the development server and now i dont see the users in the database from the enterprise manager,database and users folder. But, When i run a query to against the sysuser table from a query analyser I can see those users here. Why cant I see in from the Enterprise manager. Any advice please..
Appreciated any comments on this.
Thanks,
Vilke.
View 2 Replies
View Related
Dec 1, 2000
Does anyone know a way to force out all users from a particular database? I need to script this to perform some maintenance at a particular time every day.
Thanks for your help,
Les
View 2 Replies
View Related